|
19 | 19 | $node_publisher->safe_psql('postgres',
|
20 | 20 | "CREATE TABLE tab_fk (bid int PRIMARY KEY);");
|
21 | 21 | $node_publisher->safe_psql('postgres',
|
22 |
| - "CREATE TABLE tab_fk_ref (id int PRIMARY KEY, bid int REFERENCES tab_fk (bid));" |
| 22 | + "CREATE TABLE tab_fk_ref (id int PRIMARY KEY, junk text, bid int REFERENCES tab_fk (bid));" |
23 | 23 | );
|
24 | 24 |
|
25 |
| -# Setup structure on subscriber |
| 25 | +# Setup structure on subscriber; column order intentionally different |
26 | 26 | $node_subscriber->safe_psql('postgres',
|
27 | 27 | "CREATE TABLE tab_fk (bid int PRIMARY KEY);");
|
28 | 28 | $node_subscriber->safe_psql('postgres',
|
29 |
| - "CREATE TABLE tab_fk_ref (id int PRIMARY KEY, bid int REFERENCES tab_fk (bid));" |
| 29 | + "CREATE TABLE tab_fk_ref (id int PRIMARY KEY, bid int REFERENCES tab_fk (bid), junk text);" |
30 | 30 | );
|
31 | 31 |
|
32 | 32 | # Setup logical replication
|
|
42 | 42 |
|
43 | 43 | $node_publisher->safe_psql('postgres',
|
44 | 44 | "INSERT INTO tab_fk (bid) VALUES (1);");
|
| 45 | +# "junk" value is meant to be large enough to force out-of-line storage |
45 | 46 | $node_publisher->safe_psql('postgres',
|
46 |
| - "INSERT INTO tab_fk_ref (id, bid) VALUES (1, 1);"); |
| 47 | + "INSERT INTO tab_fk_ref (id, bid, junk) VALUES (1, 1, repeat(pi()::text,20000));" |
| 48 | +); |
47 | 49 |
|
48 | 50 | $node_publisher->wait_for_catchup('tap_sub');
|
49 | 51 |
|
@@ -128,7 +130,7 @@ BEGIN
|
128 | 130 | $result = $node_subscriber->safe_psql('postgres',
|
129 | 131 | "SELECT count(*), min(id), max(id) FROM tab_fk_ref;");
|
130 | 132 | is($result, qq(2|1|2),
|
131 |
| - 'check column trigger applied on even for other column'); |
| 133 | + 'check column trigger applied even on update for other column'); |
132 | 134 |
|
133 | 135 | $node_subscriber->stop('fast');
|
134 | 136 | $node_publisher->stop('fast');
|
0 commit comments