Dear Bharath, > Will the check_hook approach work correctly?
I tested by using the first version and worked well (rejected). Please see the log which recorded the output and log. Below lines were copied from server log and found that max_slot_wal_keep_size must not be >= 0. ``` waiting for server to start....2023-10-30 08:53:32.529 GMT [6903] FATAL: invalid value for parameter "max_slot_wal_keep_size": 1 stopped waiting pg_ctl: could not start serve ``` > I haven't checked that by > myself, but I see InitializeGUCOptions() getting called before > IsBinaryUpgrade is set to true and the passed-in config options ('c') > are parsed. I thought the key point was that user-defined options are aligned after the "-b". User-defined options are set after the '-b' option, so check_hook could work as we expected. Thought? Best Regards, Hayato Kuroda FUJITSU LIMITED
$ pg_upgrade -b /usr/local/pgsql/bin/ -B /usr/local/pgsql/bin/ -d data_N1/ -D data_N2/ -r -U po stgres -o "-c max_slot_wal_keep_size=1MB" Performing Consistency Checks ----------------------------- Checking cluster versions ok *failure* Consult the last few lines of "data_N2/pg_upgrade_output.d/20231030T085332.388/log/pg_upgrade_server.log" for the probable cause of the failure. connection to server on socket "/home/hayato/test/pgdump/.s.PGSQL.50432" failed: No such file or directory Is the server running locally and accepting connections on that socket? could not connect to source postmaster started with the command: "/usr/local/pgsql/bin/pg_ctl" -w -l "data_N2/pg_upgrade_output.d/20231030T085332.388/log/pg_upgrade_server.log" -D "data_N1" -o "-p 50432 -b -c max_slot_wal_keep_size=-1 -c max_slot_wal_keep_size=1MB -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/home/hayato/test/pgdump'" start Failure, exiting
pg_upgrade_server.log
Description: pg_upgrade_server.log