Re: Is this a bug?

Lists: pgsql-hackers
From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Is this a bug?
Date: 2014-03-13 03:11:21
Message-ID: CAFcNs+qqAnt_g7Tr4Df-zPi+ybNXijDOU7eYtOJbZaGNQyE-Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi all,

Shouldn't the "ALTER" statements below raise an exception?

fabrizio=# CREATE TABLE foo(bar SERIAL PRIMARY KEY);
CREATE TABLE

fabrizio=# SELECT relname, reloptions FROM pg_class WHERE relname ~ '^foo';
relname | reloptions
-------------+------------
foo |
foo_bar_seq |
foo_pkey |
(3 rows)

fabrizio=# ALTER TABLE foo RESET (noname);
ALTER TABLE

fabrizio=# ALTER INDEX foo_pkey RESET (noname);
ALTER INDEX

fabrizio=# ALTER TABLE foo ALTER COLUMN bar RESET (noname);
ALTER TABLE

If I try to "SET" an option called "noname" obviously will raise an
exception:

fabrizio=# ALTER TABLE foo SET (noname=1);
ERROR: unrecognized parameter "noname"

fabrizio=# ALTER INDEX foo_pkey SET (noname=1);
ERROR: unrecognized parameter "noname"

fabrizio=# ALTER TABLE foo ALTER COLUMN bar SET (noname=1);
ERROR: unrecognized parameter "noname"

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: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fabrízio Mello <fabriziomello(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this a bug?
Date: 2014-03-13 13:22:41
Message-ID: CA+Tgmobr9tkFUoUvFCJoA4fkrjz6Vd+KScd0yYpROsXZxaC4eQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Mar 12, 2014 at 11:11 PM, Fabrízio de Royes Mello
<fabriziomello(at)gmail(dot)com> wrote:
> Hi all,
>
> Shouldn't the "ALTER" statements below raise an exception?
>
> fabrizio=# CREATE TABLE foo(bar SERIAL PRIMARY KEY);
> CREATE TABLE
>
> fabrizio=# SELECT relname, reloptions FROM pg_class WHERE relname ~ '^foo';
> relname | reloptions
> -------------+------------
> foo |
> foo_bar_seq |
> foo_pkey |
> (3 rows)
>
> fabrizio=# ALTER TABLE foo RESET (noname);
> ALTER TABLE
>
> fabrizio=# ALTER INDEX foo_pkey RESET (noname);
> ALTER INDEX
>
> fabrizio=# ALTER TABLE foo ALTER COLUMN bar RESET (noname);
> ALTER TABLE
>
>
> If I try to "SET" an option called "noname" obviously will raise an
> exception:
>
> fabrizio=# ALTER TABLE foo SET (noname=1);
> ERROR: unrecognized parameter "noname"

Well, it's fairly harmless, but it might not be a bad idea to tighten that up.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: fabriziomello(at)gmail(dot)com
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this a bug?
Date: 2014-03-13 13:34:32
Message-ID: 5321B3E8.4070209@timbira.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 13-03-2014 00:11, Fabrízio de Royes Mello wrote:
> Shouldn't the "ALTER" statements below raise an exception?
>
For consistency, yes. Who cares? I mean, there is no harm in resetting
an unrecognized parameter. Have in mind that tighten it up could break
scripts. In general, I'm in favor of validating things.

euler(at)euler=# reset noname;
ERROR: 42704: unrecognized configuration parameter "noname"
LOCAL: set_config_option, guc.c:5220

--
Euler Taveira Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this a bug?
Date: 2014-03-13 14:04:00
Message-ID: CAFcNs+r-0Rkw5YDtt=NtyC7K4B4V9AsZ_OGd+DLk728fskAAnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 13, 2014 at 10:34 AM, Euler Taveira <euler(at)timbira(dot)com(dot)br>
wrote:
>
> On 13-03-2014 00:11, Fabrízio de Royes Mello wrote:
> > Shouldn't the "ALTER" statements below raise an exception?
> >
> For consistency, yes. Who cares? I mean, there is no harm in resetting
> an unrecognized parameter. Have in mind that tighten it up could break
> scripts. In general, I'm in favor of validating things.
>

I know this could break scripts, but I think a consistent behavior should
be raise an exception when an option doesn't exists.

> euler(at)euler=# reset noname;
> ERROR: 42704: unrecognized configuration parameter "noname"
> LOCAL: set_config_option, guc.c:5220
>

This is a consistent behavior.

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: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is this a bug
Date: 2014-03-13 15:53:08
Message-ID: 1394725988158-5795943.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

fabriziomello wrote
> On Thu, Mar 13, 2014 at 10:34 AM, Euler Taveira &lt;

> euler(at)(dot)com

> &gt;
> wrote:
>>
>> On 13-03-2014 00:11, Fabrízio de Royes Mello wrote:
>> > Shouldn't the "ALTER" statements below raise an exception?
>> >
>> For consistency, yes. Who cares? I mean, there is no harm in resetting
>> an unrecognized parameter. Have in mind that tighten it up could break
>> scripts. In general, I'm in favor of validating things.
>>
>
> I know this could break scripts, but I think a consistent behavior should
> be raise an exception when an option doesn't exists.
>
>> euler(at)euler=# reset noname;
>> ERROR: 42704: unrecognized configuration parameter "noname"
>> LOCAL: set_config_option, guc.c:5220
>>
>
> This is a consistent behavior.
>
> Regards,

Probably shouldn't back-patch but a fix and release comment in 9.4 is
warranted.

Scripts resetting invalid parameters are probably already broken, they just
haven't discovered their mistake yet.

Do we need an "IF EXISTS" feature on these as well? ;)

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Is-this-a-bug-tp5795831p5795943.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.


From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-03-18 01:24:58
Message-ID: CAFcNs+qH8P9Sgn57QGb+Gu3MVXRYR7oM0uAC9i51MzHjrsGnFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Wed, Mar 12, 2014 at 11:11 PM, Fabrízio de Royes Mello
> <fabriziomello(at)gmail(dot)com> wrote:
> > Hi all,
> >
> > Shouldn't the "ALTER" statements below raise an exception?
> >
> > fabrizio=# CREATE TABLE foo(bar SERIAL PRIMARY KEY);
> > CREATE TABLE
> >
> > fabrizio=# SELECT relname, reloptions FROM pg_class WHERE relname ~
'^foo';
> > relname | reloptions
> > -------------+------------
> > foo |
> > foo_bar_seq |
> > foo_pkey |
> > (3 rows)
> >
> > fabrizio=# ALTER TABLE foo RESET (noname);
> > ALTER TABLE
> >
> > fabrizio=# ALTER INDEX foo_pkey RESET (noname);
> > ALTER INDEX
> >
> > fabrizio=# ALTER TABLE foo ALTER COLUMN bar RESET (noname);
> > ALTER TABLE
> >
> >
> > If I try to "SET" an option called "noname" obviously will raise an
> > exception:
> >
> > fabrizio=# ALTER TABLE foo SET (noname=1);
> > ERROR: unrecognized parameter "noname"
>
> Well, it's fairly harmless, but it might not be a bad idea to tighten
that up.
>

The attached patch tighten that up.

Grettings,

--
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

Attachment Content-Type Size
alter-object-reset-exception-v1.patch text/x-diff 2.8 KB

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: fabriziomello(at)gmail(dot)com
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-03-18 02:27:35
Message-ID: CAB7nPqTm4qBemrHBHq=06+XAXn8PXaFk75wx_VADFoUt0=uFkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello
<fabriziomello(at)gmail(dot)com> wrote:
>
> On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Well, it's fairly harmless, but it might not be a bad idea to tighten that
>> up.
> The attached patch tighten that up.
Hm... It might be interesting to include it in 9.4 IMO, somewhat
grouping with what has been done in a6542a4 for SET and ABORT.
--
Michael


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-03-18 13:11:46
Message-ID: CA+TgmoY5_gA67NE5u3+YZsWsWXcvdUpiGNV+S5Ai0dRk=razDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Mar 17, 2014 at 10:27 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello
> <fabriziomello(at)gmail(dot)com> wrote:
>>
>> On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> Well, it's fairly harmless, but it might not be a bad idea to tighten that
>>> up.
>> The attached patch tighten that up.
> Hm... It might be interesting to include it in 9.4 IMO, somewhat
> grouping with what has been done in a6542a4 for SET and ABORT.

Meh. There will always be another thing we could squeeze in; I don't
think this is particularly urgent, and it's late to the party.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-21 23:17:17
Message-ID: 20140821231717.GD17771@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Mar 18, 2014 at 09:11:46AM -0400, Robert Haas wrote:
> On Mon, Mar 17, 2014 at 10:27 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
> > On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello
> > <fabriziomello(at)gmail(dot)com> wrote:
> >>
> >> On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >>> Well, it's fairly harmless, but it might not be a bad idea to tighten that
> >>> up.
> >> The attached patch tighten that up.
> > Hm... It might be interesting to include it in 9.4 IMO, somewhat
> > grouping with what has been done in a6542a4 for SET and ABORT.
>
> Meh. There will always be another thing we could squeeze in; I don't
> think this is particularly urgent, and it's late to the party.

Do we want this patch for 9.5? It throws an error for invalid reloption
specifications.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-22 14:27:02
Message-ID: CA+TgmoaACOHXjz9B4d1LhQOgxbqCK+kWUOS=Vhe+Qt1ntbTUFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Aug 21, 2014 at 7:17 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Tue, Mar 18, 2014 at 09:11:46AM -0400, Robert Haas wrote:
>> On Mon, Mar 17, 2014 at 10:27 PM, Michael Paquier
>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> > On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello
>> > <fabriziomello(at)gmail(dot)com> wrote:
>> >>
>> >> On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> >>> Well, it's fairly harmless, but it might not be a bad idea to tighten that
>> >>> up.
>> >> The attached patch tighten that up.
>> > Hm... It might be interesting to include it in 9.4 IMO, somewhat
>> > grouping with what has been done in a6542a4 for SET and ABORT.
>>
>> Meh. There will always be another thing we could squeeze in; I don't
>> think this is particularly urgent, and it's late to the party.
>
> Do we want this patch for 9.5? It throws an error for invalid reloption
> specifications.

Fine with me. But I have a vague recollection of seeing pg_upgrade
doing this on purpose to create TOAST tables or something... am I
misremembering?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-22 16:53:30
Message-ID: 20140822165330.GB21456@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 22, 2014 at 10:27:02AM -0400, Robert Haas wrote:
> On Thu, Aug 21, 2014 at 7:17 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > On Tue, Mar 18, 2014 at 09:11:46AM -0400, Robert Haas wrote:
> >> On Mon, Mar 17, 2014 at 10:27 PM, Michael Paquier
> >> <michael(dot)paquier(at)gmail(dot)com> wrote:
> >> > On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello
> >> > <fabriziomello(at)gmail(dot)com> wrote:
> >> >>
> >> >> On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >> >>> Well, it's fairly harmless, but it might not be a bad idea to tighten that
> >> >>> up.
> >> >> The attached patch tighten that up.
> >> > Hm... It might be interesting to include it in 9.4 IMO, somewhat
> >> > grouping with what has been done in a6542a4 for SET and ABORT.
> >>
> >> Meh. There will always be another thing we could squeeze in; I don't
> >> think this is particularly urgent, and it's late to the party.
> >
> > Do we want this patch for 9.5? It throws an error for invalid reloption
> > specifications.
>
> Fine with me. But I have a vague recollection of seeing pg_upgrade
> doing this on purpose to create TOAST tables or something... am I
> misremembering?

Yes, you remember well. I will have to find a different way for
pg_upgrade to call a no-op ALTER TABLE, which is fine.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-22 18:33:57
Message-ID: 20140822183357.GC21456@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 22, 2014 at 12:53:30PM -0400, Bruce Momjian wrote:
> On Fri, Aug 22, 2014 at 10:27:02AM -0400, Robert Haas wrote:
> > On Thu, Aug 21, 2014 at 7:17 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > > On Tue, Mar 18, 2014 at 09:11:46AM -0400, Robert Haas wrote:
> > >> On Mon, Mar 17, 2014 at 10:27 PM, Michael Paquier
> > >> <michael(dot)paquier(at)gmail(dot)com> wrote:
> > >> > On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello
> > >> > <fabriziomello(at)gmail(dot)com> wrote:
> > >> >>
> > >> >> On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > >> >>> Well, it's fairly harmless, but it might not be a bad idea to tighten that
> > >> >>> up.
> > >> >> The attached patch tighten that up.
> > >> > Hm... It might be interesting to include it in 9.4 IMO, somewhat
> > >> > grouping with what has been done in a6542a4 for SET and ABORT.
> > >>
> > >> Meh. There will always be another thing we could squeeze in; I don't
> > >> think this is particularly urgent, and it's late to the party.
> > >
> > > Do we want this patch for 9.5? It throws an error for invalid reloption
> > > specifications.
> >
> > Fine with me. But I have a vague recollection of seeing pg_upgrade
> > doing this on purpose to create TOAST tables or something... am I
> > misremembering?
>
> Yes, you remember well. I will have to find a different way for
> pg_upgrade to call a no-op ALTER TABLE, which is fine.

Looking at the ALTER TABLE options, I am going to put this check in a
!IsBinaryUpgrade block so pg_upgrade can still use its trick.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +


From: Andres Freund <andres(at)anarazel(dot)de>
To: Bruce Momjian <bruce(at)momjian(dot)us>,Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-22 18:54:54
Message-ID: 26c80536-ff71-40ed-a9d7-ca1b92238f13@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On August 22, 2014 8:33:57 PM CEST, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>On Fri, Aug 22, 2014 at 12:53:30PM -0400, Bruce Momjian wrote:
>> On Fri, Aug 22, 2014 at 10:27:02AM -0400, Robert Haas wrote:
>> > On Thu, Aug 21, 2014 at 7:17 PM, Bruce Momjian <bruce(at)momjian(dot)us>
>wrote:
>> > > On Tue, Mar 18, 2014 at 09:11:46AM -0400, Robert Haas wrote:
>> > >> On Mon, Mar 17, 2014 at 10:27 PM, Michael Paquier
>> > >> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> > >> > On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello
>> > >> > <fabriziomello(at)gmail(dot)com> wrote:
>> > >> >>
>> > >> >> On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas
><robertmhaas(at)gmail(dot)com> wrote:
>> > >> >>> Well, it's fairly harmless, but it might not be a bad idea
>to tighten that
>> > >> >>> up.
>> > >> >> The attached patch tighten that up.
>> > >> > Hm... It might be interesting to include it in 9.4 IMO,
>somewhat
>> > >> > grouping with what has been done in a6542a4 for SET and ABORT.
>> > >>
>> > >> Meh. There will always be another thing we could squeeze in; I
>don't
>> > >> think this is particularly urgent, and it's late to the party.
>> > >
>> > > Do we want this patch for 9.5? It throws an error for invalid
>reloption
>> > > specifications.
>> >
>> > Fine with me. But I have a vague recollection of seeing pg_upgrade
>> > doing this on purpose to create TOAST tables or something... am I
>> > misremembering?
>>
>> Yes, you remember well. I will have to find a different way for
>> pg_upgrade to call a no-op ALTER TABLE, which is fine.
>
>Looking at the ALTER TABLE options, I am going to put this check in a
>!IsBinaryUpgrade block so pg_upgrade can still use it?

