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

source-postgres: Don't use IDENTIFY_SYSTEM #2430

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

willdonnelly
Copy link
Member

@willdonnelly willdonnelly commented Feb 19, 2025

Description:

Apparently Google's AlloyDB added a gratuitous fifth field to the IDENTIFY_SYSTEM command results, which currently breaks the helper function pglogrepl.IdentifySystem which expects there to be exactly the four fields one gets back from PostgreSQL.

The only thing we use IdentifySystem for is to establish the WAL flush location on the server, and we already have our own function (queryLatestServerLSN) which does precisely that and doesn't rely on parsing the IDENTIFY_SYSTEM result, so let's just use that one instead.

Workflow steps:

There shouldn't be any user-visible impact except that AlloyDB captures work.


This change is Reviewable

Apparently Google's AlloyDB added a gratuitous fifth field to the
IDENTIFY_SYSTEM command results, which currently breaks the helper
function pglogrepl.IdentifySystem which expects there to be exactly
the four fields one gets back from PostgreSQL.

The only thing we use IdentifySystem for is to establish the WAL
flush location on the server, and we already have our own function
(`queryLatestServerLSN`) which does precisely that and doesn't rely
on parsing the IDENTIFY_SYSTEM result, so let's just use that one
instead.
@willdonnelly willdonnelly added the change:unplanned Unplanned change, useful for things like doc updates label Feb 19, 2025
@willdonnelly willdonnelly requested a review from a team February 19, 2025 21:25
Copy link
Member

@williamhbaker williamhbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@willdonnelly willdonnelly merged commit ac0dd64 into main Feb 19, 2025
52 of 55 checks passed
@willdonnelly willdonnelly deleted the wgd/postgres-alloydb-identifysystem-20250219 branch February 19, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:unplanned Unplanned change, useful for things like doc updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants