pglogical icon indicating copy to clipboard operation
pglogical copied to clipboard

Make sure we use a correctly deformed tuple when doing initial sync.

Open psoo opened this issue 1 year ago • 0 comments

Currently, this test case will produce a wrong set of data, when calling table_data_filtered() like we do for an initial table sync:

CREATE EXTENSION IF NOT EXISTS pglogical;
CREATE TABLE bar(id bigint primary key);
INSERT INTO bar SELECT t.id FROM generate_series(1, 10) AS t(id);

SELECT * FROM bar;

ALTER TABLE bar ADD COLUMN value TEXT DEFAULT 'me';

SELECT * FROM bar;

COPY (SELECT * FROM pglogical.table_data_filtered(NULL::"public"."bar",
'"public"."bar"'::regclass, ARRAY['default'])) TO stdout;

Instead of the correct value 'me', a NULL value will be returned.

psoo avatar Jul 21 '22 08:07 psoo