PostgreSQL pg_dumpall error message

When doing a PostgreSQL database server upgrade, you first need to backup all of the databases because the format changes from version to version.

Postgresql documentation states you need to run the command:

1
pg_dumpall > outputfile

I ran this, and received the error message:

1
pg_dumpall: could not connect to database "template1": FATAL:  role "root" does not exist

So after some head scratching and googling without any results; I noticed that I had created a user for postgres; namely ‘postgres’. I sued to that user and ran the command – what do you know – it works fine! I’m glad that error message was so clear.

So, the thing that the documentation does not state – make sure you are running under the Postgresql user before running the backup command.

Join RSS Readers other readers by subscribing to my RSS feed! RSS Logo

Share on Twitter Save to Delicious Stumbleupon Share on Facebook Reddit Other services
Short URL: http://sysbash.com/27
Last updated: February 20th, 2008
 
  • http://www.digitalsolecism.net Mike

    Don’t ya just love crappy error messages?

  • http://www.digitalsolecism.net Mike

    Don’t ya just love crappy error messages?

  • Jochen

    Thx!
    You and Google just saved me a lot of time

  • Jochen

    Thx!
    You and Google just saved me a lot of time

  • atish

    HI,

    I’m using Centos 5.1x86_64bit and running mysql64bit also. I have activated the log-bin=mysql-bin on my.cnf but no logs are being generated as I need it for replication. Please help me out.

    thx a lot
    Atish

  • atish

    HI,

    I’m using Centos 5.1x86_64bit and running mysql64bit also. I have activated the log-bin=mysql-bin on my.cnf but no logs are being generated as I need it for replication. Please help me out.

    thx a lot
    Atish