mirror of
https://github.com/postgres/postgres.git
synced 2026-03-09 01:31:22 -04:00
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.
62 lines
1.6 KiB
C
62 lines
1.6 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* inval.h
|
|
* POSTGRES cache invalidation dispatcher definitions.
|
|
*
|
|
*
|
|
* 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.42 2008/03/13 18:00:32 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef INVAL_H
|
|
#define INVAL_H
|
|
|
|
#include "access/htup.h"
|
|
#include "utils/rel.h"
|
|
|
|
|
|
typedef void (*CacheCallbackFunction) (Datum arg, Oid relid);
|
|
|
|
|
|
extern void AcceptInvalidationMessages(void);
|
|
|
|
extern void AtStart_Inval(void);
|
|
|
|
extern void AtSubStart_Inval(void);
|
|
|
|
extern void AtEOXact_Inval(bool isCommit);
|
|
|
|
extern void AtEOSubXact_Inval(bool isCommit);
|
|
|
|
extern void AtPrepare_Inval(void);
|
|
|
|
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);
|
|
|
|
extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
|
|
|
|
extern void CacheInvalidateRelcacheByRelid(Oid relid);
|
|
|
|
extern void CacheRegisterSyscacheCallback(int cacheid,
|
|
CacheCallbackFunction func,
|
|
Datum arg);
|
|
|
|
extern void CacheRegisterRelcacheCallback(CacheCallbackFunction func,
|
|
Datum arg);
|
|
|
|
extern void inval_twophase_postcommit(TransactionId xid, uint16 info,
|
|
void *recdata, uint32 len);
|
|
|
|
#endif /* INVAL_H */
|