From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.
Date: Fri, 18 Mar 2011 21:12:52 -0400
Message-ID: <27265.1300497172@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTinRkoYcfrkMkzFsA3trGfwSxiqLDMw+PA9dicDt@mail.gmail.com>
References: <E1PwMns-00047O-UU@gemulon.postgresql.org>
<AANLkTikJmP+bo1N-mFUWEpJiV6_OKisYw512OGeTJUbm@mail.gmail.com>
<AANLkTinbzFaJXkzwm2xEegfytK1LPw8odo61wgZkkGp=@mail.gmail.com>
<AANLkTinRkoYcfrkMkzFsA3trGfwSxiqLDMw+PA9dicDt@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> As a side note, it's not very obvious why some parts of PostmasterMain
> report problems by doing write_stderr() and exit() while other parts
> use ereport(ERROR). This check and the nearby checks on WAL level are
> immediately preceded and followed by other checks that use the
> opposite technique.
This question is answered in postmaster.c's header comment:
* Error Reporting:
* Use write_stderr() only for reporting "interactive" errors
* (essentially, bogus arguments on the command line). Once the
* postmaster is launched, use ereport(). In particular, don't use
* write_stderr() for anything that occurs after pmdaemonize.
Code that is involved in GUC variable processing is in a gray area, though,
since it can be invoked both before and after pmdaemonize. It might be
a good idea to convert all the calls into ereports and maintain a state
flag in elog.c to determine what to do.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, masao.fujii@gmail.com, simon@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.
In-Reply-To: <27265.1300497172@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox