summaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorCédric Villemain2011-05-13 20:55:39 +0000
committerCédric Villemain2011-05-13 20:55:39 +0000
commite0c3b474d5436c7874aef36988f2646bdb890249 (patch)
tree49c41d2b8abbd9bae4096643d840859f3a02a08c /src/backend/access
parent40cefa392974c73ec20deb3c15fb5111ed7fad17 (diff)
parent9bb6d9795253bb521f81c626fea49a704a369ca9 (diff)
Merge branch 'master' into analyze_cacheanalyze_cache
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/transam/clog.c4
-rw-r--r--src/backend/access/transam/varsup.c5
-rw-r--r--src/backend/access/transam/xact.c7
-rw-r--r--src/backend/access/transam/xlog.c9
4 files changed, 13 insertions, 12 deletions
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index df0f15679f..d3de8934ee 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -431,8 +431,8 @@ CLOGShmemInit(void)
/*
* This func must be called ONCE on system install. It creates
* the initial CLOG segment. (The CLOG directory is assumed to
- * have been created by the initdb shell script, and CLOGShmemInit
- * must have been called already.)
+ * have been created by initdb, and CLOGShmemInit must have been
+ * called already.)
*/
void
BootStrapCLOG(void)
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index 500335bd6f..555bb134f5 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -21,7 +21,6 @@
#include "miscadmin.h"
#include "postmaster/autovacuum.h"
#include "storage/pmsignal.h"
-#include "storage/predicate.h"
#include "storage/proc.h"
#include "utils/builtins.h"
#include "utils/syscache.h"
@@ -162,10 +161,6 @@ GetNewTransactionId(bool isSubXact)
ExtendCLOG(xid);
ExtendSUBTRANS(xid);
- /* If it's top level, the predicate locking system also needs to know. */
- if (!isSubXact)
- RegisterPredicateLockingXid(xid);
-
/*
* Now advance the nextXid counter. This must not happen until after we
* have successfully completed ExtendCLOG() --- if that routine fails, we
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 8a4c4eccd7..2ca1c14549 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -455,6 +455,13 @@ AssignTransactionId(TransactionState s)
SubTransSetParent(s->transactionId, s->parent->transactionId, false);
/*
+ * If it's a top-level transaction, the predicate locking system needs to
+ * be told about it too.
+ */
+ if (!isSubXact)
+ RegisterPredicateLockingXid(s->transactionId);
+
+ /*
* Acquire lock on the transaction XID. (We assume this cannot block.) We
* have to ensure that the lock is assigned to the transaction's own
* ResourceOwner.
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index b0e4c41d6f..e71090f71b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6611,12 +6611,11 @@ StartupXLOG(void)
}
/*
- * If we launched a WAL receiver, it should be gone by now. It will trump
- * over the startup checkpoint and subsequent records if it's still alive,
- * so be extra sure that it's gone.
+ * Kill WAL receiver, if it's still running, before we continue to write
+ * the startup checkpoint record. It will trump over the checkpoint and
+ * subsequent records if it's still alive when we start writing WAL.
*/
- if (WalRcvInProgress())
- elog(PANIC, "wal receiver still active");
+ ShutdownWalRcv();
/*
* We don't need the latch anymore. It's not strictly necessary to disown