Re: BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Serge Negodyuck <petr(at)petrovich(dot)kiev(dot)ua>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby
Date: 2014-06-06 18:08:26
Message-ID: 20140606180826.GW5146@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > After some simplification I think it should be clearer. Thanks Andres
> > for commenting offlist.
>
> I find this not only unreadable but a bit scary:
>
> ! if (offset + MAX_MEMBERS_IN_LAST_MEMBERS_PAGE < offset)
>
> I'm worried whether some compilers might not decide that that's a
> can't-happen situation, and optimize the test away entirely. I think
> Andres' proposal is probably safer (though it needs comments).

Well, somebody would have to work it out fully and test it -- I can't
spend more time on this issue. If somebody is interested in doing that,
I used this little program and make sure that it "zeroes" all pages, for
various block sizes, initial offsets and "step sizes" (#members in each
multi) -- I was able to reproduce Serge's issues with the original
coding, and then watch issues fly by as I tried several approaches until
I settled on the patch as submitted.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
multixact.c text/x-csrc 3.4 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Keith Fiske 2014-06-06 20:22:57 Re: BUG #10533: 9.4 beta1 assertion failure in autovacuum process
Previous Message Andres Freund 2014-06-06 17:16:56 Re: BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-06-06 18:51:59 Re: Proposing pg_hibernate
Previous Message Alvaro Herrera 2014-06-06 17:18:24 Re: Re: popen and pclose redefinitions causing many warning in Windows build