aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2025-02-12 16:31:34 -0800
committerMasahiko Sawada <msawada@postgresql.org>2025-02-12 16:31:34 -0800
commit072ee847ad4c3fb52b0c24f7dddbe0798bd70c24 (patch)
treeb77b3f475ec5fb5e2e649ac0f6f4f38d9f57df01 /src/backend/access/gist/gistxlog.c
parent9e66a2b7841a5c1f929103c82c73244d3f5f3416 (diff)
downloadpostgresql-072ee847ad4c3fb52b0c24f7dddbe0798bd70c24.tar.gz
postgresql-072ee847ad4c3fb52b0c24f7dddbe0798bd70c24.zip
Skip logical decoding of already-aborted transactions.
Previously, transaction aborts were detected concurrently only during system catalog scans while replaying a transaction in streaming mode. This commit adds an additional CLOG lookup to check the transaction status, allowing the logical decoding to skip changes also when it doesn't touch system catalogs, if the transaction is already aborted. This optimization enhances logical decoding performance, especially for large transactions that have already been rolled back, as it avoids unnecessary disk or network I/O. To avoid potential slowdowns caused by frequent CLOG lookups for small transactions (most of which commit), the CLOG lookup is performed only for large transactions before eviction. The performance benchmark results showed there is not noticeable performance regression due to CLOG lookups. Reviewed-by: Amit Kapila, Peter Smith, Vignesh C, Ajin Cherian Reviewed-by: Dilip Kumar, Andres Freund Discussion: https://postgr.es/m/CAD21AoDht9Pz_DFv_R2LqBTBbO4eGrpa9Vojmt5z5sEx3XwD7A@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions