pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid unconditionally filling in missing values with NULL in pgo 3+ messages / 1 participants [nested] [flat]
* pgsql: Avoid unconditionally filling in missing values with NULL in pgo @ 2023-11-27 03:49 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2023-11-27 03:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unconditionally filling in missing values with NULL in pgoutput. 52e4f0cd4 introduced a bug in pgoutput in which missing values in tuples were incorrectly filled in with NULL. The problem was the use of CreateTupleDescCopy where CreateTupleDescCopyConstr was required, as the former drops the constraints in the tuple description (specifically, the default value constraint) on the floor. The bug could result in incorrectness when a table replicated via `REPLICA IDENTITY FULL` underwent a schema change that added a column with a default value. The problem is that in such cases updates fill NULL values in old tuples for missing columns for default values. Then on the subscriber, we failed to find a matching tuple and missed updating the required row. Author: Nikhil Benesch Reviewed-by: Hou Zhijie, Amit Kapila Backpatch-through: 15 Discussion: http://postgr.es/m/CAPWqQZTEpZQamYsGMn6ZDRvVywwpVPiKH6OY4KSgA+NmeqFNzA@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/360392fa2a9bb74338b4864790d18eadb13fd8a8 Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 4 +-- src/test/subscription/t/100_bugs.pl | 53 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Avoid unconditionally filling in missing values with NULL in pgo @ 2023-11-27 03:49 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2023-11-27 03:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unconditionally filling in missing values with NULL in pgoutput. 52e4f0cd4 introduced a bug in pgoutput in which missing values in tuples were incorrectly filled in with NULL. The problem was the use of CreateTupleDescCopy where CreateTupleDescCopyConstr was required, as the former drops the constraints in the tuple description (specifically, the default value constraint) on the floor. The bug could result in incorrectness when a table replicated via `REPLICA IDENTITY FULL` underwent a schema change that added a column with a default value. The problem is that in such cases updates fill NULL values in old tuples for missing columns for default values. Then on the subscriber, we failed to find a matching tuple and missed updating the required row. Author: Nikhil Benesch Reviewed-by: Hou Zhijie, Amit Kapila Backpatch-through: 15 Discussion: http://postgr.es/m/CAPWqQZTEpZQamYsGMn6ZDRvVywwpVPiKH6OY4KSgA+NmeqFNzA@mail.gmail.com Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d7ca9209c9707703d6fd3bb7dc6d539803a72876 Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 4 +-- src/test/subscription/t/100_bugs.pl | 53 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Avoid unconditionally filling in missing values with NULL in pgo @ 2023-11-27 03:49 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2023-11-27 03:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid unconditionally filling in missing values with NULL in pgoutput. 52e4f0cd4 introduced a bug in pgoutput in which missing values in tuples were incorrectly filled in with NULL. The problem was the use of CreateTupleDescCopy where CreateTupleDescCopyConstr was required, as the former drops the constraints in the tuple description (specifically, the default value constraint) on the floor. The bug could result in incorrectness when a table replicated via `REPLICA IDENTITY FULL` underwent a schema change that added a column with a default value. The problem is that in such cases updates fill NULL values in old tuples for missing columns for default values. Then on the subscriber, we failed to find a matching tuple and missed updating the required row. Author: Nikhil Benesch Reviewed-by: Hou Zhijie, Amit Kapila Backpatch-through: 15 Discussion: http://postgr.es/m/CAPWqQZTEpZQamYsGMn6ZDRvVywwpVPiKH6OY4KSgA+NmeqFNzA@mail.gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a77fb8c685495ba100e5fbe3ac78d9cd289bd48a Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 4 +-- src/test/subscription/t/100_bugs.pl | 53 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-11-27 03:49 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-11-27 03:49 pgsql: Avoid unconditionally filling in missing values with NULL in pgo Amit Kapila <akapila@postgresql.org> 2023-11-27 03:49 pgsql: Avoid unconditionally filling in missing values with NULL in pgo Amit Kapila <akapila@postgresql.org> 2023-11-27 03:49 pgsql: Avoid unconditionally filling in missing values with NULL in pgo 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