Re: pg_dump crashing ... solved - Mailing list pgsql-general

From Matthias Schmitt
Subject Re: pg_dump crashing ... solved
Date
Msg-id A0D36533-7B6C-48B4-99BB-46502DD3512D@mmp.lu
Whole thread Raw
In response to Re: pg_dump crashing  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hello,

thank you for your answers.

> On 20 Mar 2016, at 16:56, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> So what happens if you either?:
>
> 1) In the root crontab, change the command to:
>
> /Users/…/bin/pg_dump -p 5433 mydatabase_1_0_0 -U mmpostgres > /my_backup_path/mydatabase_1_0_0.dump

This will make no difference.

> On 21 Mar 2016, at 03:42, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
>
> Is this related?
>
> http://www.postgresql.org/message-id/CAK7tEys9-O4BTERbs3Xuk2BfFNNd55u2sM9j5R2Fi7v6BHjrQw@mail.gmail.com

Yes, this is related. I tried to set RemoveIPC=no, but it made no difference.

Finally I found a solution with the hint given here:
http://www.postgresql.org/message-id/56A52018.1030001@gmx.net

Systemd defaults to remove all IPC (including SYSV memory) when a user "fully" logs out. This seems to be happen when
runningthe cron job. It seems to be a difference if the job is running as a “normal” user or a “system” user. 

So I modified my existing postgres user to be a system user

usermod -u <id below 1000> mmppostgres

an now my backup is running. I cannot remember finding such a hint in the PostgreSQL documentation. It would be worth
mentioningit. 

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






pgsql-general by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pg_dump crashing
Next
From: "Alexey.I.Larin@gmail.com"
Date:
Subject: pglogical two way replication problem