mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 11:51:24 +02:00
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().
This commit is contained in:
parent
8fd733bd19
commit
ebaa1952f1
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.53 2009/06/11 14:48:54 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.54 2009/06/25 19:05:52 heikki Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Each global transaction is associated with a global transaction
|
* Each global transaction is associated with a global transaction
|
||||||
@ -1241,10 +1241,7 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
|
|||||||
for (fork = 0; fork <= MAX_FORKNUM; fork++)
|
for (fork = 0; fork <= MAX_FORKNUM; fork++)
|
||||||
{
|
{
|
||||||
if (smgrexists(srel, fork))
|
if (smgrexists(srel, fork))
|
||||||
{
|
smgrdounlink(srel, fork, false, false);
|
||||||
XLogDropRelation(delrels[i], fork);
|
|
||||||
smgrdounlink(srel, fork, false, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
smgrclose(srel);
|
smgrclose(srel);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user