pgsql: Fix uninitialized access to InitialRunningXacts during decoding

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема pgsql: Fix uninitialized access to InitialRunningXacts during decoding
Дата
Msg-id E1qfvRe-003S20-NY@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7e57208ed51a9f29e7e1a5d103452bc0e54f5a96

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Make recovery report error message when invalid page header is f
Следующее
От: noreply@postgresql.org
Дата:
Сообщение: pgsql: Tag refs/tags/REL_16_0 was created