Re: pg_basebackup: return value 1: reason?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Andrej Vanek <andrej(dot)vanek(dot)sk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_basebackup: return value 1: reason?
Date: 2016-04-18 14:12:31
Message-ID: 5714EB4F.4090706@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/17/2016 12:13 PM, Andrej Vanek wrote:
> Hello Adrian,
>
> I tried to use -U without "su"- launched directly by root: same behaviour.
> Finally I reverted my script to use standard backup (pg_start_backup;
> rsync; pg_stop_backup)- this works- the only downside is possible
> collisions with on-line backup/synchronizaiton of other two nodes on
> master node...
>
> Back to the pg_basebackup issue: it is clear to me that this is an issue
> of environment which launched pg_basebackup.
> Possibly either some privileges or some kernel parameters/limits. Who
> knows?
> Summary: clusterlab's crm_mon launched a shell script starting
> pg_basebackup which fails to do some its work (pg_basebackup: could not
> wait for child process: No child processes)- probably due to some
> failing system call.
>
> How can I report to clusterlabs: What system call fails in pg_basebackup?

All I can to do is point you at:

https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD

>
> Best Regards, Andrej
>
>
>
> 2016-04-17 1:09 GMT+02:00 Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
>
>
> Is the su - even necessary?
>
> pg_basebackup is a Postgres client program you can specify the user
> you want it to connect to using -U.
>
> Or do you need the script to run as postgres in order to get
> permissions on wherever you are creating the backup directory?
>
> have to find out why pg_basebackup cannot fork when launched
> from crm_mon.
>
>
>
> I assume crm_mon is this:
>
> http://linux.die.net/man/8/crm_mon
>
> from Pacemaker.
>
> I do not use Pacemaker, but I am pretty sure that running what is a
> monitoring program in daemon mode and then shelling out to another
> program is not workable. The docs seem to bear this out:
>
> http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster#Installation
>
> https://github.com/smbambling/pgsql_ha_cluster/wiki/Building-A-Highly-Available-Multi-Node-PostgreSQL-Cluster
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-04-18 14:22:25 Re: Enhancement request for pg_dump
Previous Message Adrian Klaver 2016-04-18 14:09:11 Re: Enhancement request for pg_dump