pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix rare dsa_allocate() failures due to freepage.c corruption.
Date: Wed, 13 Feb 2019 00:49:18 +0000
Message-ID: <E1gtijm-0000UQ-8z@gemulon.postgresql.org> (raw)

Fix rare dsa_allocate() failures due to freepage.c corruption.

In a corner case, a btree page was allocated during a clean-up operation
that could cause the tracking of the largest contiguous span of free
space to get out of whack.  That was supposed to be prevented by the use
of the "soft" flag to avoid allocating internal pages during incidental
clean-up work, but the flag was ignored in the case where the FPM was
promoted from singleton format to btree format.  Repair.

Remove an obsolete comment in passing.

Back-patch to 10, where freepage.c arrived (as support for dsa.c).

Author: Robert Haas
Diagnosed-by: Thomas Munro and Robert Haas
Reported-by: Justin Pryzby, Rick Otten, Sand Stone, Arne Roland and others
Discussion: https://postgr.es/m/CAMAYy4%2Bw3NTBM5JLWFi8twhWK4%3Dk_5L4nV5%2BbYDSPu8r4b97Zg%40mail.gmail.com

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/utils/mmgr/freepage.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1gtijm-0000UQ-8z@gemulon.postgresql.org>
Permalink:  ../E1gtijm-0000UQ-8z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gtijm-0000UQ-8z@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Fix rare dsa_allocate() failures due to freepage.c corruption.
  In-Reply-To: <E1gtijm-0000UQ-8z@gemulon.postgresql.org>
  References: <E1gtijm-0000UQ-8z@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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