From 4cee0d9620bf735ecf4bf305635b9ab079b64ca3 Mon Sep 17 00:00:00 2001 From: Marco Slot Date: Thu, 21 Apr 2016 12:40:31 +0200 Subject: [PATCH] Add an IsTransactionState check to IsPgPaxosActive to prevent it from opening the catalog outside of a transaction. Fixes #10 --- src/pg_paxos.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pg_paxos.c b/src/pg_paxos.c index 2f566c9..2b50695 100644 --- a/src/pg_paxos.c +++ b/src/pg_paxos.c @@ -265,6 +265,11 @@ IsPgPaxosActive(void) return false; } + if (!IsTransactionState()) + { + return false; + } + extensionOid = get_extension_oid(PG_PAXOS_EXTENSION_NAME, missingOK); if (extensionOid == InvalidOid) {