Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/backend/catalog/ag_catalog.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ is_age_extension_exists(void)
{
static bool callback_registered = false;

/*
* Outside a live transaction (the ROLLBACK of a failed one) the catalog
* must not be read: the resource owner is already released, and the locks
* a catalog scan takes here would leak into the PGPROC. Nothing is cached,
* so the next live transaction asks the catalog again.
*/
if (!IsTransactionState())
return false;

if (extension_cache_is_valid)
return age_extension_exists;

Expand Down
Loading