Re: Add null termination to string received in parallel apply worker - Mailing list pgsql-hackers

From David Rowley
Subject Re: Add null termination to string received in parallel apply worker
Date
Msg-id CAApHDvomM6-+5anPAOndm9kEO+2J-EtQ4vH1rq1zU9=Yj-aKAg@mail.gmail.com
Whole thread Raw
In response to Add null termination to string received in parallel apply worker  ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>)
List pgsql-hackers
On Wed, 11 Oct 2023 at 19:54, Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:
> The parallel apply worker didn't add null termination to the string received
> from the leader apply worker via the shared memory queue. This action doesn't
> bring bugs as it's binary data but violates the rule established in StringInfo,
> which guarantees the presence of a terminating '\0' at the end of the string.

Just for anyone not following the other thread that you linked,  I
just pushed f0efa5aec, and, providing that sticks, I think we can drop
this discussion now.

That commit relaxes the requirement that the StringInfo must be NUL terminated.

David



pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Remove dead code in pg_ctl.c
Next
From: Alexander Lakhin
Date:
Subject: Re: Is this a problem in GenericXLogFinish()?