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

Leader election fails with pq driver #566

Open
wydengyre opened this issue Aug 26, 2024 · 1 comment
Open

Leader election fails with pq driver #566

wydengyre opened this issue Aug 26, 2024 · 1 comment

Comments

@wydengyre
Copy link

A repo demonstrating the issue is available here: https://github.com/wydengyre/dbsqlintervaldemo

Using riverdatabasesql with the pq driver will result in failure of the leader election system.

The leader election SQL will result in expires_at being set to a time in the year 2183: https://github.com/FiveBellsSettlement/river/blob/62ce779744c2d2434cc41eb02a6f19db419dc79e/riverdriver/riverdatabasesql/internal/dbsqlc/river_leader.sql.go#L13

@brandur
Copy link
Contributor

brandur commented Aug 26, 2024

Yeah, we've suspect that River isn't compatible with lib/pq. riverdatabasesql is mainly meant for compatibility through a database/sql interface that's using an underlying Pgx driver. I might try to fix it depending on time, but given lib/pq's ancient and been in maintenance mode only for years, I'm not sure how soon I'll get to it.

OOC, what's the main thing blocking you from migrating to a more modern driver like Pgx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants