Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-07-10T23:23:36Z
Lists: pgsql-hackers
On Mon, Jul 10, 2023 at 2:21 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Mon, Jul 10, 2023 at 7:55 AM Peter Smith <smithpb2250@gmail.com> wrote: > > > > On Sat, Jul 8, 2023 at 1:49 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > > > On Fri, Jul 7, 2023 at 1:36 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > > > > > I prefer the first suggestion. I've attached the updated patch. > > > > > > > > > > This looks mostly good to me but I think it would be better if we can > > > also add the information that the leftmost index column must be a > > > non-expression. So, how about: "Candidate indexes must be btree, > > > non-partial, and the leftmost index column must be a non-expression > > > and reference to a published table column (i.e. cannot consist of only > > > expressions)."? > > > > That part in parentheses ought to say "the index ..." because it is > > referring to the full INDEX, not to the leftmost column. I think this > > was missed when Sawada-san took my previous suggestion [1]. > > > > IMO it doesn't sound right to say the "index column must be a > > non-expression". It is already a non-expression because it is a > > column. So I think it would be better to refer to this as an INDEX > > "field" instead of an INDEX column. Note that "field" is the same > > terminology used in the docs for CREATE INDEX [2]. > > > > I thought it would be better to be explicit for this case but I am > fine if Sawada-San and you prefer some other way to document it. > I see. How about just moving the parenthesized part to explicitly refer only to the leftmost field? SUGGESTION Candidate indexes must be btree, non-partial, and the leftmost index field must be a column (not an expression) that references a published table column. ------ Kind Regards, Peter Smith. Fujitsu Australia
Commits
-
Remove unnecessary checks for indexes for REPLICA IDENTITY FULL tables.
- d0ce9d0bc7f6 17.0 landed
- 35c85c3c9b90 16.0 landed
-
Allow the use of a hash index on the subscriber during replication.
- edca3424342d 17.0 cited
-
Doc: clarify the conditions of usable indexes for REPLICA IDENTITY FULL tables.
- 4946910a875c 16.0 landed
- fd48a86c6241 17.0 landed
-
Allow the use of indexes other than PK and REPLICA IDENTITY on the subscriber.
- 89e46da5e511 16.0 cited