Re: BUG #15213: unable to login on PostgreSQL by postgres user
| От | dhirendra Singh |
|---|---|
| Тема | Re: BUG #15213: unable to login on PostgreSQL by postgres user |
| Дата | |
| Msg-id | PN1PR0101MB15352CBFB6CE94BE6A1B4BFDA06D0@PN1PR0101MB1535.INDPRD01.PROD.OUTLOOK.COM обсуждение исходный текст |
| Ответ на | Re: BUG #15213: unable to login on PostgreSQL by postgres user (Arthur Zakirov <a.zakirov@postgrespro.ru>) |
| Ответы |
Re: BUG #15213: unable to login on PostgreSQL by postgres user
|
| Список | pgsql-bugs |
1. Step : stope postgresql service $ sudo systemctl stop postgresql-9.3 and verify by command sudo systemctl status postgresql-9.3
2. Created new directory/ location for db data ($ sudo mkdir postgresql)
3. Sudo chown postgres:postgres postgresql
4. Then copy all data by command (sudo rsync -av /var/lib/pgsql/9.3/data /opt/postgresql/)
5. Login with (sudo –u postgres –i) on server
- Open (vim /opt/postgresql/data/postgresql.conf)
- Connented out (#data_directory = 'ConfigDir')
- Added new line below above line (data_directory = '/opt/postgresql/data')
6. Updated (sudo vim /usr/lib/systemd/system/postgresql-9.3.service) by adding (Environment=PGDATA=/opt/postgresql/data) line below line and commented line (#Environment=PGDATA=/var/lib/pgsql/9.3/data/) 7. unable to run show data_directory to verify data directory location due to below error same error
DETAIL: The database subdirectory "base/12950" is missing.
Sent: Tuesday, May 29, 2018 1:53 PM
To: dhirendra04@hotmail.com; pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15213: unable to login on PostgreSQL by postgres user
On Tue, May 29, 2018 at 07:32:38AM +0000, PG Bug reporting form wrote:
> [dhirsing@jira-stg ~]$ sudo -u postgres psql postgres
> [sudo] password for dhirsing:
> could not change directory to "/home/dhirsing"
> psql: FATAL: database "postgres" does not exist
> DETAIL: The database subdirectory "base/12950" is missing.
I think you missed postgres database directory. Can you check using a
file manager if the directory "base/12950" exists in your PGDATA?
If it is lost the only way is to restore your instance from a backup.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
В списке pgsql-bugs по дате отправления: