Re: Idea: closing the loop for "pg_ctl reload"

From: Payal Singh <payal(at)omniti(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Jan de Visser <jan(at)de-visser(dot)net>, pgsql-hackers(at)postgresql(dot)org, Andres Freund <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>
Subject: Re: Idea: closing the loop for "pg_ctl reload"
Date: 2015-04-21 23:32:05
Message-ID: CANUg7LDSXf+_Kt+YE6_6_XFbZ2N-hwRat+io5udXaP6APyCOQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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(at)vagrant-centos65 data]$ /usr/local/pgsql/bin/pg_ctl -D
/usr/local/pgsql/data reload
server signaled
[postgres(at)vagrant-centos65 data]$ cd pg_log
[postgres(at)vagrant-centos65 pg_log]$ ls
postgresql-2015-04-21_232328.log postgresql-2015-04-21_232858.log
[postgres(at)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(dot)Nasby(at)bluetreble(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-04-22 00:04:56 Re: Fix broken Install.bat when target directory contains a space
Previous Message Jim Nasby 2015-04-21 23:24:44 Re: Freeze avoidance of very large table.