]> granicus.if.org Git - postgresql/commit
Fix pg_ctl's readfile() to not go into infinite loop on an empty file
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Sep 2009 02:41:13 +0000 (02:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Sep 2009 02:41:13 +0000 (02:41 +0000)
commitbbc2e9a606a91558cd467ac7e5cfcc23d279ec0e
tree6a5c0efa2c6f5252774de5c1e892156adb5e1adc
parent1146b2fd9dcde785de9ceff6ce473568d9663a54
Fix pg_ctl's readfile() to not go into infinite loop on an empty file
(could happen if either postgresql.conf or postmaster.opts is empty).
It's been broken since the C version was written for 8.0, so patch
all the way back.

initdb's copy of the function is broken in the same way, but it's
less important there since the input files should never be empty.
Patch that in HEAD only, and also fix some cosmetic differences that
crept into that copy of the function.

Per report from Corry Haines and Jeff Davis.
src/bin/pg_ctl/pg_ctl.c