pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
@ 2015-05-13 07:16  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 5+ messages in thread

From: Heikki Linnakangas @ 2015-05-13 07:16 UTC (permalink / raw)
  To: pgsql-committers

Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.

Commit 81c45081 introduced a new RBM_ZERO_AND_LOCK mode to ReadBuffer, which
takes a lock on the buffer before zeroing it. However, you cannot take a
lock on a local buffer, and you got a segfault instead. The version of that
patch committed to master included a check for !isLocalBuf, and therefore
didn't crash, but oddly I missed that in the back-patched versions. This
patch adds that check to the back-branches too.

RBM_ZERO_AND_LOCK mode is only used during WAL replay, and in hash indexes.
WAL replay only deals with shared buffers, so the only way to trigger the
bug is with a temporary hash index.

Reported by Artem Ignatyev, analysis by Tom Lane.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f6c4a8690c9374be828c7fca4c2b6199f39b27fa

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
@ 2015-05-13 07:16  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 5+ messages in thread

From: Heikki Linnakangas @ 2015-05-13 07:16 UTC (permalink / raw)
  To: pgsql-committers

Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.

Commit 81c45081 introduced a new RBM_ZERO_AND_LOCK mode to ReadBuffer, which
takes a lock on the buffer before zeroing it. However, you cannot take a
lock on a local buffer, and you got a segfault instead. The version of that
patch committed to master included a check for !isLocalBuf, and therefore
didn't crash, but oddly I missed that in the back-patched versions. This
patch adds that check to the back-branches too.

RBM_ZERO_AND_LOCK mode is only used during WAL replay, and in hash indexes.
WAL replay only deals with shared buffers, so the only way to trigger the
bug is with a temporary hash index.

Reported by Artem Ignatyev, analysis by Tom Lane.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/96b676cc66c5a60a522364487bf7c7a9593bb229

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
@ 2015-05-13 07:16  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 5+ messages in thread

From: Heikki Linnakangas @ 2015-05-13 07:16 UTC (permalink / raw)
  To: pgsql-committers

Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.

Commit 81c45081 introduced a new RBM_ZERO_AND_LOCK mode to ReadBuffer, which
takes a lock on the buffer before zeroing it. However, you cannot take a
lock on a local buffer, and you got a segfault instead. The version of that
patch committed to master included a check for !isLocalBuf, and therefore
didn't crash, but oddly I missed that in the back-patched versions. This
patch adds that check to the back-branches too.

RBM_ZERO_AND_LOCK mode is only used during WAL replay, and in hash indexes.
WAL replay only deals with shared buffers, so the only way to trigger the
bug is with a temporary hash index.

Reported by Artem Ignatyev, analysis by Tom Lane.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1a99d392c13e457dd02385bdf4da7687eb2be237

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
@ 2015-05-13 07:16  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 5+ messages in thread

From: Heikki Linnakangas @ 2015-05-13 07:16 UTC (permalink / raw)
  To: pgsql-committers

Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.

Commit 81c45081 introduced a new RBM_ZERO_AND_LOCK mode to ReadBuffer, which
takes a lock on the buffer before zeroing it. However, you cannot take a
lock on a local buffer, and you got a segfault instead. The version of that
patch committed to master included a check for !isLocalBuf, and therefore
didn't crash, but oddly I missed that in the back-patched versions. This
patch adds that check to the back-branches too.

RBM_ZERO_AND_LOCK mode is only used during WAL replay, and in hash indexes.
WAL replay only deals with shared buffers, so the only way to trigger the
bug is with a temporary hash index.

Reported by Artem Ignatyev, analysis by Tom Lane.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/462a2f1f019fa16087fe2f59e96e339a703923b2

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
@ 2015-05-13 07:16  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 5+ messages in thread

From: Heikki Linnakangas @ 2015-05-13 07:16 UTC (permalink / raw)
  To: pgsql-committers

Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.

Commit 81c45081 introduced a new RBM_ZERO_AND_LOCK mode to ReadBuffer, which
takes a lock on the buffer before zeroing it. However, you cannot take a
lock on a local buffer, and you got a segfault instead. The version of that
patch committed to master included a check for !isLocalBuf, and therefore
didn't crash, but oddly I missed that in the back-patched versions. This
patch adds that check to the back-branches too.

RBM_ZERO_AND_LOCK mode is only used during WAL replay, and in hash indexes.
WAL replay only deals with shared buffers, so the only way to trigger the
bug is with a temporary hash index.

Reported by Artem Ignatyev, analysis by Tom Lane.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bd1cfde70e0f6165cd794488e88a57df9c233b43

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c |    3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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


end of thread, other threads:[~2015-05-13 07:16 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13 07:16 pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2015-05-13 07:16 pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2015-05-13 07:16 pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2015-05-13 07:16 pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2015-05-13 07:16 pgsql: Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers. Heikki Linnakangas <heikki.linnakangas@iki.fi>

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