summaryrefslogtreecommitdiff
path: root/src/tools/pgindent
diff options
context:
space:
mode:
authorAmit Kapila2023-09-12 04:06:56 +0000
committerAmit Kapila2023-09-12 04:06:56 +0000
commitfeb4e218e5f9d8ec2d0c6f2eac28ad786ea9d79c (patch)
tree4bb5ca2c9944b071cbf07a623c5df853bfa24c6c /src/tools/pgindent
parent0aeadb4f7974189ca057830f8c0e424f70e4cf70 (diff)
Fix uninitialized access to InitialRunningXacts during decoding after ERROR.
The transactions and subtransactions array that was allocated under snapshot builder memory context and recorded during decoding was not cleared in case of errors. This can result in an assertion failure if we attempt to retry logical decoding within the same session. To address this issue, we register a callback function under the snapshot builder memory context to clear the recorded transactions and subtransactions array along with the context. This problem doesn't exist in PG16 and HEAD as instead of using InitialRunningXacts, we added the list of transaction IDs and sub-transaction IDs, that have modified catalogs and are running during snapshot serialization, to the serialized snapshot (see commit 7f13ac8123). Author: Hou Zhijie Reviewed-by: Amit Kapila Backpatch-through: 11 Discussion: http://postgr.es/m/18055-ab3beed9f4b7b7d6@postgresql.org
Diffstat (limited to 'src/tools/pgindent')
0 files changed, 0 insertions, 0 deletions