postgres_scanner icon indicating copy to clipboard operation
postgres_scanner copied to clipboard

Allow synchronous snapshot on replicas and in RDS/Aurora

Open bdavisab opened this issue 1 year ago • 1 comments

Synchronized snapshots are supported on replicas starting with PostgreSQL 10, and they're also supported in RDS/Aurora.

The change in Postgres 10 didn't make it into the release notes, but I found this https://github.com/postgres/postgres/blob/master/src/bin/pg_dump/pg_dump.c#L1343

Postgres 9.6 is super old now, even 10 and 11 aren't supported anymore, and 12 will be EOL in November. So I think it's reasonable to simply drop the version checks. But we can keep the guards in too if you prefer, happy to update.

Tested with an Aurora replica, and that works just fine as well.

It's true that in https://github.com/duckdb/postgres_scanner/issues/134 , pg_stat_get_wal_receiver() isn't supported in Aurora, but that's just used to check if it's a replica or not, which since PG10, we don't need to worry about.

I assume that the people reporting this issue https://github.com/duckdb/postgres_scanner/issues/90 were just using ancient versions of Postgres. Maybe that's an argument for keeping a version check? Let me know what you think.

bdavisab avatar May 31 '24 22:05 bdavisab

Took a quick look at this. My understanding is that this combines two things into one PR:

  1. Removing support for Postgres 9.6 (which seems reasonable to me)
  2. Supporting synchronous snapshots in AWS Aurora.

I personally would prefer these two things to be done in separate PRs, but I'm not a maintainer on this repo.

JelteF avatar Nov 04 '24 10:11 JelteF