1. $node_publisher->safe_psql( 'postgres', qq( ALTER TABLE dropped_cols DROP COLUMN b_drop; + ALTER TABLE generated_cols DROP COLUMN b_gen; )); $node_subscriber->safe_psql( 'postgres', qq( ALTER TABLE dropped_cols DROP COLUMN b_drop; + ALTER TABLE generated_cols DROP COLUMN b_gen; ));
I think we want to test generated columns, so we don't need to drop columns. Otherwise the generated column problem can't be detected.
Ow, what a mistake. Now changed (and ensured that without the patch
the test fails).
2. # The bug was that when the REPLICA IDENTITY FULL is used with dropped columns, # we fail to apply updates and deletes
Maybe we should mention generated columns in comment of the test.
makes sense
3. I ran pgindent and it modified some lines. Maybe we can improve the patch as the following.
/* - * Ignore dropped and generated columns as the publisher - * doesn't send those + * Ignore dropped and generated columns as the publisher doesn't send + * those */ if (att->attisdropped || att->attgenerated) continue;