File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ if [ ! -f ${BABELFISH_DATA}/postgresql.conf ]; then
3737 allow_system_table_mods = on
3838 shared_preload_libraries = 'babelfishpg_tds'
3939 babelfishpg_tds.listen_addresses = '*'
40+ babelfishpg_tsql.migration_mode = '${MIGRATION_MODE} '
4041 EOF
4142 ./pg_ctl -D ${BABELFISH_DATA} / start
4243 ./psql -c " CREATE USER ${USERNAME} WITH SUPERUSER CREATEDB CREATEROLE PASSWORD '${PASSWORD} ' INHERIT;" \
@@ -47,10 +48,12 @@ if [ ! -f ${BABELFISH_DATA}/postgresql.conf ]; then
4748 -c " GRANT ALL ON SCHEMA sys to ${USERNAME} ;" \
4849 -c " ALTER USER ${USERNAME} CREATEDB;" \
4950 -c " ALTER SYSTEM SET babelfishpg_tsql.database_name = '${DATABASE} ';" \
50- -c " SELECT pg_reload_conf();" \
51- -c " ALTER DATABASE ${DATABASE} SET babelfishpg_tsql.migration_mode = '${MIGRATION_MODE} ';" \
52- -c " SELECT pg_reload_conf();" \
51+ -c " SELECT pg_reload_conf();"
52+
53+ # After reloading to apply the migration_mode setting in postgresql.conf, initialize a new connection.
54+ ./psql -d ${DATABASE} \
5355 -c " CALL SYS.INITIALIZE_BABELFISH('${USERNAME} ');"
56+
5457 ./pg_ctl -D ${BABELFISH_DATA} / stop
5558fi
5659
You can’t perform that action at this time.
0 commit comments