Re: tablecmds: Open pg_class only when an update is required

2025-12-11 Thread Chao Li
> On Dec 11, 2025, at 21:17, Ashutosh Bapat > wrote: > > On Thu, Dec 11, 2025 at 12:45 PM Chao Li wrote: >> >> Hi Hackers, >> >> I just noticed that relation_mark_replica_identity() unconditionally opened >> pg_class with RowExclusiveLock even in cases where relreplident has no >> change

Re: tablecmds: Open pg_class only when an update is required

2025-12-11 Thread Ashutosh Bapat
On Thu, Dec 11, 2025 at 12:45 PM Chao Li wrote: > > Hi Hackers, > > I just noticed that relation_mark_replica_identity() unconditionally opened > pg_class with RowExclusiveLock even in cases where relreplident has no > change, which incurred unnecessary relation opens, lock acquisition. > > I ju

tablecmds: Open pg_class only when an update is required

2025-12-10 Thread Chao Li
Hi Hackers, I just noticed that relation_mark_replica_identity() unconditionally opened pg_class with RowExclusiveLock even in cases where relreplident has no change, which incurred unnecessary relation opens, lock acquisition. I just made a tiny refactor that defers opening pg_class until we kno