From: Heikki Linnakangas Date: Thu, 25 Jun 2009 19:05:52 +0000 (+0000) Subject: The code to unlink dropped relations in FinishPreparedTransaction() was X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=ea31f746323e66dcb50879823ed4753d863e785f;p=users%2Fsimon%2Fpostgres.git The code to unlink dropped relations in FinishPreparedTransaction() was acting like runs inside WAL recovery, but it doesn't. I must've copy-pasted this from a redo-function in the relation forks patch. Noticed by Tom Lane while he was looking through callers of smgrdounlink(). --- diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index c6aaecae0d..9434f8ff2e 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -1241,10 +1241,7 @@ FinishPreparedTransaction(const char *gid, bool isCommit) for (fork = 0; fork <= MAX_FORKNUM; fork++) { if (smgrexists(srel, fork)) - { - XLogDropRelation(delrels[i], fork); - smgrdounlink(srel, fork, false, true); - } + smgrdounlink(srel, fork, false, false); } smgrclose(srel); }