Re: pg_dump crashing ... solved

From: Matthias Schmitt <matthias(dot)schmitt(at)mmp(dot)lu>
To: pgsql-general(at)postgresql(dot)org
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Subject: Re: pg_dump crashing ... solved
Date: 2016-03-21 06:34:41
Message-ID: A0D36533-7B6C-48B4-99BB-46502DD3512D@mmp.lu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

thank you for your answers.

> On 20 Mar 2016, at 16:56, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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(dot)munro(at)enterprisedb(dot)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 running the 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 mentioning it.

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexey.I.Larin@gmail.com 2016-03-21 08:31:40 pglogical two way replication problem
Previous Message Thomas Munro 2016-03-21 02:42:35 Re: pg_dump crashing