[PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

From: Xiaoran Wang <fanfuxiaoran(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages
Date: 2023-12-07 02:13:52
Message-ID: CAGjhLkP_Bqk1nHqFHbpbcM62wdNaiS-BV-AHi-Te-BvjXrrxow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

For local invalidation messages, there is no need to call
`InvalidateCatalogSnapshot` to set the CatalogSnapshot to NULL and
rebuild it later. Instead, just update the CatalogSnapshot's `curcid`
in `SnapshotSetCommandId`, this way can make the CatalogSnapshot work
well too.

This optimization can reduce the overhead of rebuilding CatalogSnapshot
after each command.

Best regards, xiaoran

Attachment Content-Type Size
0001-Not-to-invalidate-CatalogSnapshot-for-local-invalida.patch application/octet-stream 4.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-12-07 02:23:21 Re: pg_upgrade and logical replication
Previous Message Masahiko Sawada 2023-12-07 01:55:42 Re: pg_upgrade and logical replication