Re: Need to fix one more glitch in upgrade to -10.2

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Need to fix one more glitch in upgrade to -10.2
Date: 2018-02-18 01:06:14
Message-ID: fc4f4ec8-d4cf-a4a8-9f57-064daf1546f8@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/17/2018 04:44 PM, Rich Shepard wrote:
> On Sat, 17 Feb 2018, Adrian Klaver wrote:
>
>> From a previous post:
>>
>> POSTGRES=/usr/lib${LIBDIRSUFFIX}/@PRGNAM@/$PG_VERSION/bin/postgres
>>
>> From here:
>>
>> http://slackbuilds.org/slackbuilds/14.1/system/postgresql/postgresql.SlackBuild
>>
>
>   The desktop runs 32-bit 14.2.
>
>> You could also try using pg_ctl to start the server directly:
>
>   postgres(at)salmo:~$ pg_ctl start -D /var/lib/pgsql/10.2/data/ waiting
> for server to start....2018-02-17 16:43:18.344 PST [6761] LOG:
> listening on IPv4 address "127.0.0.1", port 5432
> 2018-02-17 16:43:18.368 PST [6761] LOG:  listening on Unix socket
> "/tmp/.s.PGSQL.5432"
> 2018-02-17 16:43:18.454 PST [6762] LOG:  database system was shut down
> at 2018-02-17 15:53:32 PST
> 2018-02-17 16:43:18.487 PST [6761] LOG:  database system is ready to
> accept connections
>  done
> server started
> postgres(at)salmo:~$ 2018-02-17 16:43:29.899 PST [6774] FATAL:  role
> "rshepard" does not exist
> 2018-02-17 16:43:31.669 PST [6776] FATAL:  role "rshepard" does not exist
>
>   So I guess I need to re-learn how to set roles and set one for me for
> all
> databases I own. That's tomorrow morning. Will report results after doing
> that.

If it was in the 9.6 cluster it should be in the 10 cluster. I would log
into the postgres db as postgres via psql and do \du.
If the roles are not there then:

1) If the 9.6 cluster can be started then do pg_dumpall -g to get the
roles and other globals. Then feed that to the 10 cluster.

2) If the 9.6 cluster is not available then pull the roles out of:
pg_dumpall -c -f <filename>.sql'

As to starting, borrowing from the rc.postgresql script:

PG_VERSION=10.2 PG_PORT=5432 /etc/rc.d/rc.postgresql start

>
> Thanks, Adrian,
>
> Rich
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-02-18 01:24:59 Re: Need to fix one more glitch in upgrade to -10.2
Previous Message Rich Shepard 2018-02-18 00:44:59 Re: Need to fix one more glitch in upgrade to -10.2