From: Pavan Deolasee <pavan.deolasee@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Release note updates.
Date: Tue, 7 Feb 2017 23:30:50 +0530
Message-ID: <CABOikdOCLDQ0iUnGLRHsy7NKX6iqVdSOWVBBjDv9KKKMf4Ecng@mail.gmail.com> (raw)
In-Reply-To: <20170207155931.vgzv5umuyfvp4bqz@alvherre.pgsql>
References: <20170207152309.szeiqnprt2kzij66@alvherre.pgsql>
<20170207155931.vgzv5umuyfvp4bqz@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Tue, Feb 7, 2017 at 9:29 PM, Alvaro Herrera <alvherre@2ndquadrant.com>
wrote:
> Alvaro Herrera wrote:
>
> >
> > Hmm. Now that I think about it, it is probably possible to have a
> > transaction started before CIC that inserted a bunch of rows, and then
> > runs the UPDATE during the CIC race window. Maybe there's a reason the
> > bug wouldn't hit in that case but I don't see it, and I'm not able to
> > test it right now to verify.
>
> Pavan adds that it's possible to have a transaction do INSERT while CIC
> is running, then some other transaction executes the UPDATE.
>
>
Just to elaborate on that, once a backend ends up with stale cached
bitmaps, AFAICS only a second relcache flush can correct that. This may not
come for long time. In fact since CIC is already holding a lock on the
table, I think second relcache flush will only happen at the end of phase
2. This can take a long time, especially for very large tables. In
meanwhile, the compromised backend can run many transactions with the stale
information. Those transactions can see not only the existing rows, but
also new rows inserted by other new but now committed-good transactions.
It's all theory and I haven't had time to try this out.
Thanks,
Pavan
--
Pavan Deolasee http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pavan.deolasee@gmail.com, alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Release note updates.
In-Reply-To: <CABOikdOCLDQ0iUnGLRHsy7NKX6iqVdSOWVBBjDv9KKKMf4Ecng@mail.gmail.com>
References: <20170207152309.szeiqnprt2kzij66@alvherre.pgsql> <20170207155931.vgzv5umuyfvp4bqz@alvherre.pgsql> <CABOikdOCLDQ0iUnGLRHsy7NKX6iqVdSOWVBBjDv9KKKMf4Ecng@mail.gmail.com>
* 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