Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Önder Kalacı <onderkalaci@gmail.com>, "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>, Marco Slot <marco.slot@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-02-28T18:39:18Z
Lists: pgsql-hackers
Hi, On 2023-02-25 16:00:05 +0530, Amit Kapila wrote: > On Tue, Feb 21, 2023 at 7:55 PM Önder Kalacı <onderkalaci@gmail.com> wrote: > >> I think this overhead seems to be mostly due to the need to perform > >> tuples_equal multiple times for duplicate values. I think more work needs to be done to determine the source of the overhead. It's not clear to me why there'd be an increase in tuples_equal() calls in the tests upthread. > Wouldn't a table-level option like 'apply_index_scan' be better than a > subscription-level option with a default value as false? Anyway, the > bigger point is that we don't see a better way to proceed here than to > introduce some option to control this behavior. I don't think this should default to false. The quadratic apply performance the sequential scans cause, are a much bigger hazard for users than some apply performance reqression. > I see this as a way to provide this feature for users but I would > prefer to proceed with this if we can get some more buy-in from senior > community members (at least one more committer) and some user(s) if > possible. So, I once again request others to chime in and share their > opinion. I'd prefer not having an option, because we figure out the cause of the performance regression (reducing it to be small enough to not care). After that an option defaulting to using indexes. I don't think an option defaulting to false makes sense. I don't care whether it's subscription or relation level option. Greetings, Andres Freund
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