agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Tighten proto_version parsing in pgoutput
Date: Thu, 06 Aug 2026 07:59:49 +0000
Message-ID: <E1wrt13-00000000PHF-242g@gemulon.postgresql.org> (raw)

Tighten proto_version parsing in pgoutput

This is similar to 58ff4a0a0867, but this time for the parameter
"proto_version", when given as a parameter to pgoutput for logical
replication.  strtoul() lacked a check for an empty string, leading to
an inconsistent behavior depending on the platform.

The author has originally proposed a TAP test to check this empty value
pattern.  I have added a cheaper SQL query, instead, test_decoding
including a test area where this is possible.

Author: Tristan Partin <tristan@partin.io>
Discussion: https://postgr.es/m/DKBS2Z9CGARC.2T07O6TJYSE8B@partin.io

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/290bb8afe6b47adb8b080688bd97a710af351cb1

Modified Files
--------------
contrib/test_decoding/expected/replorigin.out | 4 ++++
contrib/test_decoding/sql/replorigin.sql      | 3 +++
src/backend/replication/pgoutput/pgoutput.c   | 5 +++--
3 files changed, 10 insertions(+), 2 deletions(-)



Message-ID: <E1wrt13-00000000PHF-242g@gemulon.postgresql.org>
Permalink:  ../E1wrt13-00000000PHF-242g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wrt13-00000000PHF-242g@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Tighten proto_version parsing in pgoutput
  In-Reply-To: <E1wrt13-00000000PHF-242g@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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