Re: Archiver not exiting upon crash - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Archiver not exiting upon crash
Date
Msg-id 11319.1337804977@sss.pgh.pa.us
Whole thread Raw
In response to Re: Archiver not exiting upon crash  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Changing the concept of a DATABASE
Next
From: Jeff Janes
Date:
Subject: Re: Archiver not exiting upon crash