pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Maintain valid md.c state when FileClose() fails.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Maintain valid md.c state when FileClose() fails.
@ 2020-01-11 02:34 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2020-01-11 02:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Maintain valid md.c state when FileClose() fails.

FileClose() failure ordinarily causes a PANIC.  Suppose the user
disables that PANIC via data_sync_retry=on.  After mdclose() issued a
FileClose() that failed, calls into md.c raised SIGSEGV.  This fix adds
repalloc() calls during mdclose(); update a comment about ignoring
repalloc() cost.  The rate of relation segment count change is a minor
factor; more relevant to overall performance is the rate of mdclose()
and subsequent re-opening of segments.  Back-patch to v10, where commit
45e191e3aa62d47a8bc1a33f784286b2051f45cb introduced the bug.

Reviewed by Kyotaro Horiguchi.

Discussion: https://postgr.es/m/20191222091930.GA1280238@rfd.leadboat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/38fc056074e034087af8a1589507631682a279d1

Modified Files
--------------
src/backend/storage/smgr/md.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)



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

* pgsql: Maintain valid md.c state when FileClose() fails.
@ 2020-01-11 02:34 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2020-01-11 02:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Maintain valid md.c state when FileClose() fails.

FileClose() failure ordinarily causes a PANIC.  Suppose the user
disables that PANIC via data_sync_retry=on.  After mdclose() issued a
FileClose() that failed, calls into md.c raised SIGSEGV.  This fix adds
repalloc() calls during mdclose(); update a comment about ignoring
repalloc() cost.  The rate of relation segment count change is a minor
factor; more relevant to overall performance is the rate of mdclose()
and subsequent re-opening of segments.  Back-patch to v10, where commit
45e191e3aa62d47a8bc1a33f784286b2051f45cb introduced the bug.

Reviewed by Kyotaro Horiguchi.

Discussion: https://postgr.es/m/20191222091930.GA1280238@rfd.leadboat.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/93078e63f77979df3752e8ef5392dd384117e0ef

Modified Files
--------------
src/backend/storage/smgr/md.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)



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

* pgsql: Maintain valid md.c state when FileClose() fails.
@ 2020-01-11 02:34 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2020-01-11 02:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Maintain valid md.c state when FileClose() fails.

FileClose() failure ordinarily causes a PANIC.  Suppose the user
disables that PANIC via data_sync_retry=on.  After mdclose() issued a
FileClose() that failed, calls into md.c raised SIGSEGV.  This fix adds
repalloc() calls during mdclose(); update a comment about ignoring
repalloc() cost.  The rate of relation segment count change is a minor
factor; more relevant to overall performance is the rate of mdclose()
and subsequent re-opening of segments.  Back-patch to v10, where commit
45e191e3aa62d47a8bc1a33f784286b2051f45cb introduced the bug.

Reviewed by Kyotaro Horiguchi.

Discussion: https://postgr.es/m/20191222091930.GA1280238@rfd.leadboat.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2e86e154da23b3067fa579b530a8f057be6a391e

Modified Files
--------------
src/backend/storage/smgr/md.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)



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

* pgsql: Maintain valid md.c state when FileClose() fails.
@ 2020-01-11 02:34 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2020-01-11 02:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Maintain valid md.c state when FileClose() fails.

FileClose() failure ordinarily causes a PANIC.  Suppose the user
disables that PANIC via data_sync_retry=on.  After mdclose() issued a
FileClose() that failed, calls into md.c raised SIGSEGV.  This fix adds
repalloc() calls during mdclose(); update a comment about ignoring
repalloc() cost.  The rate of relation segment count change is a minor
factor; more relevant to overall performance is the rate of mdclose()
and subsequent re-opening of segments.  Back-patch to v10, where commit
45e191e3aa62d47a8bc1a33f784286b2051f45cb introduced the bug.

Reviewed by Kyotaro Horiguchi.

Discussion: https://postgr.es/m/20191222091930.GA1280238@rfd.leadboat.com

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/storage/smgr/md.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)



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


end of thread, other threads:[~2020-01-11 02:34 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-11 02:34 pgsql: Maintain valid md.c state when FileClose() fails. Noah Misch <noah@leadboat.com>
2020-01-11 02:34 pgsql: Maintain valid md.c state when FileClose() fails. Noah Misch <noah@leadboat.com>
2020-01-11 02:34 pgsql: Maintain valid md.c state when FileClose() fails. Noah Misch <noah@leadboat.com>
2020-01-11 02:34 pgsql: Maintain valid md.c state when FileClose() fails. Noah Misch <noah@leadboat.com>

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