pgsql: Prevent re-use of a deleted relation's relfilenode until after

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Prevent re-use of a deleted relation's relfilenode until after
Date: 2007-11-15 20:36:40
Message-ID: 20071115203640.F1B757540F0@cvs.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Prevent re-use of a deleted relation's relfilenode until after the next
checkpoint. This guards against an unlikely data-loss scenario in which
we re-use the relfilenode, then crash, then replay the deletion and
recreation of the file. Even then we'd be OK if all insertions into the
new relation had been WAL-logged ... but that's not guaranteed given all
the no-WAL-logging optimizations that have recently been added.

Patch by Heikki Linnakangas, per a discussion last month.

Modified Files:
--------------
pgsql/src/backend/access/transam:
xlog.c (r1.286 -> r1.287)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.286&r2=1.287)
pgsql/src/backend/commands:
tablespace.c (r1.49 -> r1.50)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablespace.c?r1=1.49&r2=1.50)
pgsql/src/backend/storage/smgr:
md.c (r1.129 -> r1.130)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/md.c?r1=1.129&r2=1.130)
smgr.c (r1.106 -> r1.107)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/smgr.c?r1=1.106&r2=1.107)
pgsql/src/include/storage:
smgr.h (r1.59 -> r1.60)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/smgr.h?r1=1.59&r2=1.60)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2007-11-15 20:38:15 pgsql: Translation updates
Previous Message Peter Eisentraut 2007-11-15 20:21:05 pgsql: Update config.guess and config.sub