Re: PG Docs - CREATE SUBSCRIPTION option list order

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PG Docs - CREATE SUBSCRIPTION option list order
Date: 2021-04-19 05:16:31
Message-ID: CAA4eK1JYrbuzCNzB74i3BKH5qRTfN+Ywy3dWYF9AK4ygmH4A7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 19, 2021 at 10:32 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Mon, Apr 19, 2021 at 2:09 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Mon, Apr 19, 2021 at 6:32 AM Euler Taveira <euler(at)eulerto(dot)com> wrote:
> > >
> > > On Sun, Apr 18, 2021, at 8:59 PM, Peter Smith wrote:
> > >
> > > The CREATE SUBSCRIPTION documentation [1] includes a list of "WITH"
> > > options, which are currently in some kind of quasi alphabetical /
> > > random order which I found unnecessarily confusing.
> > >
> > > I can't think of any good reason for the current ordering, so PSA my
> > > patch which has identical content but just re-orders that option list
> > > to be alphabetical.
> > >
> > > AFAICS there is not reason to use a random order here. I think this parameter
> > > list is in frequency of use. Your patch looks good to me.
> > >
> >
> > I also agree that the current order is quite random. One idea is to
> > keep them in alphabetical order as suggested by Peter and the other
> > could be to arrange parameters based on properties, for example, there
> > are few parameters like binary, streaming, copy_data which are in some
> > way related to the data being replicated and others are more of slot
> > properties (create_slot, slot_name). I see that few parameters among
> > these have some dependencies on other parameters as well. I noticed
> > that the other DDL commands like Create Table, Create Index doesn't
> > have the WITH clause parameters in any alphabetical order so it might
> > be better if the related parameters can be together here but if we
> > think it is not a good idea in this case due to some reason then
> > probably keeping them in alphabetical order makes sense.
> >
>
> Yes, if there were dozens of list items then I would agree that they
> should be grouped somehow. But there aren't.
>

I think this list is going to grow in the future as we enhance this
subsystem. For example, the pending 2PC patch will add another
parameter to this list.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-04-19 05:35:22 Re: Remove redundant variable from transformCreateStmt
Previous Message Amit Kapila 2021-04-19 05:14:11 Re: Replication slot stats misgivings