Re: Idea: closing the loop for "pg_ctl reload" - Mailing list pgsql-hackers

From Payal Singh
Subject Re: Idea: closing the loop for "pg_ctl reload"
Date
Msg-id CANUg7LDSXf+_Kt+YE6_6_XFbZ2N-hwRat+io5udXaP6APyCOQg@mail.gmail.com
Whole thread Raw
In response to Re: Idea: closing the loop for "pg_ctl reload"  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: Idea: closing the loop for "pg_ctl reload"
List pgsql-hackers
I'm trying to review this patch and applied http://www.postgresql.org/message-id/attachment/37123/Let_pg_ctl_check_the_result_of_a_postmaster_config_reload.patch to postgres. gmake check passed but while starting postgres I see:

[postgres@vagrant-centos65 data]$ LOG:  incomplete data in "postmaster.pid": found only 5 newlines while trying to add line 8
LOG:  redirecting log output to logging collector process
HINT:  Future log output will appear in directory "pg_log".


Also, a simple syntax error test gave no warning at all on doing a reload, but just as before there was an error message in the logs:

[postgres@vagrant-centos65 data]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data reload
server signaled
[postgres@vagrant-centos65 data]$ cd pg_log
[postgres@vagrant-centos65 pg_log]$ ls
postgresql-2015-04-21_232328.log  postgresql-2015-04-21_232858.log
[postgres@vagrant-centos65 pg_log]$ grep error postgresql-2015-04-21_232858.log
LOG:  syntax error in file "/usr/local/pgsql/data/postgresql.conf" line 211, near token "/"
LOG:  configuration file "/usr/local/pgsql/data/postgresql.conf" contains errors; no changes were applied

I'm guessing since this is a patch submitted to the commitfest after the current one, am I too early to start reviewing it?

Payal 

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253

On Thu, Mar 5, 2015 at 4:06 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
On 3/4/15 7:13 PM, Jan de Visser wrote:
On March 4, 2015 11:08:09 PM Andres Freund wrote:
Let's get the basic feature (notification of failed reloads) done
first. That will be required with or without including the error
message.  Then we can get more fancy later, if somebody really wants to
invest the time.

Except for also fixing pg_reload_conf() to pay attention to what happens with
postmaster.pid, the patch I submitted does exactly what you want I think.

And I don't mind spending time on stuff like this. I'm not smart enough to deal
with actual, you know, database technology.

Yeah, lets at least get this wrapped and we can see about improving it.

I like the idea of doing a here-doc or similar in the .pid, though I think it'd be sufficient to just prefix all the continuation lines with a tab. An uglier option would be just striping the newlines out.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Freeze avoidance of very large table.
Next
From: Michael Paquier
Date:
Subject: Re: Fix broken Install.bat when target directory contains a space