pgsql: Drop no-longer-needed buffers during ALTER DATABASE SET TABLESPA

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Drop no-longer-needed buffers during ALTER DATABASE SET TABLESPA
Date: 2014-11-04 18:25:17
Message-ID: E1Xlin7-0003wJ-Kw@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Drop no-longer-needed buffers during ALTER DATABASE SET TABLESPACE.

The previous coding assumed that we could just let buffers for the
database's old tablespace age out of the buffer arena naturally.
The folly of that is exposed by bug #11867 from Marc Munro: the user could
later move the database back to its original tablespace, after which any
still-surviving buffers would match lookups again and appear to contain
valid data. But they'd be missing any changes applied while the database
was in the new tablespace.

This has been broken since ALTER SET TABLESPACE was introduced, so
back-patch to all supported branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/33f80f8480434f02beb940b8f0627d534f3fd3af

Modified Files
--------------
src/backend/commands/dbcommands.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2014-11-04 21:15:33 pgsql: doc: Move misplaced paragraph
Previous Message Heikki Linnakangas 2014-11-04 09:46:45 pgsql: Remove support for 64-bit CRC.