Skip site navigation (1) Skip section navigation (2)

pgsql: Fix pg_ctl's readfile() to not go into infinite loop on an empty

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix pg_ctl's readfile() to not go into infinite loop on an empty
Date: 2009-09-02 02:41:14
Message-ID: 20090902024114.0ECA975331E@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/bin/pg_ctl:
        pg_ctl.c (r1.74.2.6 -> r1.74.2.7)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_ctl/pg_ctl.c?r1=1.74.2.6&r2=1.74.2.7)

pgsql-committers by date

Next:From: Tom LaneDate: 2009-09-02 02:41:20
Subject: pgsql: Fix pg_ctl's readfile() to not go into infinite loop on an empty
Previous:From: Tom LaneDate: 2009-09-02 02:41:07
Subject: pgsql: Fix pg_ctl's readfile() to not go into infinite loop on an empty

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group