Skip to content

Commit

Permalink
Enable babelfishpg_tsql.dump_restore GUC while restoring roles (#467)
Browse files Browse the repository at this point in the history
Set babelfishpg_tsql.dump_restore GUC to true while restoring roles so
that we can use this to add special handling during restore.

Task: BABEL-5039
Signed-off-by: Rishabh Tanwar [email protected]
  • Loading branch information
rishabhtanwar29 authored and roshan0708 committed Nov 20, 2024
1 parent 815f17a commit dedde2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bin/pg_dump/dumpall_babel_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ dumpBabelRestoreChecks(FILE *OPF, PGconn *conn, int binary_upgrade)
res = executeQuery(conn, "SELECT setting::INT from pg_settings WHERE name = 'server_version_num';");
source_server_version_num = atoi(PQgetvalue(res, 0, 0));

/* SET babelfishpg_tsql.dump_restore GUC in the beginning */
appendPQExpBufferStr(qry, "SET babelfishpg_tsql.dump_restore = TRUE;\n");

/*
* Temporarily enable ON_ERROR_STOP so that whole restore script
* execution fails if the following do block raises an error.
Expand Down

0 comments on commit dedde2a

Please sign in to comment.