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:

pg_dumpall > outputfile

I ran this, and received the error message:

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.

6 comments
  1. 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

  2. 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

Comments are closed.

You May Also Like

Change your default CPAN mirror

Changing your cpan mirror. Although it seems like it would be easy…

Installatron WordPress Upgrade Disables Plugins

I just found a quick tip on the Installatron forums. By default…

Send your cell phone SMS system alert messages.

SMSSend is a program used to send SMS messages over the network…

Attach files to email via command line

This is a pretty simple thing to do, once you’ve figured it…