Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Önder Kalacı <onderkalaci@gmail.com>
From: Önder Kalacı <onderkalaci@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>,
Andres Freund <andres@anarazel.de>, Marco Slot <marco.slot@gmail.com>, Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>, "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>
Date: 2023-03-09T12:17:32Z
Lists: pgsql-hackers
Attachments
- wip_optimize_for_non_pkey_non_ri_unique_index.patch (application/octet-stream) patch 0002
- wip_for_optimize_index_column_match.diff (application/octet-stream) patch 0001
Hi, Amit Kapila <amit.kapila16@gmail.com>, 8 Mar 2023 Çar, 14:42 tarihinde şunu yazdı: > On Wed, Mar 8, 2023 at 4:51 PM Önder Kalacı <onderkalaci@gmail.com> wrote: > > > > > >> > >> I just share this case and then we > >> can discuss should we pick the index which only contain the extra > columns on the > >> subscriber. > >> > > > > I think its performance implications come down to the discussion on [1]. > Overall, I prefer > > avoiding adding any additional complexity in the code for some edge > cases. The code > > can handle this sub-optimal user pattern, with a sub-optimal performance. > > > > It is fine to leave this and Hou-San's case if they make the patch > complex. However, it may be better to give it a try and see if this or > other regression/optimization can be avoided without adding much > complexity to the patch. You can prepare a top-up patch and then we > can discuss it. > > > Alright, I did some basic prototypes for the problems mentioned, just to show that these problems can be solved without too much hassle. But, the patchees are not complete, some tests fail, no comments / tests exist, some values should be cached etc. Mostly sharing as a heads up and sharing the progress given I have not responded to this specific mail. I'll update these when I have some extra time after replying to the 0001 patch. Thanks, Onder
Commits
-
Add the testcases for 89e46da5e5.
- 805b821e77a3 16.0 landed
-
Allow the use of indexes other than PK and REPLICA IDENTITY on the subscriber.
- 89e46da5e511 16.0 landed
-
Rework query relation permission checking
- a61b1f74823c 16.0 cited
-
Generalize ri_RootToPartitionMap to use for non-partition children
- fb958b5da86d 16.0 cited
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited
-
Logical replication
- 665d1fad99e7 10.0 cited