-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cdc): ensure connector is inited after the CREATE TABLE is finish…
…ed (#13130) (#13251) Co-authored-by: StrikeW <[email protected]>
- Loading branch information
1 parent
6510ff4
commit 5a6df32
Showing
9 changed files
with
166 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# create and drop CDC postgres tables concurrently | ||
control substitution on | ||
|
||
system ok | ||
psql -c " | ||
DROP TABLE IF EXISTS tt1; | ||
CREATE TABLE tt1 (v1 int primary key, v2 timestamp); | ||
INSERT INTO tt1 VALUES (1, '2023-10-23 10:00:00');" | ||
|
||
statement ok | ||
create table tt1 (v1 int, | ||
v2 timestamptz, | ||
PRIMARY KEY (v1) | ||
) with ( | ||
connector = 'postgres-cdc', | ||
hostname = '${PGHOST:localhost}', | ||
port = '${PGPORT:8432}', | ||
username = '${PGUSER:$USER}', | ||
password = '${PGPASSWORD:123456}', | ||
database.name = '${PGDATABASE:mydb}', | ||
schema.name = 'public', | ||
table.name = 'tt1', | ||
slot.name = 'tt1_slot', | ||
); | ||
|
||
statement ok | ||
drop table tt1; | ||
|
||
statement ok | ||
create table tt1 (v1 int, | ||
v2 timestamptz, | ||
PRIMARY KEY (v1) | ||
) with ( | ||
connector = 'postgres-cdc', | ||
hostname = '${PGHOST:localhost}', | ||
port = '${PGPORT:8432}', | ||
username = '${PGUSER:$USER}', | ||
password = '${PGPASSWORD:123456}', | ||
database.name = '${PGDATABASE:mydb}', | ||
schema.name = 'public', | ||
table.name = 'tt1', | ||
slot.name = 'tt1_slot', | ||
); | ||
|
||
sleep 3s | ||
|
||
query IT | ||
SELECT * FROM tt1; | ||
---- | ||
1 2023-10-23 10:00:00+00:00 | ||
|
||
statement ok | ||
drop table tt1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters