Re: gcc 4.6 and hot standby

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alex Hunsaker <badalex@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-06-08T20:31:09Z
Lists: pgsql-hackers
Alex Hunsaker <badalex@gmail.com> writes:
>> On Wed, Jun 8, 2011 at 12:49, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> It might be useful to strace the postmaster and walreceiver processes
>>> just to see if any signal is actually being sent or received.

> Find it attached.

Well, the trace shows exactly what I thought was happening: each time
the startup process hits one of these:

> 2011-06-08 14:01:22 MDT [27781]: [12-1] user= LOG:  invalid record
> length at 86/F4E82010

it sends a SIGTERM to kill the walreceiver, because it thinks this
indicates a walreceiver problem.  Then we launch another one and manage
to process a few more WAL records, lather rinse repeat.

So it's interesting that this only happens with a particular gcc version,
because it's not apparent to me why it works properly for anybody.
Isn't hitting a zero record length an expected case when we run ahead of
the amount of WAL produced by the master?

			regards, tom lane