On 03/15/2016 08:10 AM, 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" After the crash the database runs in recovery mode. A restart of the database brings everything back to normal. This crash is always reproducible and occurs every night during backup. When calling the same command via the command line everything run fine. In the system log I can see:
Is the command you run via the command line exactly the same, including the su -?
What user are you running the cronjob as? How do you supply the password for the mmppostgres user?
Any ideas where to continue my search? Best regards Matthias Schmitt magic moving pixel s.a. 23, Avenue Grande-Duchesse Charlotte L-3441 Dudelange Luxembourg Phone: +352 54 75 75 http://www.mmp.lu
-- Adrian Klaver adrian.klaver@xxxxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general