Обсуждение: psql died in midst of session

Поиск
Список
Период
Сортировка

psql died in midst of session

От
Rich Shepard
Дата:
   This has not happened before to me. I'm running postgres-9.0.4 on
Slackware-13.1. I've been working on the command line using the psql shell
updating and fixing a table when the application failed on me:

PANIC:  could not open file "pg_xlog/000000010000000000000046" (log file 0,
segment 70): Permission denied
PANIC:  could not open file "pg_xlog/000000010000000000000046" (log file 0,
segment 70): Permission denied
The connection to the server was lost. Attempting reset: Failed.
!>
!> q
->
->
!> Terminated

   When I try to restart postgres (as user postgres) I get this:

postgres@salmo:~$ postgres -D /usr/local/pgsql/data &
[1] 17783
postgres@salmo:~$ LOG:  database system was interrupted while in recovery at
2011-10-12 13:00:05 PDT
LOG:  database system was not properly shut down; automatic recovery in
progress
LOG:  consistent recovery state reached at 0/4581E51C
LOG:  redo starts at 0/457EC9C4
PANIC:  could not open file "pg_xlog/000000010000000000000046" (log file 0,
segment 70): Permission denied
LOG:  startup process (PID 17784) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure

[1]+  Exit 1                  postgres -D /usr/local/pgsql/data

   pg_xlog is owned by postgres.users and has permissions 755. The /tmp/.S
file is not present, either.

   Please advise me how to recover from whatever happened so I can get
postgres up and running again.

Thanks,

Rich

Re: psql died in midst of session [FIXED]

От
Rich Shepard
Дата:
On Wed, 12 Oct 2011, Rich Shepard wrote:

>  Please advise me how to recover from whatever happened so I can get
> postgres up and running again.

   Fixed. I noticed that the referenced pg_log/ file was owned by root.root
rather than by postgres.users so I chown and that did the trick. Strange.
Guess it was happy until time to write to the file.

Apologies for posting,

Rich