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 know that
an update to relreplident is required.

I have manually tested the change, and "make check" passed.

Best regards,
Chao Li (Evan)
---------------------
HighGo Software Co., Ltd.
https://www.highgo.com/

Attachment: v1-0001-tablecmds-Open-pg_class-only-when-an-update-is-re.patch
Description: Binary data

Reply via email to