pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add an init callback for the logical decoding control data.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Add an init callback for the logical decoding control data.
@ 2026-10-07 18:09  Masahiko Sawada <msawada@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Masahiko Sawada @ 2026-10-07 18:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add an init callback for the logical decoding control data.

LogicalDecodingCtl had no init callback so there is no guarantee that
its fields are initialized. Its startup function
StartupLogicalDecodingStatus() also returns without touching the
fields when wal_level is 'minimal'.

Initialize them in an init callback explicitly. This is not a bug fix
but we just shouldn't be depending on the allocator by accident.

Backpatch to v19, where logicalctl.c was introduced, since a
subsequent bug fix for slot synchronization adds a new field to
LogicalDecodingCtlData and relies on this callback to initialize it.

Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Discussion: https://postgr.es/m/CAM527d_eV_BAYFiQnfZLSPfHoihye=nOi-OnAM_57pdH+F+gfA@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/952cb079131ba1bd16b71aada4b623b8b2926c6c

Modified Files
--------------
src/backend/replication/logical/logicalctl.c | 10 ++++++++++
1 file changed, 10 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Add an init callback for the logical decoding control data.
@ 2026-10-07 18:09  Masahiko Sawada <msawada@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Masahiko Sawada @ 2026-10-07 18:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add an init callback for the logical decoding control data.

LogicalDecodingCtl had no init callback so there is no guarantee that
its fields are initialized. Its startup function
StartupLogicalDecodingStatus() also returns without touching the
fields when wal_level is 'minimal'.

Initialize them in an init callback explicitly. This is not a bug fix
but we just shouldn't be depending on the allocator by accident.

Backpatch to v19, where logicalctl.c was introduced, since a
subsequent bug fix for slot synchronization adds a new field to
LogicalDecodingCtlData and relies on this callback to initialize it.

Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Discussion: https://postgr.es/m/CAM527d_eV_BAYFiQnfZLSPfHoihye=nOi-OnAM_57pdH+F+gfA@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5412127cbf1b71ced51ea511248403e35e8f7a8b

Modified Files
--------------
src/backend/replication/logical/logicalctl.c | 10 ++++++++++
1 file changed, 10 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-10-07 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 18:09 pgsql: Add an init callback for the logical decoding control data. Masahiko Sawada <msawada@postgresql.org>
2026-10-07 18:09 pgsql: Add an init callback for the logical decoding control data. Masahiko Sawada <msawada@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox