aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/constraint.c
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2023-11-27 08:49:55 +0530
committerAmit Kapila <akapila@postgresql.org>2023-11-27 08:49:55 +0530
commit360392fa2a9bb74338b4864790d18eadb13fd8a8 (patch)
tree2aa4d522f12c6fafeef400dea2afbe9d8b45ad85 /src/backend/commands/constraint.c
parentdc9f8a798307244d791b71f666f50de319799e7c (diff)
downloadpostgresql-360392fa2a9bb74338b4864790d18eadb13fd8a8.tar.gz
postgresql-360392fa2a9bb74338b4864790d18eadb13fd8a8.zip
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
Diffstat (limited to 'src/backend/commands/constraint.c')
0 files changed, 0 insertions, 0 deletions