Re: Upgrading using pg_dumpall
От | Adrian Klaver |
---|---|
Тема | Re: Upgrading using pg_dumpall |
Дата | |
Msg-id | 76d8f312-da20-37cd-6807-39b569e1491c@aklaver.com обсуждение исходный текст |
Ответ на | Re: Upgrading using pg_dumpall (Rich Shepard <rshepard@appl-ecosys.com>) |
Ответы |
Re: Upgrading using pg_dumpall
|
Список | pgsql-general |
On 09/04/2016 12:10 PM, Rich Shepard wrote: > On Sun, 4 Sep 2016, Adrian Klaver wrote: > >> 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. > > Adrian, > > OK. That makes sense. > >> 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. > > Good. Then I won't spend time with them. > > So, given my single-user situation do you think that I should ALTER ROLE > to add my password? Adding it to ~/.pgpass did nothing positive when I > changed auth method to md5; my attempt to open a database failed because > that password was rejected. Strange ... to me. Well first, if you are going to use trust as your auth method then specifying a password is moot exercise. Second, not sure where you are in the process, but any time you change the pg_hba.conf file you will need to give Postgres a reload signal to get it to recognize the changes. Again not sure how you are signalling Postgres but if you are using pg_ctl https://www.postgresql.org/docs/9.5/static/app-pg-ctl.html then something like: pg_ctl reload -D path_to_your_datadir as OS user postgres. Third, .pgpass should hold information that already exists in the database system tables. It is not a mechanism for entering that information into the database. So yes, you will need to use ALTER ROLE to create the password inside Postgres. > > Rich > > > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: