On Tue, 2016-03-15 at 16:10 +0100, Matthias Schmitt wrote:
> Hello,
>
> since two weeks I am trying to get PostgreSQL 9.5.1 to run on Debian
> 8.3. Everything is fine except the daily backup. When calling pg_dump
> as part of a cron job pg_dump crashes:
>
> 2016-03-15 01:00:02 CETFATAL: semctl(23232524, 3, SETVAL, 0) failed:
> Invalid argument
> 2016-03-15 01:00:02 CETLOG: server process (PID 22279) exited with
> exit code 1
> 2016-03-15 01:00:02 CETLOG: terminating any other active server
> processes
> 2016-03-15 01:00:02 CETWARNING: terminating connection because of
> crash of another server process
> 2016-03-15 01:00:02 CETDETAIL: The postmaster has commanded this
> server process to roll back the current transaction and exit, because
> another server process exited abnormally and possibly corrupted
> shared memory.
> 2016-03-15 01:00:02 CETHINT: In a moment you should be able to
> reconnect to the database and repeat your command.
> 2016-03-15 01:00:02 CETLOG: all server processes terminated;
> reinitializing
> 2016-03-15 01:00:02 CETLOG: could not remove shared memory segment
> "/PostgreSQL.1804289383": No such file or directory
> 2016-03-15 01:00:02 CETLOG: semctl(22839296, 0, IPC_RMID, ...)
> failed: Invalid argument
> 2016-03-15 01:00:02 CETLOG: semctl(22872065, 0, IPC_RMID, ...)
> failed: Invalid argument
> 2016-03-15 01:00:02 CETLOG: semctl(22904834, 0, IPC_RMID, ...)
> failed: Invalid argument
> …
>
> I am calling pg_dump in my cronjob like this:
> su - mmppostgres -c "/Users/…/bin/pg_dump -p 5433 mydatabase_1_0_0 >
> /my_backup_path/mydatabase_1_0_0.dump"
>
Hello Matthias,
I'm running Debian 4.3.5-1 (2016-02-06) x86_64 GNU/Linux.
Backups are done via a shell script using double hyphen syntax, as in
e.g.:-
pg_dump --port=5433 --dbname=mydatabase_1_0_0 --username=mmppostgres
--file=/my_backup_path/mydatabase_1_0_0.dump
We do it twice. First with --data_only and the second time with
--format=custom
Hasn't failed yet. Don't know if this helps at all but worth a try.
Cheers,
Rob