Why not simply not do anything? This doesn't prevent any bugs and requiring pg-upgrade specific checks in there seems absurd. Also somebody might use it for similar purposes.

---
Please excuse brevity and formatting - I am writing this on my mobile phone.


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-22 19:12:47
Message-ID: CA+TgmoYpnSwjhfN2v9tskeBYWruV-G3pYrb4MDQSPmxPJtHm9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 22, 2014 at 2:33 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> Yes, you remember well. I will have to find a different way for
>> pg_upgrade to call a no-op ALTER TABLE, which is fine.
>
> Looking at the ALTER TABLE options, I am going to put this check in a
> !IsBinaryUpgrade block so pg_upgrade can still use its trick.

-1, that's really ugly.

Maybe the right solution is to add a form of ALTER TABLE that is
specifically defined to do only this check. This is an ongoing need,
so that might not be out of line.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-23 02:04:50
Message-ID: 20140823020450.GE21456@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 22, 2014 at 03:12:47PM -0400, Robert Haas wrote:
> On Fri, Aug 22, 2014 at 2:33 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >> Yes, you remember well. I will have to find a different way for
> >> pg_upgrade to call a no-op ALTER TABLE, which is fine.
> >
> > Looking at the ALTER TABLE options, I am going to put this check in a
> > !IsBinaryUpgrade block so pg_upgrade can still use its trick.
>
> -1, that's really ugly.
>
> Maybe the right solution is to add a form of ALTER TABLE that is
> specifically defined to do only this check. This is an ongoing need,
> so that might not be out of line.

Ah, seems ALTER TABLE ... DROP CONSTRAINT IF EXISTS also works --- I
will use that.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2014-08-25 21:07:28
Message-ID: 20140825210728.GB14956@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 22, 2014 at 10:04:50PM -0400, Bruce Momjian wrote:
> On Fri, Aug 22, 2014 at 03:12:47PM -0400, Robert Haas wrote:
> > On Fri, Aug 22, 2014 at 2:33 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > >> Yes, you remember well. I will have to find a different way for
> > >> pg_upgrade to call a no-op ALTER TABLE, which is fine.
> > >
> > > Looking at the ALTER TABLE options, I am going to put this check in a
> > > !IsBinaryUpgrade block so pg_upgrade can still use its trick.
> >
> > -1, that's really ugly.
> >
> > Maybe the right solution is to add a form of ALTER TABLE that is
> > specifically defined to do only this check. This is an ongoing need,
> > so that might not be out of line.
>
> Ah, seems ALTER TABLE ... DROP CONSTRAINT IF EXISTS also works --- I
> will use that.

OK, attached patch applied, with pg_upgrade adjustments. I didn't
think the original regression tests for this were necessary.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

Attachment Content-Type Size
option.diff text/x-diff 3.1 KB

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-08-26 19:24:31
Message-ID: CAFcNs+ou5XaF7YrsQxarA5-x_CQi_xxsvxni1M0dkgOqmS61Ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Aug 25, 2014 at 6:07 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> On Fri, Aug 22, 2014 at 10:04:50PM -0400, Bruce Momjian wrote:
> > On Fri, Aug 22, 2014 at 03:12:47PM -0400, Robert Haas wrote:
> > > On Fri, Aug 22, 2014 at 2:33 PM, Bruce Momjian <bruce(at)momjian(dot)us>
wrote:
> > > >> Yes, you remember well. I will have to find a different way for
> > > >> pg_upgrade to call a no-op ALTER TABLE, which is fine.
> > > >
> > > > Looking at the ALTER TABLE options, I am going to put this check in
a
> > > > !IsBinaryUpgrade block so pg_upgrade can still use its trick.
> > >
> > > -1, that's really ugly.
> > >
> > > Maybe the right solution is to add a form of ALTER TABLE that is
> > > specifically defined to do only this check. This is an ongoing need,
> > > so that might not be out of line.
> >
> > Ah, seems ALTER TABLE ... DROP CONSTRAINT IF EXISTS also works --- I
> > will use that.
>
> OK, attached patch applied, with pg_upgrade adjustments. I didn't
> think the original regression tests for this were necessary.
>

Hi,

Why this patch was reverted one day after applied [1]? I didn't see any
discussion around it.

Regards,

[1]
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=6cb74a67e26523eb2408f441bfc589c80f76c465

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello


From: Thom Brown <thom(at)linux(dot)com>
To: Fabrízio Mello <fabriziomello(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-08-26 19:29:19
Message-ID: CAA-aLv6XG1-HbVKvnyJ+2-mpwzbnmOnLoB4Up5VeM0UXC-qC9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 26 August 2015 at 20:24, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com
> wrote:

>
> On Mon, Aug 25, 2014 at 6:07 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >
> > On Fri, Aug 22, 2014 at 10:04:50PM -0400, Bruce Momjian wrote:
> > > On Fri, Aug 22, 2014 at 03:12:47PM -0400, Robert Haas wrote:
> > > > On Fri, Aug 22, 2014 at 2:33 PM, Bruce Momjian <bruce(at)momjian(dot)us>
> wrote:
> > > > >> Yes, you remember well. I will have to find a different way for
> > > > >> pg_upgrade to call a no-op ALTER TABLE, which is fine.
> > > > >
> > > > > Looking at the ALTER TABLE options, I am going to put this check
> in a
> > > > > !IsBinaryUpgrade block so pg_upgrade can still use its trick.
> > > >
> > > > -1, that's really ugly.
> > > >
> > > > Maybe the right solution is to add a form of ALTER TABLE that is
> > > > specifically defined to do only this check. This is an ongoing need,
> > > > so that might not be out of line.
> > >
> > > Ah, seems ALTER TABLE ... DROP CONSTRAINT IF EXISTS also works --- I
> > > will use that.
> >
> > OK, attached patch applied, with pg_upgrade adjustments. I didn't
> > think the original regression tests for this were necessary.
> >
>
> Hi,
>
> Why this patch was reverted one day after applied [1]? I didn't see any
> discussion around it.
>
> Regards,
>
> [1]
> http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=6cb74a67e26523eb2408f441bfc589c80f76c465
>

The discussion was here:

http://www.postgresql.org/message-id/20140826000757.GE14956@momjian.us

Thom


From: Andres Freund <andres(at)anarazel(dot)de>
To: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-08-26 19:30:23
Message-ID: 20150826193023.GH19326@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2015-08-26 16:24:31 -0300, Fabrízio de Royes Mello wrote:
> Why this patch was reverted one day after applied [1]? I didn't see any
> discussion around it.

http://www.postgresql.org/message-id/23918.1409010246@sss.pgh.pa.us


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-08-26 19:31:47
Message-ID: 20150826193147.GR2912@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Fabrízio de Royes Mello wrote:

> Why this patch was reverted one day after applied [1]? I didn't see any
> discussion around it.

Contributors whose patches are getting committed should really subscribe
to pgsql-committers.

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


From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-08-26 19:43:38
Message-ID: CAFcNs+qQ_1Fpq9hPM1MBFYcvzY89FMXx8gwy7m9C09V=BJVRNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Aug 26, 2015 at 4:30 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> On 2015-08-26 16:24:31 -0300, Fabrízio de Royes Mello wrote:
> > Why this patch was reverted one day after applied [1]? I didn't see any
> > discussion around it.
>
> http://www.postgresql.org/message-id/23918.1409010246@sss.pgh.pa.us

Thanks.... I'm not subscribed to pgsql-commiters so I didn't see it.

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello


From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-08-26 19:44:57
Message-ID: CAFcNs+qHQ9J2iZAY6+pPZ3Ly8x7YvqJfG_MhDcuOpvRTmWtJ_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Aug 26, 2015 at 4:31 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
>
> Fabrízio de Royes Mello wrote:
>
> > Why this patch was reverted one day after applied [1]? I didn't see any
> > discussion around it.
>
> Contributors whose patches are getting committed should really subscribe
> to pgsql-committers.
>

Ok. I sent a subscribe to pgsql-committers.

Thanks,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-09-03 18:44:48
Message-ID: CA+Tgmoavt0Ts3W3+hXafghn6wAuqSyqdLk8SG-Nq+ELQSpV2=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Aug 26, 2015 at 3:31 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Fabrízio de Royes Mello wrote:
>
>> Why this patch was reverted one day after applied [1]? I didn't see any
>> discussion around it.
>
> Contributors whose patches are getting committed should really subscribe
> to pgsql-committers.

I would have thought discussion of committed patches should be moved
to -hackers. The description for the -committers list says:

"Notification of git commits are sent to this list. Do not post here!"

So, it's understandable that people would not expect other traffic there.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-09-03 18:52:16
Message-ID: 20150903185216.GF2912@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas wrote:
> On Wed, Aug 26, 2015 at 3:31 PM, Alvaro Herrera
> <alvherre(at)2ndquadrant(dot)com> wrote:
> > Fabrízio de Royes Mello wrote:
> >
> >> Why this patch was reverted one day after applied [1]? I didn't see any
> >> discussion around it.
> >
> > Contributors whose patches are getting committed should really subscribe
> > to pgsql-committers.
>
> I would have thought discussion of committed patches should be moved
> to -hackers.

I agree, but it happens anyway quite frequently. Since recently, I make
a point of changing the CC from -committers to -hackers, but due to
force of habit I often forget.

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


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-09-04 00:40:10
Message-ID: CAB7nPqQRo7wcKpKLiWr6TDDXR-bo81QT8c07WUsJawgJ5nL1FA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Sep 4, 2015 at 3:52 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> Robert Haas wrote:
> > On Wed, Aug 26, 2015 at 3:31 PM, Alvaro Herrera
> > <alvherre(at)2ndquadrant(dot)com> wrote:
> > > Fabrízio de Royes Mello wrote:
> > >
> > >> Why this patch was reverted one day after applied [1]? I didn't see
> any
> > >> discussion around it.
> > >
> > > Contributors whose patches are getting committed should really
> subscribe
> > > to pgsql-committers.
> >
> > I would have thought discussion of committed patches should be moved
> > to -hackers.
>
> I agree, but it happens anyway quite frequently. Since recently, I make
> a point of changing the CC from -committers to -hackers, but due to
> force of habit I often forget.
>

Noted. I usually don't do that.
--
Michael


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Euler Taveira de Oliveira <euler(at)timbira(dot)com(dot)br>
Subject: Re: Is this a bug?
Date: 2015-09-05 12:03:20
Message-ID: 20150905120320.GA3133@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Sep 4, 2015 at 09:40:10AM +0900, Michael Paquier wrote:
> Robert Haas wrote:
> > On Wed, Aug 26, 2015 at 3:31 PM, Alvaro Herrera
> > <alvherre(at)2ndquadrant(dot)com> wrote:
> > > Fabrízio de Royes Mello wrote:
> > >
> > >> Why this patch was reverted one day after applied [1]? I didn't see
> any
> > >> discussion around it.
> > >
> > > Contributors whose patches are getting committed should really
> subscribe
> > > to pgsql-committers.
> >
> > I would have thought discussion of committed patches should be moved
> > to -hackers.
>
> I agree, but it happens anyway quite frequently.  Since recently, I make
> a point of changing the CC from -committers to -hackers, but due to
> force of habit I often forget.
>
>  
> Noted. I usually don't do that.

I am thinking we should all agree if we should redirect commit comments
to hackers, or not, so we are consistent.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +