Re: Archiver not exiting upon crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Archiver not exiting upon crash
Date: 2012-05-23 20:29:37
Message-ID: 11319.1337804977@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> On my machine, man system(3) saith:

> system() ignores the SIGINT and SIGQUIT signals, and blocks the
> SIGCHLD signal, while waiting for the command to terminate. If this
> might cause the application to miss a signal that would have killed
> it, the application should examine the return value from system() and
> take whatever action is appropriate to the application if the command
> terminated due to receipt of a signal.

> Now, the code that directly calls system(), namely pgarch_archiveXlog(),
> knows this perfectly well, as per the comment at lines 590ff in HEAD.
> However, the code that *calls* it did not get the memo :-(, and appears
> to be willing to retry regardless.

Uh, no, scratch that: the code in pgarch_archiveXlog ought to be doing
ereport(FATAL) if this case applies. So it's not clear what is
happening for you, unless system() returned a misleading return code.
You might try adding a debug printout to show the actual returned value.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2012-05-23 20:34:16 Re: Archiver not exiting upon crash
Previous Message Josh Berkus 2012-05-23 20:15:13 Re: Changing the concept of a DATABASE