Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Önder Kalacı <onderkalaci@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
"shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>, "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>,
Marco Slot <marco.slot@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-03-06T10:48:10Z
Lists: pgsql-hackers
On Mon, Mar 6, 2023 at 2:38 PM Önder Kalacı <onderkalaci@gmail.com> wrote: > I was going through the thread and patch, I noticed that in the initial version, we were depending upon the planner to let it decide whether index scan is cheaper or not and which index to pick. But in the latest patch if a useful index exists then we chose that without comparing the cost of whether it is cheaper than sequential scan or not. Is my understanding correct? What is the reason for the same, one reason I could see while looking into the thread is that we can not just decide once whether the index scan is cheaper or not because that decision could change in the future but isn't that better than never checking whether index scan is cheaper or not. Because in some cases where column selectivity is high like 80-90% then the index can be very costly due to random page fetches. So I think we could easily produce regression in some cases, have we tested those cases? Let me if I am missing something. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
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