Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ancient timestamptz is sometimes incorrect with debezium-pg #14766

Open
xuefengze opened this issue Jan 24, 2024 · 1 comment
Open

The ancient timestamptz is sometimes incorrect with debezium-pg #14766

xuefengze opened this issue Jan 24, 2024 · 1 comment
Labels
no-issue-activity type/bug Something isn't working

Comments

@xuefengze
Copy link
Contributor

when use debezium connector and AvroConverter, ancient timestamptz is incorrect sometimes.
see other configs in integration_tests/debezium-postgres.
steps:

  1. create table in pg:
CREATE TABLE test_tz (
  id BIGINT PRIMARY KEY,
  c_timestamptz timestamptz
);

ALTER TABLE
  test_tz REPLICA IDENTITY FULL;

INSERT INTO test_tz VALUES (1, '1970-01-01 00:00:00Z');
INSERT INTO test_tz VALUES (2, '0001-01-01 00:00:00Z');
  1. set debezium connect
curl -s -X PUT -H "Content-Type: application/json" http://localhost:8083/connectors/register-postgres/config \
  -d '{
    "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
    "database.hostname": "postgres",
    "database.port": 5432,
    "database.user": "postgresuser",
    "database.password": "postgrespw",
    "database.dbname": "mydb",
    "database.server.name": "postgres",
    "database.schema": "public",
    "database.history.kafka.bootstrap.servers": "message_queue:29092",
    "database.history.kafka.topic": "postgres-history",
    "include.schema.changes": false
}'
  1. create souce in risingwave:
CREATE TABLE test_tz (PRIMARY KEY(id)) with (
    connector = 'kafka',
    kafka.topic = 'postgres.public.test_tz',
    kafka.brokers = 'message_queue:29092',
    kafka.scan.startup.mode = 'earliest'
) FORMAT DEBEZIUM ENCODE AVRO (schema.registry = 'http://message_queue:8081');
  1. insert data in pg:
INSERT INTO test_tz VALUES (3, '1970-01-01 00:00:00Z');
INSERT INTO test_tz VALUES (4, '0001-01-01 00:00:00Z');

now in risingwave:

dev=> select * from test_tz order by id;
 id |        c_timestamptz
----+-----------------------------
  1 | 1970-01-01T00:00:00.000000Z
  2 | 0000-12-30T00:00:00.000000Z
  3 | 1970-01-01T00:00:00.000000Z
  4 | 0001-01-01T00:00:00.000000Z
(4 rows)

also in kafka:

 "before": null,
  "after": {
      "id": 2,
      "c_timestamptz": "0000-12-30T00:00:00.000000Z"
  }
@github-actions github-actions bot added this to the release-1.7 milestone Jan 24, 2024
@xuefengze xuefengze changed the title The ancient 'timestamptz' is sometimes incorrect with debezium-pg The ancient timestamptz is sometimes incorrect with debezium-pg Jan 24, 2024
@lmatz lmatz added the type/bug Something isn't working label Jan 24, 2024
@xuefengze xuefengze removed this from the release-1.7 milestone Mar 6, 2024
Copy link
Contributor

This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants