Adjust new pg_read_file() test cases for more portability.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 30 Jul 2022 15:17:07 +0000 (11:17 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 30 Jul 2022 15:17:07 +0000 (11:17 -0400)
commitd10fad96c664a503a4203fc4b5acd4e816b0158a
tree4e4decc93318ad7f1cc4c3192dfebd4edda580e9
parent212bdc0cbc32ae5041bf1cd609f7b7a0c8930fc3
Adjust new pg_read_file() test cases for more portability.

It's allowed for an installation to remove postgresql.auto.conf,
so don't rely on that being present.  Instead probe whether we can
read postmaster.pid.  (If you've removed that, you broke the data
directory's multiple-postmaster interlock, not to mention pg_ctl.)
Per gripe from Michael Paquier.

Discussion: https://postgr.es/m/YuSZTsoBMObyY+vT@paquier.xyz
src/test/regress/expected/misc_functions.out
src/test/regress/sql/misc_functions.sql