git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f204274)
Marginal cleanup in arrangements for ensuring StrategyHintVacuum is cleared
2006年9月17日 22:16:22 +0000 (22:16 +0000)
2006年9月17日 22:16:22 +0000 (22:16 +0000)
after an error during VACUUM. We have a PG_TRY block anyway around the only
call sites, so just reset it in the CATCH clause instead of having
AtEOXact_Buffers blindly do it during xact end. I think the old code was
actively wrong for the case of a failure during ANALYZE inside a
subtransaction --- the flag wouldn't get cleared until main transaction end.
Probably not worth back-patching though.


diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 8c1df23d9b094a03742668cdc4323e42cd92f3d1..4ba48d34df4302bb98e50e19d0d838f7738a3121 100644 (file)
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.338 2006年08月18日 16:09:08 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.339 2006年09月17日 22:16:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -460,6 +460,8 @@ vacuum(VacuumStmt *vacstmt, List *relids)
{
/* Make sure cost accounting is turned off after error */
VacuumCostActive = false;
+ /* And reset buffer replacement strategy, too */
+ StrategyHintVacuum(false);
PG_RE_THROW();
}
PG_END_TRY();
@@ -1173,8 +1175,6 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, char expected_relkind)
* Now release the session-level lock on the master table.
*/
UnlockRelationIdForSession(&onerelid, lmode);
-
- return;
}
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index fd68bb91e77394dc2ec75abf50bbabed1f4ef3fc..147b2ef8d8ba85b099b9ac0ecdba47e7c266ef5d 100644 (file)
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.209 2006年07月23日 03:07:58 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.210 2006年09月17日 22:16:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1171,9 +1171,6 @@ AtEOXact_Buffers(bool isCommit)
#endif
AtEOXact_LocalBuffers(isCommit);
-
- /* Make sure we reset the strategy hint in case VACUUM errored out */
- StrategyHintVacuum(false);
}
/*
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /