Re: gcc 4.6 and hot standby - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Re: gcc 4.6 and hot standby
Date
Msg-id BANLkTinyntBnLW0UbeKjMVaLHwd39n98Zw@mail.gmail.com
Whole thread Raw
In response to gcc 4.6 and hot standby  (Alex Hunsaker <badalex@gmail.com>)
Responses Re: gcc 4.6 and hot standby
List pgsql-hackers
On Wed, Jun 8, 2011 at 12:12, Alex Hunsaker <badalex@gmail.com> wrote:
> So I've been delaying moving some production boxes over to 9.0.4 from
> 9.0.2 because hot standby fails with:
> (this is on the "hot standby" machine that connects to the master)
> [ ...]
> 2011-06-08 11:41:03 MDT [6072]: [18-1] user= LOG:  invalid record
> length at 86/E3B32010
> 2011-06-08 11:41:03 MDT [6078]: [1-1] user= FATAL:  terminating
> walreceiver process due to administrator command
> [ repeats... ]

> [...] I then tired various optimization levels on 4.6:
> -O0: works
> -O1: works
> -O2: fails
> -Os: works

So I tracked it down to "-fgcse", that is CFLAGS="-O2 -fno-gcse"
./configure works. I then took a few guesses and compiled all of
postgres with -O2, then manually recompiled xlog.c with -f-no-gcse.
that combination seems to work.

[ One thing im not sure is why -Os works, I tried -O2 and added all
the -fno-XXX options it says -Os adds. I suppose its either they turn
off/on other optimizations the man page does not mention, or I guess
thats compiler bugs for ya ]


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: gcc 4.6 and hot standby
Next
From: Alex Hunsaker
Date:
Subject: Re: gcc 4.6 and hot standby