Allow synchronous snapshot on replicas and in RDS/Aurora #235
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #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 #90 were just using ancient versions of Postgres. Maybe that's an argument for keeping a version check? Let me know what you think.