pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Serge Negodyuck <petr@petrovich.kiev.ua>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby
Date: Fri, 6 Jun 2014 19:16:56 +0200
Message-ID: <20140606171656.GF10482@alap3.anarazel.de> (raw )
In-Reply-To: <6687.1402074269@sss.pgh.pa.us >
References: <20131209142525.GA1123@awork2.anarazel.de >
<CABKyZDFWn+ty_m88sq2j5UThowb2Qwd0125BNx_19va2Fn57dQ@mail.gmail.com >
<20131209150345.GB1123@awork2.anarazel.de >
<CABKyZDFRtDzcY1=sEznC2ivmcM5p1yPQvC8qLL8XLviNF2kp7A@mail.gmail.com >
<20131209182701.GD9519@awork2.anarazel.de >
<20140103014616.GB7035@eldon.alvh.no-ip.org >
<CABKyZDEV49nUYJej9Hv-hPUS=VUmMt1LmVV=YW=fV5X8nKtdtw@mail.gmail.com >
<20140606013943.GT5146@eldon.alvh.no-ip.org >
<20140606164727.GU5146@eldon.alvh.no-ip.org >
<6687.1402074269@sss.pgh.pa.us >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2014-06-06 13:04:29 -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.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.
offset is a (via typedefs) uint32 and unsigned overflow is defined in
the C standard, so that shouldn't be a allowed optimization. Don't we
already have a fair amount of similar tests around? Around TransactionId
wraparound for exzmple:
xidWrapLimit = oldest_datfrozenxid + (MaxTransactionId >> 1);
if (xidWrapLimit < FirstNormalTransactionId)
xidWrapLimit += FirstNormalTransactionId;
and similar things.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
view thread (35+ messages) latest in thread
Message-ID: <20140606171656.GF10482@alap3.anarazel.de>
Permalink: ../20140606171656.GF10482@alap3.anarazel.de/
Also on: postgresql.org/message-id/20140606171656.GF10482@alap3.anarazel.de
copy link · copy postgr.es
reply 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-hackers@postgresql.org
Cc: andres@2ndquadrant.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, petr@petrovich.kiev.ua, pgsql-bugs@postgresql.org
Subject: Re: BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby
In-Reply-To: <20140606171656.GF10482@alap3.anarazel.de>
* 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