Postgres connector fails to convert timestamp infinity value [DBZ-6912]
- Dominant language
- HTML
- Stars
- 6
- Forks
- 8
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 1
Description
Migrated from [DBZ-6912](https://issues.redhat.com/browse/DBZ-6912)
In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
h1. Bug report
For bug reports, provide this information, please:
h2. What Debezium connector do you use and what version?
Debezium Postgres Connector 2.3.0.Final
h2. What is the connector configuration?
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"offset.storage": "org.apache.kafka.connect.storage.FileOffsetBackingStore",
"offset.storage.file.filename": "D://offset.txt",
"offset.flush.interval.ms": "1000",
"database.hostname": "xxxx",
"database.port": 5432,
"database.password": "xxx",
"database.dbname": "debezium_test",
"database.server.name": "my-postgres-connector",
"plugin.name": "decoderbufs",
"slot.name": "myslot",
"slot.drop.on.stop": "true",
"snapshot.mode": "never",
"converter.schemas.enable": "false",
"decimal.handling.mode": "string",
"topic.prefix": "test",
"table.include.list": "allcolumnsync.test:allcolumnsync.tz_test"
h2. What is the captured database version and mode of depoyment?
(E.g. on-premises, with a specific cloud provider, etc.)
on-premises,postgresql 12
h2. What behaviour do you expect?
I expect that the result is infinity or -infinity when timestamp infinity value or -infinity inserted in postgresql.
h2. What behaviour do you see?
These special values are converted to timestamps with value {{9223372036825200000}} in case of positive infinity or {{-9223372036832400000}} in case of negative infinity.
h2. Do you see the same behaviour using the latest relesead Debezium version?
(Ideally, also verify with latest Alpha/Beta/CR version)
yes.
h2. Do you have the connector logs, ideally from start till finish?
(You might be asked later to provide [DEBUG/TRACE|https://debezium.io/documentation/reference/stable/operations/logging.html] level log)
h2. How to reproduce the issue using our [tutorial|https://github.com/debezium/debezium-examples/tree/main/tutorial] deployment?
1. create table
{color:#800000}CREATE{color} {color:#800000}TABLE{color} {color:#000000}allcolumnsync{color}.{color:#000000}test{color} (
{color:#000000}id{color} {color:#000000}bigserial{color} {color:#800000}NOT{color} {color:#800000}NULL{color},
{color:#000080}"_timestamp"{color} {color:#000080}timestamp{color}({color:#0000ff}6{color}) {color:#800000}NULL{color},
{color:#800000}CONSTRAINT{color} {color:#000000}allcolumnsync_test_pkey{color} {color:#800000}PRIMARY{color} {color:#800000}KEY{color} ({color:#000000}id{color})
)
{color:#172b4d}2. insert value{color}
{color:#172b4d}INSERT INTO allcolumnsync.test(id, "_timestamp") VALUES(1, 'infinity');
INSERT INTO allcolumnsync.test(id, "_timestamp") VALUES(1, '-infinity');{color}
h1. Feature request or enhancement
For feature requests or enhancements, provide this information, please:
h2. Which use case/requirement will be addressed by the proposed feature?
h2. Implementation ideas (optional)
Parse like timestamptz type. I have fixed and tested it.
Contributor guide
Assessment
This issue has not been assessed yet.