Adrian Chang
01/17/2023, 5:21 PMpostgres-cdc but confirmed_flush_lsn is not increasing even if I update data on the table and the update is received on Flink. This is causing full storage on Postgres.
This is my table on Postgres
CREATE TABLE IF NOT EXISTS aerial_core_development.thing_meta
(
id integer NOT NULL DEFAULT nextval('aerial_core_development.thing_meta_id_seq'::regclass),
thing_serial character varying(64) COLLATE pg_catalog."default" NOT NULL,
floor integer,
location character varying(32) COLLATE pg_catalog."default",
location_custom text COLLATE pg_catalog."default",
name character varying(64) COLLATE pg_catalog."default",
device_type character varying(64) COLLATE pg_catalog."default",
timezone character varying(64) COLLATE pg_catalog."default",
CONSTRAINT thing_meta_pkey PRIMARY KEY (id),
CONSTRAINT thing_meta_thing_serial_fkey FOREIGN KEY (thing_serial)
REFERENCES aerial_core_development.thing (serial) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE CASCADE
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS aerial_core_development.thing_meta
OWNER to aerial;
REVOKE ALL ON TABLE aerial_core_development.thing_meta FROM flink;
GRANT ALL ON TABLE aerial_core_development.thing_meta TO aerial;
GRANT DELETE, INSERT, UPDATE, SELECT ON TABLE aerial_core_development.thing_meta TO aerial_core;
GRANT SELECT ON TABLE aerial_core_development.thing_meta TO flink;
This is how I use the connector
CREATE TABLE thing_meta (
thing_serial VARCHAR NOT NULL,
timezone VARCHAR
) WITH (
'connector' = 'postgres-cdc',
'hostname' = 'localhost',
'port' = '54321',
'username' = 'flink_bridge',
'password' = <password>,
'database-name' = 'aerial_core_development',
'schema-name' = 'aerial_core_development',
'table-name' = 'thing_meta',
'decoding.plugin.name' = 'pgoutput',
'slot.name' = 'thing_meta_adrian'
)
Postgres engine version is 10.21
SELECT
*,
pg_current_wal_lsn(),
pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(),restart_lsn)) AS replicationSlotLag
FROM pg_replication_slots;
Do you have any idea why confirmed_flush_lsn is not advancing ?
Thankssap1ens
01/17/2023, 5:24 PMconfirmed_flush_lsn to progress.Adrian Chang
01/17/2023, 6:11 PMio.debezium.connector.common.BaseSourceTask [] - <http://heartbeat.interval.ms|heartbeat.interval.ms> = 300000Adrian Chang
01/17/2023, 6:13 PMid column, which I am not including it on Flink table. Do you think that matters ?
Please note even if I update one row of the table and got the change on Flink, the confirmed_flush_lsn doesn't advance.sap1ens
01/17/2023, 6:35 PMpostgres-cdc is just a thin wrapper on top of the Debezium connector, so you might want to search / ask in the Debezium community.sap1ens
01/17/2023, 6:36 PMAdrian Chang
01/19/2023, 10:25 PM'execution.checkpointing.interval': '1min'
I don't understand why confirmed_flush_lsn doesn't increase if we don't set that parameter.sap1ens
01/19/2023, 11:01 PM