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

perf: read in_hot_standby GUC on connection #2334

Merged
merged 7 commits into from Nov 10, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -870,7 +870,7 @@ private boolean isPrimary(QueryExecutor queryExecutor) throws SQLException, IOEx
if (inHotStandby != null && inHotStandby.equalsIgnoreCase("on")) {
davecramer marked this conversation as resolved.
Show resolved Hide resolved
return false;
}
// Host may not be in recovery but still have transaction_read_only = 'off' set,
// Host may not be in recovery but still have 'transaction_read_only=on' set,
davecramer marked this conversation as resolved.
Show resolved Hide resolved
// hence explicit check
Tuple results = SetupQueryRunner.run(queryExecutor, "show transaction_read_only", true);
Tuple nonNullResults = castNonNull(results);
Expand Down