pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix page modification outside of critical section in GIN
7+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2020-02-09 4093ff5737 baf487123a f91706b00c  Store the deletion horizon XID for a deleted GIN page on the right page.
* pgsql: Fix page modification outside of critical section in GIN
@ 2019-11-19 21:19  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 1 reply; 7+ messages in thread

From: Alexander Korotkov @ 2019-11-19 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix page modification outside of critical section in GIN

By oversight 52ac6cd2d0 makes ginDeletePage() sets pd_prune_xid of page to be
deleted before entering the critical section.  It appears that only versions 11
and later were affected by this oversight.

Backpatch-through: 11

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b107140804817cc30a4069b1bb5545aa3ea0ce6c

Modified Files
--------------
src/backend/access/gin/ginvacuum.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix page modification outside of critical section in GIN
@ 2019-11-19 21:19  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-11-19 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix page modification outside of critical section in GIN

By oversight 52ac6cd2d0 makes ginDeletePage() sets pd_prune_xid of page to be
deleted before entering the critical section.  It appears that only versions 11
and later were affected by this oversight.

Backpatch-through: 11

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a64e7e05a418ec26a76ecbf04c80e9ba7fe8aa90

Modified Files
--------------
src/backend/access/gin/ginvacuum.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix page modification outside of critical section in GIN
@ 2019-11-19 21:19  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alexander Korotkov @ 2019-11-19 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix page modification outside of critical section in GIN

By oversight 52ac6cd2d0 makes ginDeletePage() sets pd_prune_xid of page to be
deleted before entering the critical section.  It appears that only versions 11
and later were affected by this oversight.

Backpatch-through: 11

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7d467dee0831728de107ad15c5625bf97698d790

Modified Files
--------------
src/backend/access/gin/ginvacuum.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Fix page modification outside of critical section in GIN
@ 2020-02-07 18:06  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2020-02-07 18:06 UTC (permalink / raw)
  To: Alexander Korotkov <akorotkov@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

Alexander Korotkov <akorotkov@postgresql.org> writes:
> Fix page modification outside of critical section in GIN
> By oversight 52ac6cd2d0 makes ginDeletePage() sets pd_prune_xid of page to be
> deleted before entering the critical section.  It appears that only versions 11
> and later were affected by this oversight.

I happened to notice, while reviewing stuff for the release notes,
that this patch does not do what the commit message says.  The
previous code modified the pd_prune_xid of the "dBuffer" page,
but now it's modifying the pd_prune_xid of the "lBuffer" page.
Is that actually correct?  If it isn't, maybe you need to move
the GinPageSetDeleteXid call down a bit further, next to the
GinPageSetDeleted call (by which time the "page" variable has
been restored to the right thing).

Another idea which would be safer if a bit more invasive is to stop
using the single "page" variable for two purposes.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Fix page modification outside of critical section in GIN
@ 2020-02-09 17:05  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2020-02-09 17:05 UTC (permalink / raw)
  To: Alexander Korotkov <akorotkov@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

I wrote:
> Alexander Korotkov <akorotkov@postgresql.org> writes:
>> Fix page modification outside of critical section in GIN

> I happened to notice, while reviewing stuff for the release notes,
> that this patch does not do what the commit message says.  The
> previous code modified the pd_prune_xid of the "dBuffer" page,
> but now it's modifying the pd_prune_xid of the "lBuffer" page.
> Is that actually correct?

Since we're rapidly approaching the wrap deadline for this week's
releases, I took it upon myself to review this code more carefully,
and concluded that indeed it isn't correct.  I pushed a fix that
moves the GinPageSetDeleteXid call again.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Fix page modification outside of critical section in GIN
@ 2020-02-10 16:03  Alexander Korotkov <a.korotkov@postgrespro.ru>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Alexander Korotkov @ 2020-02-10 16:03 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers <pgsql-committers@lists.postgresql.org>

On Sun, Feb 9, 2020 at 8:05 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I wrote:
> > Alexander Korotkov <akorotkov@postgresql.org> writes:
> >> Fix page modification outside of critical section in GIN
>
> > I happened to notice, while reviewing stuff for the release notes,
> > that this patch does not do what the commit message says.  The
> > previous code modified the pd_prune_xid of the "dBuffer" page,
> > but now it's modifying the pd_prune_xid of the "lBuffer" page.
> > Is that actually correct?
>
> Since we're rapidly approaching the wrap deadline for this week's
> releases, I took it upon myself to review this code more carefully,
> and concluded that indeed it isn't correct.  I pushed a fix that
> moves the GinPageSetDeleteXid call again.

Sorry for delayed response.  Yes, my fix for oversight contain
oversight itself.  I confirm the fix you've committed is correct.
Thank you!

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: Fix page modification outside of critical section in GIN
@ 2020-02-10 16:08  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alexander Korotkov <a.korotkov@postgrespro.ru>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-02-10 16:08 UTC (permalink / raw)
  To: Alexander Korotkov <a.korotkov@postgrespro.ru>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers <pgsql-committers@lists.postgresql.org>

Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> Sorry for delayed response.  Yes, my fix for oversight contain
> oversight itself.  I confirm the fix you've committed is correct.
> Thank you!

Thanks for checking!

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-02-10 16:08 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 21:19 pgsql: Fix page modification outside of critical section in GIN Alexander Korotkov <akorotkov@postgresql.org>
2020-02-07 18:06 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-09 17:05   ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-10 16:03     ` Alexander Korotkov <a.korotkov@postgrespro.ru>
2020-02-10 16:08       ` Tom Lane <tgl@sss.pgh.pa.us>
2019-11-19 21:19 pgsql: Fix page modification outside of critical section in GIN Alexander Korotkov <akorotkov@postgresql.org>
2019-11-19 21:19 pgsql: Fix page modification outside of critical section in GIN Alexander Korotkov <akorotkov@postgresql.org>

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