Re: Upgrading using pg_dumpall

From: Charles Clavadetscher <clavadetscher(at)swisspug(dot)org>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Upgrading using pg_dumpall
Date: 2016-09-04 15:14:39
Message-ID: 75dfcd24-6248-491e-df8e-2871b7886264@swisspug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

On 09/04/2016 05:11 PM, Rich Shepard wrote:
> On Sun, 4 Sep 2016, Adrian Klaver wrote:
>
>> But the message you sent me offlist showed the 9.5 instance running.
>
> But now it's not running.
>
>> How are you starting the instance?
>
> As superuser poostgres: pg_ctl start -D /var/lib/pgsql/data &
>
> After removing an orphaned postmaster.pid the above seemed to have
> started
> postgres, but there's no postmaster process running.
>
>> Are you sure that the password being asked for is not for the OS user
>> you are using to run whatever start script you are using?
>
> Thinking postmaster is running I tried this:
>
> $ psql crm
> Password: FATAL: password authentication failed for user "rshepard"
> DETAIL: User "rshepard" has no password assigned.
> Connection matched pg_hba.conf line 80: "local all all
> md5"
> psql: FATAL: password authentication failed for user "rshepard"

Well, there you have it. As Adrian suggested you may set temporarily the
authentication method to trust, set yourself a password and change it
back to md5.

That should do.
Bye
Charles

>
> The crm database is owned by me.
>
>> I have never used it, but I am pretty sure that is not what -W means. It
>> looks to me that it asks you to create a password at init for the
>> database
>> superuser(in this case postgres) and only that user when that user tries
>> to use log into a database after the cluster is started.
>
> From man initdb:
>
> -W, --pwprompt
> Makes initdb prompt for a password to give the database
> superuser.
> If you don't plan on using password authentication, this is not
> important. Otherwise you won't be able to use password
> authentication until you have a password set up.
>
> The superuser already exists in /etc/passwd.
>
>> Do you remember what password you specified?
>
> Yes. It's the same password I use for logging in as a user. If it's the
> superuser password being requested, then that's the same as my user
> password.
>
> The Slackware rc.postgresql file for 9.5 has changed from 9.3 and
> earlier.
> It's asking for passwords:
>
> if [ ! -e $DATADIR/PG_VERSION ]; then
> echo "You should initialize the PostgreSQL database
> at location $DATADIR"
> echo "e.g. su postgres -c \"initdb -D $DATADIR
> --locale=en_US.UTF-8 -A md5 -W\""
> exit 6
> fi
>
> Note the '-W' at the end. But, I ran initdb from the command line as user
> postgres.
>
> Rich
>
>
>
>

--
Swiss PostgreSQL Users Group
c/o Charles Clavadetscher
Treasurer
Motorenstrasse 18
CH – 8005 Zürich

http://www.swisspug.org

+-----------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) _/ |
| \ /\_/ \)/ |
| \/ <//| |\\> |
| _| | |
| \|_/ |
| |
| PostgreSQL 1996-2016 |
| 20 Years of Success |
| |
+-----------------------+

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Charles Clavadetscher 2016-09-04 15:16:54 Re: Upgrading using pg_dumpall
Previous Message Rich Shepard 2016-09-04 15:14:21 Re: Upgrading using pg_dumpall