[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:21:22
Message-ID: CA+sbV4gGe7Eqi=oBsOioxYE99noujTXeD1rwAqUqvZzzH1MO0w@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.

Regards,
Tristan Su

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2026-12-02 06:22:13 Re: stale comment about locking in ExecInitModifyTable()
Previous Message Tristan Su 2026-12-02 06:14:36 [PATCH v2] Reuse slot helpers in pg_get_replication_slots and slot copy