diff options
| author | Simon Riggs | 2010-01-09 16:49:27 +0000 |
|---|---|---|
| committer | Simon Riggs | 2010-01-09 16:49:27 +0000 |
| commit | 42edbd16fbfa95883b6c8449c9e567500514381c (patch) | |
| tree | 5ad03385bc395a4cd7cb8797f4bfc40b1a122e64 /src/include | |
| parent | 510f3502ebb43afd3e05fa5b67352fe5a6db20bc (diff) | |
During Hot Standby, set DatabasePath correctly during relcache init file
deletion, so that we attempt to unlink the correct filepath. unlink()
errors are ignorable there, so lack of a DatabasePath initialization step
did not cause visible problems until a related bug showed up on Solaris.
Code refactored from xact_redo_commit() to
ProcessCommittedInvalidationMessages() in inval.c. Recovery may replay
shared invalidation messages for many databases, so we cannot
SetDatabasePath() once as we do in normal backends. Read the databaseid
from the shared invalidation messages, then set DatabasePath
temporarily before calling RelationCacheInitFileInvalidate().
Problem report by Robert Treat, analysis and fix by me.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/sinval.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h index 2105c637236..9f7bb2b2eea 100644 --- a/src/include/storage/sinval.h +++ b/src/include/storage/sinval.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/sinval.h,v 1.55 2010/01/02 16:58:08 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/sinval.h,v 1.56 2010/01/09 16:49:27 sriggs Exp $ * *------------------------------------------------------------------------- */ @@ -102,5 +102,7 @@ extern bool DisableCatchupInterrupt(void); extern int xactGetCommittedInvalidationMessages(SharedInvalidationMessage **msgs, bool *RelcacheInitFileInval); +extern void ProcessCommittedInvalidationMessages(SharedInvalidationMessage *msgs, + int nmsgs, bool RelcacheInitFileInval); #endif /* SINVAL_H */ |
