Re: Upgrading using pg_dumpall

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: Upgrading using pg_dumpall
Date: 2016-09-04 18:59:10
Message-ID: cf3b31ec-cf20-5c10-72ff-ba91643b523e@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/04/2016 09:43 AM, Rich Shepard wrote:
> On Sun, 4 Sep 2016, Adrian Klaver wrote:
>
>> -W is not referring to the OS user but the database superuser. Now in
>> your
>> case they have the same name, postgres. The settings in /etc/passwd are
>> not relevant to what -W is doing. -W is referring to user information
>> being stored in the cluster in the system tables pg_user and pg_shadow:
>>
>> https://www.postgresql.org/docs/9.5/static/catalogs.html
>
> I see the pg_user in Section 49.79 but don't know how to correctly
> configure it. It seems that pg_shadow is unnecessary since I don't need to
> provide compatibility with versions < 8.1.

You don't it directly. That information is supplied by Postgres when you
do CREATE or ALTER ROLE. The -W switch just does that for the
superuser(postgres in your case) when you initdb a new cluster.

Sorry, old habits. pg_user is a version of the pg_shadow view that
blanks out the actual password. pg_shadow is a view over the table
pg_authid, where the actual information is stored now. In any case,
again they are not tables/views you directly modify.

>
> Rich
>
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2016-09-04 19:10:14 Re: Upgrading using pg_dumpall
Previous Message Lukas Lehner 2016-09-04 18:33:43 please remove outdated site from 2005