pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Don't use _mdfd_getseg() in mdsyncfiletag().
2+ messages / 1 participants
[nested] [flat]

* pgsql: Don't use _mdfd_getseg() in mdsyncfiletag().
@ 2019-12-14 03:48  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Thomas Munro @ 2019-12-14 03:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't use _mdfd_getseg() in mdsyncfiletag().

_mdfd_getseg() opens all segments up to the requested one.  That
causes problems for mdsyncfiletag(), if mdunlinkfork() has
already unlinked other segment files.  Open the file we want
directly by name instead, if it's not already open.

The consequence of this bug was a rare panic in the checkpointer,
made more likely if you saturated the sync request queue so that
the SYNC_FORGET_REQUEST messages for a given relation were more
likely to be absorbed in separate cycles by the checkpointer.

Back-patch to 12.  Defect in commit 3eb77eba.

Author: Thomas Munro
Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/20191119115759.GI30362%40telsasoft.com

Branch
------
master

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

Modified Files
--------------
src/backend/storage/smgr/md.c | 57 ++++++++++++++++++++++++++++++-------------
1 file changed, 40 insertions(+), 17 deletions(-)



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

* pgsql: Don't use _mdfd_getseg() in mdsyncfiletag().
@ 2019-12-14 03:48  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Thomas Munro @ 2019-12-14 03:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't use _mdfd_getseg() in mdsyncfiletag().

_mdfd_getseg() opens all segments up to the requested one.  That
causes problems for mdsyncfiletag(), if mdunlinkfork() has
already unlinked other segment files.  Open the file we want
directly by name instead, if it's not already open.

The consequence of this bug was a rare panic in the checkpointer,
made more likely if you saturated the sync request queue so that
the SYNC_FORGET_REQUEST messages for a given relation were more
likely to be absorbed in separate cycles by the checkpointer.

Back-patch to 12.  Defect in commit 3eb77eba.

Author: Thomas Munro
Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/20191119115759.GI30362%40telsasoft.com

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/backend/storage/smgr/md.c | 57 ++++++++++++++++++++++++++++++-------------
1 file changed, 40 insertions(+), 17 deletions(-)



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


end of thread, other threads:[~2019-12-14 03:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-14 03:48 pgsql: Don't use _mdfd_getseg() in mdsyncfiletag(). Thomas Munro <tmunro@postgresql.org>
2019-12-14 03:48 pgsql: Don't use _mdfd_getseg() in mdsyncfiletag(). Thomas Munro <tmunro@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