From: | Matthias Schmitt <matthias(dot)schmitt(at)mmp(dot)lu> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dump crashing |
Date: | 2016-03-20 15:24:13 |
Message-ID: | 41C23548-9F3E-4D78-B81F-2AC0D2E3CB5C@mmp.lu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
> On 16 Mar 2016, at 14:55, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
> 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 -?
Yes.
> What user are you running the cronjob as?
root
> How do you supply the password for the mmppostgres user?
I configured in pg_hba.conf:
local all mmppostgres trust
All local connections from this user are trusted.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-03-20 15:56:18 | Re: pg_dump crashing |
Previous Message | Matthias Schmitt | 2016-03-20 15:18:07 | Re: pg_dump crashing |