For some reason on Azure's Postgres flexible-server PGv15 the
SQL
SELECT name, setting, unit, pending_restart \
FROM pg_settings \
ORDER BY name;
Does not return a consistent ordering when run on different databases
on the same PG server. So run the output through `sort`.
db/pg_settings.new:
printf '$(GET_PG_SETTINGS)\n' \
| psql $(PSQL_ARGS_MINIMAL) --tuples-only \
+ | sort --stable \
> db/pg_settings.new
## compare-db-settings
compare-db-settings:
printf '$(GET_PG_SETTINGS)\n' \
| psql $(PSQL_ARGS_MINIMAL) --tuples-only \
- | diff -u db/pg_settings /dev/stdin
+ | sort --stable \
+ | diff -U 0 db/pg_settings /dev/stdin
##
## Lesser used targets: