pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix decoding of speculative aborts. 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix decoding of speculative aborts. @ 2021-06-15 03:56 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Amit Kapila @ 2021-06-15 03:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix decoding of speculative aborts. During decoding for speculative inserts, we were relying for cleaning toast hash on confirmation records or next change records. But that could lead to multiple problems (a) memory leak if there is neither a confirmation record nor any other record after toast insertion for a speculative insert in the transaction, (b) error and assertion failures if the next operation is not an insert/update on the same table. The fix is to start queuing spec abort change and clean up toast hash and change record during its processing. Currently, we are queuing the spec aborts for both toast and main table even though we perform cleanup while processing the main table's spec abort record. Later, if we have a way to distinguish between the spec abort record of toast and the main table, we can avoid queuing the change for spec aborts of toast tables. Reported-by: Ashutosh Bapat Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 9.6, where it was introduced Discussion: https://postgr.es/m/CAExHW5sPKF-Oovx_qZe4p5oM6Dvof7_P+XgsNAViug15Fm99jA@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4daa140a2f50e9a160bc180c3997ee13c7aabf9e Modified Files -------------- src/backend/replication/logical/decode.c | 14 +++---- src/backend/replication/logical/reorderbuffer.c | 49 +++++++++++++++++++------ src/include/replication/reorderbuffer.h | 9 +++-- 3 files changed, 48 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix decoding of speculative aborts. @ 2021-06-15 03:56 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Amit Kapila @ 2021-06-15 03:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix decoding of speculative aborts. During decoding for speculative inserts, we were relying for cleaning toast hash on confirmation records or next change records. But that could lead to multiple problems (a) memory leak if there is neither a confirmation record nor any other record after toast insertion for a speculative insert in the transaction, (b) error and assertion failures if the next operation is not an insert/update on the same table. The fix is to start queuing spec abort change and clean up toast hash and change record during its processing. Currently, we are queuing the spec aborts for both toast and main table even though we perform cleanup while processing the main table's spec abort record. Later, if we have a way to distinguish between the spec abort record of toast and the main table, we can avoid queuing the change for spec aborts of toast tables. Reported-by: Ashutosh Bapat Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 9.6, where it was introduced Discussion: https://postgr.es/m/CAExHW5sPKF-Oovx_qZe4p5oM6Dvof7_P+XgsNAViug15Fm99jA@mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/602a32a685e4ca715a996f899d906e5f24308b51 Modified Files -------------- src/backend/replication/logical/decode.c | 14 +++---- src/backend/replication/logical/reorderbuffer.c | 49 +++++++++++++++++++------ src/include/replication/reorderbuffer.h | 9 +++-- 3 files changed, 48 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix decoding of speculative aborts. @ 2021-06-15 03:56 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Amit Kapila @ 2021-06-15 03:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix decoding of speculative aborts. During decoding for speculative inserts, we were relying for cleaning toast hash on confirmation records or next change records. But that could lead to multiple problems (a) memory leak if there is neither a confirmation record nor any other record after toast insertion for a speculative insert in the transaction, (b) error and assertion failures if the next operation is not an insert/update on the same table. The fix is to start queuing spec abort change and clean up toast hash and change record during its processing. Currently, we are queuing the spec aborts for both toast and main table even though we perform cleanup while processing the main table's spec abort record. Later, if we have a way to distinguish between the spec abort record of toast and the main table, we can avoid queuing the change for spec aborts of toast tables. Reported-by: Ashutosh Bapat Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 9.6, where it was introduced Discussion: https://postgr.es/m/CAExHW5sPKF-Oovx_qZe4p5oM6Dvof7_P+XgsNAViug15Fm99jA@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/40ad7ebff6ca08a67f11108e73f6563416c8603b Modified Files -------------- src/backend/replication/logical/decode.c | 14 ++++---- src/backend/replication/logical/reorderbuffer.c | 48 ++++++++++++++++++------- src/include/replication/reorderbuffer.h | 9 ++--- 3 files changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix decoding of speculative aborts. @ 2021-06-15 03:56 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Amit Kapila @ 2021-06-15 03:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix decoding of speculative aborts. During decoding for speculative inserts, we were relying for cleaning toast hash on confirmation records or next change records. But that could lead to multiple problems (a) memory leak if there is neither a confirmation record nor any other record after toast insertion for a speculative insert in the transaction, (b) error and assertion failures if the next operation is not an insert/update on the same table. The fix is to start queuing spec abort change and clean up toast hash and change record during its processing. Currently, we are queuing the spec aborts for both toast and main table even though we perform cleanup while processing the main table's spec abort record. Later, if we have a way to distinguish between the spec abort record of toast and the main table, we can avoid queuing the change for spec aborts of toast tables. Reported-by: Ashutosh Bapat Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 9.6, where it was introduced Discussion: https://postgr.es/m/CAExHW5sPKF-Oovx_qZe4p5oM6Dvof7_P+XgsNAViug15Fm99jA@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1f8a934e0a867cdf3223ea7520c69cd16eedd936 Modified Files -------------- src/backend/replication/logical/decode.c | 14 ++++---- src/backend/replication/logical/reorderbuffer.c | 48 ++++++++++++++++++------- src/include/replication/reorderbuffer.h | 9 ++--- 3 files changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix decoding of speculative aborts. @ 2021-06-15 03:56 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Amit Kapila @ 2021-06-15 03:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix decoding of speculative aborts. During decoding for speculative inserts, we were relying for cleaning toast hash on confirmation records or next change records. But that could lead to multiple problems (a) memory leak if there is neither a confirmation record nor any other record after toast insertion for a speculative insert in the transaction, (b) error and assertion failures if the next operation is not an insert/update on the same table. The fix is to start queuing spec abort change and clean up toast hash and change record during its processing. Currently, we are queuing the spec aborts for both toast and main table even though we perform cleanup while processing the main table's spec abort record. Later, if we have a way to distinguish between the spec abort record of toast and the main table, we can avoid queuing the change for spec aborts of toast tables. Reported-by: Ashutosh Bapat Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 9.6, where it was introduced Discussion: https://postgr.es/m/CAExHW5sPKF-Oovx_qZe4p5oM6Dvof7_P+XgsNAViug15Fm99jA@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/35f56c124a7afb3d5059390dce15a47701c76d3b Modified Files -------------- src/backend/replication/logical/decode.c | 14 ++++---- src/backend/replication/logical/reorderbuffer.c | 48 ++++++++++++++++++------- src/include/replication/reorderbuffer.h | 11 +++--- 3 files changed, 48 insertions(+), 25 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix decoding of speculative aborts. @ 2021-06-15 03:56 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Amit Kapila @ 2021-06-15 03:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix decoding of speculative aborts. During decoding for speculative inserts, we were relying for cleaning toast hash on confirmation records or next change records. But that could lead to multiple problems (a) memory leak if there is neither a confirmation record nor any other record after toast insertion for a speculative insert in the transaction, (b) error and assertion failures if the next operation is not an insert/update on the same table. The fix is to start queuing spec abort change and clean up toast hash and change record during its processing. Currently, we are queuing the spec aborts for both toast and main table even though we perform cleanup while processing the main table's spec abort record. Later, if we have a way to distinguish between the spec abort record of toast and the main table, we can avoid queuing the change for spec aborts of toast tables. Reported-by: Ashutosh Bapat Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 9.6, where it was introduced Discussion: https://postgr.es/m/CAExHW5sPKF-Oovx_qZe4p5oM6Dvof7_P+XgsNAViug15Fm99jA@mail.gmail.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/43acadfcebec36f4db2074e125b2af15d3afda1a Modified Files -------------- src/backend/replication/logical/decode.c | 14 ++++---- src/backend/replication/logical/reorderbuffer.c | 48 ++++++++++++++++++------- src/include/replication/reorderbuffer.h | 11 +++--- 3 files changed, 48 insertions(+), 25 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-06-15 03:56 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-06-15 03:56 pgsql: Fix decoding of speculative aborts. Amit Kapila <akapila@postgresql.org> 2021-06-15 03:56 pgsql: Fix decoding of speculative aborts. Amit Kapila <akapila@postgresql.org> 2021-06-15 03:56 pgsql: Fix decoding of speculative aborts. Amit Kapila <akapila@postgresql.org> 2021-06-15 03:56 pgsql: Fix decoding of speculative aborts. Amit Kapila <akapila@postgresql.org> 2021-06-15 03:56 pgsql: Fix decoding of speculative aborts. Amit Kapila <akapila@postgresql.org> 2021-06-15 03:56 pgsql: Fix decoding of speculative aborts. Amit Kapila <akapila@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox