Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Commit

Permalink
Add an IsTransactionState check to IsPgPaxosActive to prevent
Browse files Browse the repository at this point in the history
it from opening the catalog outside of a transaction.

Fixes #10
  • Loading branch information
marcoslot committed Apr 21, 2016
1 parent 3fea249 commit 4cee0d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pg_paxos.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ IsPgPaxosActive(void)
return false;
}

if (!IsTransactionState())
{
return false;
}

extensionOid = get_extension_oid(PG_PAXOS_EXTENSION_NAME, missingOK);
if (extensionOid == InvalidOid)
{
Expand Down

0 comments on commit 4cee0d9

Please sign in to comment.