Re: [COMMITTERS] pgsql: Release note updates.

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Release note updates.
Date: 2017-02-07 18:00:50
Message-ID: CABOikdOCLDQ0iUnGLRHsy7NKX6iqVdSOWVBBjDv9KKKMf4Ecng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Feb 7, 2017 at 9:29 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-02-07 20:13:52 pgsql: Fix compiler warning.
Previous Message Robert Haas 2017-02-07 17:40:39 pgsql: Cache hash index's metapage in rel->rd_amcache.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-02-07 18:03:14 Re: Idea on how to simplify comparing two sets
Previous Message Erik Rijkers 2017-02-07 17:51:42 Re: Cache Hash Index meta page.