We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4039e4c commit eb64faaCopy full SHA for eb64faa
ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh
@@ -255,7 +255,21 @@ EOF
255
)
256
run_sql -c "$REENCRYPT_VAULT_SECRETS_QUERY"
257
258
- run_sql -c "grant pg_read_all_data, pg_signal_backend to postgres"
+ GRANT_PREDEFINED_ROLES_TO_POSTGRES_QUERY=$(cat <<EOF
259
+ DO \$\$
260
+ DECLARE
261
+ major_version INT;
262
+ BEGIN
263
+ SELECT current_setting('server_version_num')::INT / 10000 INTO major_version;
264
+ IF major_version >= 16 THEN
265
+ GRANT pg_create_subscription TO postgres;
266
+ END IF;
267
+ GRANT pg_monitor, pg_read_all_data, pg_signal_backend TO postgres;
268
+ END
269
+ \$\$;
270
+EOF
271
+ )
272
+ run_sql -c "$GRANT_PREDEFINED_ROLES_TO_POSTGRES_QUERY"
273
}
274
275
function complete_pg_upgrade {
0 commit comments