Skip to content

Commit

Permalink
#16547 PG: read-only connection props
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-rider committed May 20, 2022
1 parent b8e534e commit 2fbab9c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ protected Map<String, String> getInternalConnectionProperties(DBRProgressMonitor
// Turn off prepared statements using, to avoid error: "ERROR: prepared statement "S_1" already exists" from PGBouncer #10742
props.put("prepareThreshold", "0");
}

if (getContainer().isConnectionReadOnly()) {
props.put("readOnly", "true");
props.put("readOnlyMode", "always");
}

return props;
}

Expand Down

0 comments on commit 2fbab9c

Please sign in to comment.