From 8efc13140e80f51f1033d9fa22b302409edad06c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 13 Mar 2008 18:00:39 +0000 Subject: Fix heap_page_prune's problem with failing to send cache invalidation messages if the calling transaction aborts later on. Collapsing out line pointer redirects is a done deal as soon as we complete the page update, so syscache *must* be notified even if the VACUUM FULL as a whole doesn't complete. To fix, add some functionality to inval.c to allow the pending inval messages to be sent immediately while heap_page_prune is still running. The implementation is a bit chintzy: it will only work in the context of VACUUM FULL. But that's all we need now, and it can always be extended later if needed. Per my trouble report of a week ago. --- src/include/utils/inval.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index df0e5f397b3..a8a5ff0b410 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/inval.h,v 1.41 2008/01/01 19:45:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/inval.h,v 1.41.2.1 2008/03/13 18:00:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,10 @@ extern void PostPrepare_Inval(void); extern void CommandEndInvalidationMessages(void); +extern void BeginNonTransactionalInvalidation(void); + +extern void EndNonTransactionalInvalidation(void); + extern void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple); extern void CacheInvalidateRelcache(Relation relation); -- cgit v1.2.3