[PATCH v2] Reuse slot helpers in pg_get_replication_slots and slot copy

From: Tristan Su <sooqing(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: [PATCH v2] Reuse slot helpers in pg_get_replication_slots and slot copy
Date: 2026-12-02 06:14:36
Message-ID: CA+sbV4jXc61Nt-CA4QfEB66D0CrB729oAPRMhi-szGAq1=ds=w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for the reviews. v2 removes the redundant NULL initialization
of src (Chao Li) and moves the slot existence check before taking the
slot spinlock, dropping the conditional copy (Hayato Kuroda).

I kept SlotIsPhysical() for the plugin column: it tests the slot type
directly, while an empty plugin is only a consequence of that type.

No functional change. make check passes; pgindent is clean.

Resending v2 in the correct thread; my previous attempt was posted as
a separate thread.

Regards,
Tristan Su

Attachment Content-Type Size
v2-0001-Reuse-slot-helpers-in-pg_get_replication_slots-and-s.patch.txt text/plain 3.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Su 2026-12-02 06:21:22 [PATCH v2] Reuse slot helpers in pg_get_replication_slots and slot copy
Previous Message Ideriha, Takeshi 2026-12-02 06:08:19 Re: Doc: Fix BrinOpcInfo members to match the code