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
DBZ-2027 Upgrading Postgres JDBC driver to 42.2.12 #1452
Conversation
That one is interesting, it indicates a behavioral change around NUMERIC columns without length and scale. They used to no scale and length set to -1, whereas now with that driver update length is set to 131089. // CC @davecramer, was that an intentional change? Just curiosity on my side, I think we can handle it. |
ca73ffb
to
d3038f6
Compare
@jpechane, can you check out this one? Let's see how the next CI run goes, but I think remaining failures are unrelated timing issues in the test suite. |
The change related to scale was introduced by pgjdbc/pgjdbc#1767; see the first commit message in this PR for details. |
373092d
to
7151aab
Compare
And another behavioural change in the driver (see pgjdbc/pgjdbc#1708). |
@@ -434,7 +435,7 @@ public void shouldGenerateSnapshotsForPartitionedTables() throws Exception { | |||
|
|||
// verify each topic contains exactly the number of input records | |||
assertEquals(1, topicCounts.get("test_server.public.first_table").intValue()); | |||
assertEquals(30, topicCounts.get("test_server.public.partitioned").intValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpechane, WDYT about this one? I think it's ok to include this change in a minor; I'd argue it makes more sense that way actually. But it also settles that we shouldn't add this in 1.1.x IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gunnarmorling That's definiteyl breaking compatibility change so no way adding it to 1.1.x. IIUC this now aligns Postres with MySQL and we must warn the user to use ByLogicalTableRouter
to get the functionality back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, hum. So is MySQL indeed creating one topic per partition? Wondering whether it'd not make more sense to write all partitions to a single topic actually; is the information on partitioning relevant for downstream consumers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gunnarmorling I stand corrected. MySQL partitioning is about spreading the table into different physical files. POstgresSQL partitioning is about spreading to different tables. MySQL equivalent is sharding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so what number of topics do we get for a partitioned table in MySQL? Is it the same as for Postgres with the driver update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gunnarmorling If I understand this change then for n paritions and one aggregate table we get
- n tables for PostgreSQL partitioned table
- 1 table for MySQL partitioned table
- n table for MySQL sharded table
As PostgreSQL partitioning seems to be equivalent to MySQL sharding
Sigh, something still is broken. @jpechane, should you have any idea regarding the "Unknown type named timestamp without time zone requested" issue in the logs, I'll be all ears :) |
@gunnarmorling I'm wondering if the driver change is now giving us some variant column types that we didn't get previously and perhaps
to
It looks like that would be backward compatible and might properly resolve the types. |
are you using 42.2.11 or 42.2.12? This makes sense for .11, but not .12 |
@davecramer We are using |
@gunnarmorling I am quite unhappy with the current state of affairs. IMHO with things as they are now we should introduce compatibility matrix in the docs not only for database versions but also for JDBC driver versions. |
The driver upgrade mitigates some issues with using this connector with Postgres on Azure. It comes with some behavioural changes, though: * column metadata for DECIMAL without scale is returned differently by the (see pgjdbc/pgjdbc#1767): while it used to be returned as 0, it's now returned as null. This should be transparent to DBZ consumers * snapshots for partitioned tables only export change events on the partition topics now due to pgjdbc/pgjdbc#1708; this has an impact on consumers, but I think it's more reasonable than exporting all change events twice, one partition table and main table topics
* Using Awaitility so we can use 100ms looping intervals; also it's more concise * Avoiding creation of one temporary connection
Yes, we should use 42.2.12; 42.2.11 is borked as per Dave. And in fact I was using 42.2.12, but then went back (temporarily, or so I hoped) to the earlier one to understand when the partition change came in. Just rebased and force-pushed to use 42.2.12 again. |
@jpechane, yes, sounds like a good idea to add the driver versions. Can you log an issue? |
@gunnarmorling Applied, thanks for the thorough analysis. |
https://issues.redhat.com/browse/DBZ-2027