aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-06-06 18:56:28 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-06-06 18:56:28 +0300
commite6cd85772647099563da5ada53bd6ab7d096ce00 (patch)
treeb0f9135f14ac914e5d2621b37ce052896f4e6413 /contrib/postgres_fdw/postgres_fdw.c
parent505c008ca37c4f6f2fffcde370b5d8354c4d4dc3 (diff)
downloadpostgresql-e6cd85772647099563da5ada53bd6ab7d096ce00.tar.gz
postgresql-e6cd85772647099563da5ada53bd6ab7d096ce00.zip
Make RelationFlushRelation() work without ResourceOwner during abort
ReorderBufferImmediateInvalidation() executes invalidation messages in an aborted transaction. However, RelationFlushRelation sometimes required a valid resource owner, to temporarily increment the refcount of the relache entry. Commit b8bff07daa worked around that in the main subtransaction abort function, AbortSubTransaction(), but missed this similar case in ReorderBufferImmediateInvalidation(). To fix, introduce a separate function to invalidate a relcache entry. It does the same thing as RelationClearRelation(rebuild==true) does when outside a transaction, but can be called without incrementing the refcount. Add regression test. Before this fix, it failed with: ERROR: ResourceOwnerEnlarge called after release started Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://www.postgresql.org/message-id/e56be7d9-14b1-664d-0bfc-00ce9772721c@gmail.com
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions