Re: ALTER SYSTEM RESET?

Lists: pgsql-hackers
From: Christoph Berg <cb(at)df7cb(dot)de>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: ALTER SYSTEM RESET?
Date: 2014-06-25 12:50:03
Message-ID: 20140625125003.GF29108@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

is there a reason there's no ALTER SYSTEM RESET?

The natural idiom to reset SET statements is "RESET guc;", I don't
think "SET guc = default;" is in use much, so "ALTER SYSTEM RESET guc;"
would be the natural way to try.

Also, ALTER SYSTEM SET/RESET seems to be what oracle does:
http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams004.htm#REFRN00102

Christoph
--
cb(at)df7cb(dot)de | http://www.df7cb.de/


From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-25 13:04:27
Message-ID: CAA4eK1KAMSJe0d3_iqkJsM7rd1oXRTX-P2q4N0P9bGpvGwZOmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jun 25, 2014 at 6:20 PM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
>
> Hi,
>
> is there a reason there's no ALTER SYSTEM RESET?
>
> The natural idiom to reset SET statements is "RESET guc;", I don't
> think "SET guc = default;" is in use much, so "ALTER SYSTEM RESET guc;"
> would be the natural way to try.

Currently you can achieve that by
"ALTER SYSTEM RESET guc = Default;".
However it will be good to have support for RESET as well. I think it
should not be too complicated to implement that syntax, I personally
don't have bandwidth to it immediately, but I would like to take care
of it unless you or someone wants to do it by the time I get some
bandwidth.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-25 16:18:58
Message-ID: CAFcNs+pZ_CA3UaqjpPDKJNs6G-KAxiyYV2wqD2wM66ovL4Bs3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jun 25, 2014 at 10:04 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
>
> On Wed, Jun 25, 2014 at 6:20 PM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
> >
> > Hi,
> >
> > is there a reason there's no ALTER SYSTEM RESET?
> >
> > The natural idiom to reset SET statements is "RESET guc;", I don't
> > think "SET guc = default;" is in use much, so "ALTER SYSTEM RESET guc;"
> > would be the natural way to try.
>
> Currently you can achieve that by
> "ALTER SYSTEM RESET guc = Default;".
> However it will be good to have support for RESET as well. I think it
> should not be too complicated to implement that syntax, I personally
> don't have bandwidth to it immediately, but I would like to take care
> of it unless you or someone wants to do it by the time I get some
> bandwidth.
>

I have some time then I can provide a patch in a few days... Is ok for you
guys?

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello


From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-25 16:26:39
Message-ID: 53AAF83F.1050909@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 06/25/2014 03:04 PM, Amit Kapila wrote:
> On Wed, Jun 25, 2014 at 6:20 PM, Christoph Berg <cb(at)df7cb(dot)de
> <mailto:cb(at)df7cb(dot)de>> wrote:
>>
>> Hi,
>>
>> is there a reason there's no ALTER SYSTEM RESET?
>>
>> The natural idiom to reset SET statements is "RESET guc;", I don't
>> think "SET guc = default;" is in use much, so "ALTER SYSTEM RESET guc;"
>> would be the natural way to try.
>
> Currently you can achieve that by
> "ALTER SYSTEM RESET guc = Default;".
> However it will be good to have support for RESET as well. I think it
> should not be too complicated to implement that syntax, I personally
> don't have bandwidth to it immediately, but I would like to take care
> of it unless you or someone wants to do it by the time I get some
> bandwidth.

Would something like this suffice?
--
Vik

Attachment Content-Type Size
alter_system_reset.v1.patch text/x-diff 2.3 KB

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-25 19:01:34
Message-ID: CAFcNs+r8pTczW+pGk7FtEgWm4PV_y5z4TuYPa6n+ApAK8EiChg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jun 25, 2014 at 1:26 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:

> On 06/25/2014 03:04 PM, Amit Kapila wrote:
> > On Wed, Jun 25, 2014 at 6:20 PM, Christoph Berg <cb(at)df7cb(dot)de
> > <mailto:cb(at)df7cb(dot)de>> wrote:
> >>
> >> Hi,
> >>
> >> is there a reason there's no ALTER SYSTEM RESET?
> >>
> >> The natural idiom to reset SET statements is "RESET guc;", I don't
> >> think "SET guc = default;" is in use much, so "ALTER SYSTEM RESET guc;"
> >> would be the natural way to try.
> >
> > Currently you can achieve that by
> > "ALTER SYSTEM RESET guc = Default;".
> > However it will be good to have support for RESET as well. I think it
> > should not be too complicated to implement that syntax, I personally
> > don't have bandwidth to it immediately, but I would like to take care
> > of it unless you or someone wants to do it by the time I get some
> > bandwidth.
>
> Would something like this suffice?
>
>
Is fine to me...

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello


From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-26 03:07:05
Message-ID: CAA4eK1+Zt_Uo-z7WjP2yznv7AYTxGBqgp23wCMPuB9SdMgyGcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jun 25, 2014 at 9:56 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
> On 06/25/2014 03:04 PM, Amit Kapila wrote:
> > Currently you can achieve that by
> > "ALTER SYSTEM RESET guc = Default;".
> > However it will be good to have support for RESET as well. I think it
> > should not be too complicated to implement that syntax, I personally
> > don't have bandwidth to it immediately, but I would like to take care
> > of it unless you or someone wants to do it by the time I get some
> > bandwidth.
>
> Would something like this suffice?

I think it will make sense if we support RESET ALL as well similar
to Alter Database .. RESET ALL syntax. Do you see any reason
why we shouldn't support RESET ALL syntax for Alter System?

About patch:

+ | ALTER SYSTEM_P RESET var_name
+ {
+ AlterSystemStmt *n = makeNode(AlterSystemStmt);
+ n->setstmt = makeNode(VariableSetStmt);
+ n->setstmt->kind = VAR_RESET;
+ n->setstmt->name = $4;
+ $ = (Node *)n;
+ }

I think it would be better to have ALTER SYSTEM_P as generic and
then SET | RESET as different versions, something like below:

| SET reloptions
{
AlterTableCmd *n = makeNode(AlterTableCmd);
n->subtype = AT_SetRelOptions;
n->def = (Node *)$2;
$$ = (Node *)n;
}
/* ALTER TABLE <name> RESET (...) */
| RESET reloptions
{
AlterTableCmd *n = makeNode(AlterTableCmd);
n->subtype = AT_ResetRelOptions;
n->def = (Node *)$2;
$$ = (Node *)n;
}

Another point is that if we decide to support RESET ALL syntax, then
we might want reuse VariableResetStmt, may be by breaking into
generic and specific like we have done for generic_set.

Thanks for working on patch.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


From: Christoph Berg <cb(at)df7cb(dot)de>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-26 08:08:33
Message-ID: 20140626080833.GA10331@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Re: Amit Kapila 2014-06-26 <CAA4eK1+Zt_Uo-z7WjP2yznv7AYTxGBqgp23wCMPuB9SdMgyGcQ(at)mail(dot)gmail(dot)com>
> On Wed, Jun 25, 2014 at 9:56 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
> > On 06/25/2014 03:04 PM, Amit Kapila wrote:
> > > Currently you can achieve that by
> > > "ALTER SYSTEM RESET guc = Default;".
> > > However it will be good to have support for RESET as well. I think it
> > > should not be too complicated to implement that syntax, I personally
> > > don't have bandwidth to it immediately, but I would like to take care
> > > of it unless you or someone wants to do it by the time I get some
> > > bandwidth.
> >
> > Would something like this suffice?
>
> I think it will make sense if we support RESET ALL as well similar
> to Alter Database .. RESET ALL syntax. Do you see any reason
> why we shouldn't support RESET ALL syntax for Alter System?

RESET ALL would definitely be useful to have as well.

Christoph
--
cb(at)df7cb(dot)de | http://www.df7cb.de/


From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-26 14:47:09
Message-ID: 53AC326D.5080408@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 06/26/2014 05:07 AM, Amit Kapila wrote:
> On Wed, Jun 25, 2014 at 9:56 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com
> <mailto:vik(dot)fearing(at)dalibo(dot)com>> wrote:
>> On 06/25/2014 03:04 PM, Amit Kapila wrote:
>> > Currently you can achieve that by
>> > "ALTER SYSTEM RESET guc = Default;".
>> > However it will be good to have support for RESET as well. I think it
>> > should not be too complicated to implement that syntax, I personally
>> > don't have bandwidth to it immediately, but I would like to take care
>> > of it unless you or someone wants to do it by the time I get some
>> > bandwidth.
>>
>> Would something like this suffice?
>
> I think it will make sense if we support RESET ALL as well similar
> to Alter Database .. RESET ALL syntax. Do you see any reason
> why we shouldn't support RESET ALL syntax for Alter System?

Yes, that makes sense. I've added that in the attached version 2 of the
patch.

> About patch:
>
> + | ALTER SYSTEM_P RESET var_name
> + {
> + AlterSystemStmt *n = makeNode(AlterSystemStmt);
> + n->setstmt = makeNode(VariableSetStmt);
> + n->setstmt->kind = VAR_RESET;
> + n->setstmt->name = $4;
> + $ = (Node *)n;
> + }
>
> I think it would be better to have ALTER SYSTEM_P as generic and
> then SET | RESET as different versions, something like below:
>
> | SET reloptions
> {
> AlterTableCmd *n = makeNode(AlterTableCmd);
> n->subtype = AT_SetRelOptions;
> n->def = (Node *)$2;
> $$ = (Node *)n;
> }
> /* ALTER TABLE <name> RESET (...) */
> | RESET reloptions
> {
> AlterTableCmd *n = makeNode(AlterTableCmd);
> n->subtype = AT_ResetRelOptions;
> n->def = (Node *)$2;
> $$ = (Node *)n;
> }
>
> Another point is that if we decide to support RESET ALL syntax, then
> we might want reuse VariableResetStmt, may be by breaking into
> generic and specific like we have done for generic_set.

I didn't quite follow your ALTER TABLE example because I don't think
it's necessary, but I did split out VariableResetStmt like you suggested
because I think that is indeed cleaner.

> Thanks for working on patch.

You're welcome.
--
Vik

Attachment Content-Type Size
alter_system_reset.v2.patch text/x-diff 9.7 KB

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-27 04:22:57
Message-ID: CAA4eK1LvqBfNdoGO4YUZMOgcHg7Mi_9oVD2B5XJPtU_KTXLdew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jun 26, 2014 at 8:17 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
> On 06/26/2014 05:07 AM, Amit Kapila wrote:
> > I think it will make sense if we support RESET ALL as well similar
> > to Alter Database .. RESET ALL syntax. Do you see any reason
> > why we shouldn't support RESET ALL syntax for Alter System?
>
> Yes, that makes sense. I've added that in the attached version 2 of the
> patch.

I think the idea used in patch to implement RESET ALL is sane. In passing
by, I noticed that modified lines in .sgml have crossed 80 char
boundary which
is generally preferred to be maintained..

Refer below modification.

! values to the <filename>postgresql.auto.conf</filename> file. Setting
the parameter to
! <literal>DEFAULT</literal>, or using the <command>RESET</command>
variant, removes the configuration entry from

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-27 06:49:25
Message-ID: 53AD13F5.1020701@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 06/27/2014 06:22 AM, Amit Kapila wrote:
> On Thu, Jun 26, 2014 at 8:17 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com
> <mailto:vik(dot)fearing(at)dalibo(dot)com>> wrote:
>> On 06/26/2014 05:07 AM, Amit Kapila wrote:
>> > I think it will make sense if we support RESET ALL as well similar
>> > to Alter Database .. RESET ALL syntax. Do you see any reason
>> > why we shouldn't support RESET ALL syntax for Alter System?
>>
>> Yes, that makes sense. I've added that in the attached version 2 of the
>> patch.
>
> I think the idea used in patch to implement RESET ALL is sane. In passing
> by, I noticed that modified lines in .sgml have crossed 80 char
> boundary which
> is generally preferred to be maintained..
>
> Refer below modification.
>
> ! values to the <filename>postgresql.auto.conf</filename> file.
> Setting the parameter to
> ! <literal>DEFAULT</literal>, or using the <command>RESET</command>
> variant, removes the configuration entry from

I did that on purpose so that it's easy for a reviewer/committer to see
what changed.

This third patch reformats the documentation in the way I expected it to
be committed.
--
Vik

Attachment Content-Type Size
alter_system_reset.v3.patch text/x-diff 9.7 KB

From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-27 06:57:59
Message-ID: 53AD15F7.2060506@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 06/27/2014 08:49 AM, Vik Fearing wrote:
> This third patch reformats the documentation in the way I expected it to
> be committed.

Amit,

I added this to the next commitfest with your name as reviewer.

https://commitfest.postgresql.org/action/patch_view?id=1495

Please update the status as you see fit.
--
Vik


From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-28 04:35:25
Message-ID: CAA4eK1K29YCCfifXV0-G-smP-F5=mVgfxRpHs9D2DhxbdYeaig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Jun 27, 2014 at 12:27 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
wrote:
> On 06/27/2014 08:49 AM, Vik Fearing wrote:
> > This third patch reformats the documentation in the way I expected it to
> > be committed.
>
> Amit,
>
> I added this to the next commitfest with your name as reviewer.

No issues, I will review it in next CF.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


From: Christoph Berg <cb(at)df7cb(dot)de>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-28 17:08:49
Message-ID: 20140628170849.GA5808@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Re: Vik Fearing 2014-06-27 <53AD15F7(dot)2060506(at)dalibo(dot)com>
> On 06/27/2014 08:49 AM, Vik Fearing wrote:
> > This third patch reformats the documentation in the way I expected it to
> > be committed.
>
> Amit,
>
> I added this to the next commitfest with your name as reviewer.
>
> https://commitfest.postgresql.org/action/patch_view?id=1495
>
> Please update the status as you see fit.

Isn't this 9.4 material? It seems like an oversight in the ALTER
SYSTEM implementation, and people will be expecting "ALTER SYTEM
(RE)SET guc" to just work like "(RE)SET guc".

It was mentioned by Alvaro there:
http://www.postgresql.org/message-id/20130802173458.GO5669@eldon.alvh.no-ip.org

Christoph
--
cb(at)df7cb(dot)de | http://www.df7cb.de/


From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Christoph Berg <cb(at)df7cb(dot)de>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-06-29 03:13:17
Message-ID: CAA4eK1LcLDLRAqShwd4oQp=xPyU7AvqtpcerRgA3ox=6T_iz9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Jun 28, 2014 at 10:38 PM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
> Re: Vik Fearing 2014-06-27 <53AD15F7(dot)2060506(at)dalibo(dot)com>
> > Amit,
> >
> > I added this to the next commitfest with your name as reviewer.
> >
> > https://commitfest.postgresql.org/action/patch_view?id=1495
> >
> > Please update the status as you see fit.
>
> Isn't this 9.4 material?

I think it's late for adding new feature/sub-feature/minor enhancement in
9.4, unless without that base feature won't work.

Isn't your use case addressed by alternative suggested by me upthread?

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-07-30 03:41:54
Message-ID: CAA4eK1Ja2WvzTp5MftZOipmA3dZkL-U+LT11N3Vexx6ZeRjwcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jun 26, 2014 at 8:17 PM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
> I didn't quite follow your ALTER TABLE example because I don't think
> it's necessary,
I was asking to split the ALTER SYSTEM command like it's there
for ALTER TABLE (AlterTableStmt:
ALTER TABLE relation_expr alter_table_cmds).
It would have make adding further commands to ALTER SYSTEM bit
simpler and systemetic. However as there is no correctness issue here,
so lets leave it like you have currently done in patch.

I have verified the patch and found that it works well for
all scenario's. Few minor suggestions:

1.
! values to the <filename>postgresql.auto.conf</filename> file.
! Setting the parameter to <literal>DEFAULT</literal>, or using the
! <command>RESET</command> variant, removes the configuration entry from

It would be better if we can write a separate line for RESET ALL
as is written in case of both Alter Database and Alter Role in their
respective documentation.

2.
! %type <vsetstmt> generic_set set_rest set_rest_more generic_reset
reset_rest SetResetClause FunctionSetResetClause

Good to break it into 2 lines.

3. I think we can add some text on top of function
AlterSystemSetConfigFile() to explain functionality w.r.t reset all.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-08-25 04:34:22
Message-ID: CAA4eK1JFwkKfSfGL9ZB8_gkoaQTGZj28hx+Lp1ZOokDxMD1=pQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jul 30, 2014 at 9:11 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
> I have verified the patch and found that it works well for
> all scenario's. Few minor suggestions:
>
> 1.
> ! values to the <filename>postgresql.auto.conf</filename> file.
> ! Setting the parameter to <literal>DEFAULT</literal>, or using the
> ! <command>RESET</command> variant, removes the configuration entry
from
>
> It would be better if we can write a separate line for RESET ALL
> as is written in case of both Alter Database and Alter Role in their
> respective documentation.
>
> 2.
> ! %type <vsetstmt> generic_set set_rest set_rest_more generic_reset
reset_rest SetResetClause FunctionSetResetClause
>
> Good to break it into 2 lines.
>
> 3. I think we can add some text on top of function
> AlterSystemSetConfigFile() to explain functionality w.r.t reset all.

I have updated the patch to address the above points.

I will mark this patch as "Ready For Committer" as most of the
review comments were already addressed by Vik and remaining
I have addressed in attached patch.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
alter_system_reset.v4.patch application/octet-stream 8.6 KB

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-08-27 13:46:17
Message-ID: CAHGQGwECrMNsr8EvjxTGfbX0tBqLpE0HTRXbuiwPeUwgS7+Ukg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Aug 25, 2014 at 1:34 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Wed, Jul 30, 2014 at 9:11 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> wrote:
>> I have verified the patch and found that it works well for
>> all scenario's. Few minor suggestions:
>>
>> 1.
>> ! values to the <filename>postgresql.auto.conf</filename> file.
>> ! Setting the parameter to <literal>DEFAULT</literal>, or using the
>> ! <command>RESET</command> variant, removes the configuration entry
>> from
>>
>> It would be better if we can write a separate line for RESET ALL
>> as is written in case of both Alter Database and Alter Role in their
>> respective documentation.
>>
>> 2.
>> ! %type <vsetstmt> generic_set set_rest set_rest_more generic_reset
>> reset_rest SetResetClause FunctionSetResetClause
>>
>> Good to break it into 2 lines.
>>
>> 3. I think we can add some text on top of function
>> AlterSystemSetConfigFile() to explain functionality w.r.t reset all.
>
> I have updated the patch to address the above points.
>
> I will mark this patch as "Ready For Committer" as most of the
> review comments were already addressed by Vik and remaining
> I have addressed in attached patch.

The patch looks good to me. One minor comment is; probably you need to
update the tab-completion code.

Regards,

--
Fujii Masao


From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-08-30 03:27:27
Message-ID: CAA4eK1LZWomfHEij8pnW5aQ=QyQKomDHCoQcz9cmSwU_pJL-tA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Aug 27, 2014 at 7:16 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> The patch looks good to me. One minor comment is; probably you need to
> update the tab-completion code.

Thanks for the review. I have updated the patch to support
tab-completion.
As this is a relatively minor change, I will mark it as
"Ready For Committer" rather than "Needs Review".

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
alter_system_reset.v5.patch application/octet-stream 10.2 KB

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-01 10:27:16
Message-ID: CAHGQGwF_kbu0P2_hcte-xwg0ntactCAUK3Mr0g-xZ2BsN6OyPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Aug 30, 2014 at 12:27 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Wed, Aug 27, 2014 at 7:16 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> The patch looks good to me. One minor comment is; probably you need to
>> update the tab-completion code.
>
> Thanks for the review. I have updated the patch to support
> tab-completion.
> As this is a relatively minor change, I will mark it as
> "Ready For Committer" rather than "Needs Review".

Thanks for updating the patch!

One more minor comment is; what about applying the following change
for the tab-completion for RESET ALL? This causes the tab-completion of
even ALTER SYSTEM SET to display "all" and that's strange. But
the tab-completion of "SET" has already had the same problem. So
I think that we can live with that. Attached is the patch that I added
the following change onto your patch. Barring any objection, I will commit
the patch.

@@ -545,7 +545,8 @@ static const SchemaQuery Query_for_list_of_matviews = {
"SELECT name FROM "\
" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\
" WHERE context != 'internal') ss "\
-" WHERE substring(name,1,%d)='%s'"
+" WHERE substring(name,1,%d)='%s'"\
+" UNION ALL SELECT 'all' ss"

Regards,

--
Fujii Masao

Attachment Content-Type Size
alter_system_reset.v6.patch text/x-patch 13.1 KB

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-01 13:54:43
Message-ID: CAA4eK1LRVRa00Wdm9Ej0aQKWcdZ03k3i5wYKbhdknBWxwteByQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Sep 1, 2014 at 3:57 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Sat, Aug 30, 2014 at 12:27 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
> > On Wed, Aug 27, 2014 at 7:16 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
wrote:
> >> The patch looks good to me. One minor comment is; probably you need to
> >> update the tab-completion code.
> >
> > Thanks for the review. I have updated the patch to support
> > tab-completion.
> > As this is a relatively minor change, I will mark it as
> > "Ready For Committer" rather than "Needs Review".
>
> Thanks for updating the patch!
>
> One more minor comment is; what about applying the following change
> for the tab-completion for RESET ALL? This causes the tab-completion of
> even ALTER SYSTEM SET to display "all" and that's strange. But
> the tab-completion of "SET" has already had the same problem. So
> I think that we can live with that.

Right and I have checked that behaviour is same for other similar
statements like Alter Database <database_name> SET <config_var>
or Alter User <user_name> SET <config_var>. So, the change
made by you is on similar lines.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-02 07:26:09
Message-ID: CAHGQGwEsBYFUa2uo_+5O7XtCPTuDvqS+uR92bmmZftHRZAK69Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Sep 1, 2014 at 10:54 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Mon, Sep 1, 2014 at 3:57 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>
>> On Sat, Aug 30, 2014 at 12:27 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
>> wrote:
>> > On Wed, Aug 27, 2014 at 7:16 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
>> > wrote:
>> >> The patch looks good to me. One minor comment is; probably you need to
>> >> update the tab-completion code.
>> >
>> > Thanks for the review. I have updated the patch to support
>> > tab-completion.
>> > As this is a relatively minor change, I will mark it as
>> > "Ready For Committer" rather than "Needs Review".
>>
>> Thanks for updating the patch!
>>
>> One more minor comment is; what about applying the following change
>> for the tab-completion for RESET ALL? This causes the tab-completion of
>> even ALTER SYSTEM SET to display "all" and that's strange. But
>> the tab-completion of "SET" has already had the same problem. So
>> I think that we can live with that.
>
> Right and I have checked that behaviour is same for other similar
> statements like Alter Database <database_name> SET <config_var>
> or Alter User <user_name> SET <config_var>. So, the change
> made by you is on similar lines.

OK. Applied.

Regards,

--
Fujii Masao


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-02 14:12:17
Message-ID: 20140902141217.GA14037@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Fujii Masao wrote:
> On Mon, Sep 1, 2014 at 10:54 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > On Mon, Sep 1, 2014 at 3:57 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> >>
> >> On Sat, Aug 30, 2014 at 12:27 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> >> wrote:
> >> > On Wed, Aug 27, 2014 at 7:16 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
> >> > wrote:
> >> >> The patch looks good to me. One minor comment is; probably you need to
> >> >> update the tab-completion code.
> >> >
> >> > Thanks for the review. I have updated the patch to support
> >> > tab-completion.
> >> > As this is a relatively minor change, I will mark it as
> >> > "Ready For Committer" rather than "Needs Review".
> >>
> >> Thanks for updating the patch!
> >>
> >> One more minor comment is; what about applying the following change
> >> for the tab-completion for RESET ALL? This causes the tab-completion of
> >> even ALTER SYSTEM SET to display "all" and that's strange. But
> >> the tab-completion of "SET" has already had the same problem. So
> >> I think that we can live with that.
> >
> > Right and I have checked that behaviour is same for other similar
> > statements like Alter Database <database_name> SET <config_var>
> > or Alter User <user_name> SET <config_var>. So, the change
> > made by you is on similar lines.
>
> OK. Applied.

Uhm, are we agreed on the decision on not to backpatch this? I would
think this should have been part of the initial ALTER SYSTEM SET patch
and thus should be backpatched to 9.4.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-02 14:23:21
Message-ID: 5405D2D9.9050801@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 09/02/2014 04:12 PM, Alvaro Herrera wrote:
> Fujii Masao wrote:
>> On Mon, Sep 1, 2014 at 10:54 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>> On Mon, Sep 1, 2014 at 3:57 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>>>
>>>> On Sat, Aug 30, 2014 at 12:27 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
>>>> wrote:
>>>>> On Wed, Aug 27, 2014 at 7:16 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
>>>>> wrote:
>>>>>> The patch looks good to me. One minor comment is; probably you need to
>>>>>> update the tab-completion code.
>>>>>
>>>>> Thanks for the review. I have updated the patch to support
>>>>> tab-completion.
>>>>> As this is a relatively minor change, I will mark it as
>>>>> "Ready For Committer" rather than "Needs Review".
>>>>
>>>> Thanks for updating the patch!
>>>>
>>>> One more minor comment is; what about applying the following change
>>>> for the tab-completion for RESET ALL? This causes the tab-completion of
>>>> even ALTER SYSTEM SET to display "all" and that's strange. But
>>>> the tab-completion of "SET" has already had the same problem. So
>>>> I think that we can live with that.
>>>
>>> Right and I have checked that behaviour is same for other similar
>>> statements like Alter Database <database_name> SET <config_var>
>>> or Alter User <user_name> SET <config_var>. So, the change
>>> made by you is on similar lines.
>>
>> OK. Applied.
>
> Uhm, are we agreed on the decision on not to backpatch this? I would
> think this should have been part of the initial ALTER SYSTEM SET patch
> and thus should be backpatched to 9.4.

I think it belongs in 9.4 as well, especially if we're having another beta.
--
Vik


From: Christoph Berg <cb(at)df7cb(dot)de>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-02 15:08:26
Message-ID: 20140902150826.GB10561@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Re: Vik Fearing 2014-09-02 <5405D2D9(dot)9050801(at)dalibo(dot)com>
> > Uhm, are we agreed on the decision on not to backpatch this? I would
> > think this should have been part of the initial ALTER SYSTEM SET patch
> > and thus should be backpatched to 9.4.
>
> I think it belongs in 9.4 as well, especially if we're having another beta.

My original complaint was about 9.4, so I'd like to see it there, yes.

IMHO it doesn't make sense to ship a crippled version first, let users
get used to the fact that "(RE)SET" and "ALTER SYSTEM (RE)SET" behave
differently, and then ship the full feature in 9.5 later.

Also, this should be something that is trivially to test, so there's
little chance of slipping bugs into 9.4 that would go unnoticed.

Christoph
--
cb(at)df7cb(dot)de | http://www.df7cb.de/


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Christoph Berg <cb(at)df7cb(dot)de>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-10 12:06:28
Message-ID: CAHGQGwFDy9m_Drmg+c5jyNzbaU3izOOmmGGV7wdxPFQNO+_unA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Sep 3, 2014 at 12:08 AM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
> Re: Vik Fearing 2014-09-02 <5405D2D9(dot)9050801(at)dalibo(dot)com>
>> > Uhm, are we agreed on the decision on not to backpatch this? I would
>> > think this should have been part of the initial ALTER SYSTEM SET patch
>> > and thus should be backpatched to 9.4.
>>
>> I think it belongs in 9.4 as well, especially if we're having another beta.
>
> My original complaint was about 9.4, so I'd like to see it there, yes.

ISTM that the consensus is to do the back-patch to 9.4.
Does anyone object to the back-patch? If not, I will do that.

Regards,

--
Fujii Masao


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Christoph Berg <cb(at)df7cb(dot)de>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM RESET?
Date: 2014-09-12 14:44:27
Message-ID: CAHGQGwGkfWGVKL0Sz4DVq9BfJObjhyhgh5FJ8E03atgzC7cQRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Sep 10, 2014 at 9:06 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Sep 3, 2014 at 12:08 AM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
>> Re: Vik Fearing 2014-09-02 <5405D2D9(dot)9050801(at)dalibo(dot)com>
>>> > Uhm, are we agreed on the decision on not to backpatch this? I would
>>> > think this should have been part of the initial ALTER SYSTEM SET patch
>>> > and thus should be backpatched to 9.4.
>>>
>>> I think it belongs in 9.4 as well, especially if we're having another beta.
>>
>> My original complaint was about 9.4, so I'd like to see it there, yes.
>
> ISTM that the consensus is to do the back-patch to 9.4.
> Does anyone object to the back-patch? If not, I will do that.

Done because no one voiced objection against the back-patch.

Regards,

--
Fujii Masao