Thread: pgsql: Fix issues with pg_ctl

pgsql: Fix issues with pg_ctl

From
Stephen Frost
Date:
Fix issues with pg_ctl

The new, small, free_readfile managed to have bug in it which could
cause it to try and free something it shouldn't, and fix the case
where it was being called with an invalid pointer leading to a
segfault.

Noted by Bruce, issues introduced and fixed by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/eb933162cdcbcaa5c56c75eb21b9c055af9748a0

Modified Files
--------------
src/bin/pg_ctl/pg_ctl.c |   12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)


Re: pgsql: Fix issues with pg_ctl

From
Thom Brown
Date:
On 5 March 2014 06:33, Stephen Frost <sfrost@snowman.net> wrote:
Fix issues with pg_ctl

The new, small, free_readfile managed to have bug in it which could
cause it to try and free something it shouldn't, and fix the case
where it was being called with an invalid pointer leading to a
segfault.

Noted by Bruce, issues introduced and fixed by me.

Yeah, this has fixed the segfaults, thanks.

Now I get an issue when restarting my cluster, but not when I stop and start:

thom@swift ~/dbtest $ pg_ctl stop -D primary
waiting for server to shut down.... done
server stopped
thom@swift ~/dbtest $ pg_ctl start -D primary
server starting
thom@swift ~/dbtest $ 2014-03-05 11:46:21.963 GMT -  - LOG:  redirecting log output to logging collector process
2014-03-05 11:46:21.963 GMT -  - HINT:  Future log output will appear in directory "pg_log".

thom@swift ~/dbtest $ pg_ctl restart -D primary
waiting for server to shut down.... done
server stopped
server starting
thom@swift ~/dbtest $ sh: 1: ���: not found

--
Thom

Re: pgsql: Fix issues with pg_ctl

From
Stephen Frost
Date:
* Thom Brown (thom@linux.com) wrote:
> On 5 March 2014 06:33, Stephen Frost <sfrost@snowman.net> wrote:
> > Fix issues with pg_ctl
[...]
> thom@swift ~/dbtest $ sh: 1: ���: not found

Yeesh.  Always with the simple ones it seems.  Yeah, I see what the
issue here is, will fix.

Thanks!

    Stephen

Attachment