Re: Add null termination to string received in parallel apply worker

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Add null termination to string received in parallel apply worker
Date: 2023-10-26 03:40:27
Message-ID: CAApHDvomM6-+5anPAOndm9kEO+2J-EtQ4vH1rq1zU9=Yj-aKAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 11 Oct 2023 at 19:54, Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2023-10-26 04:00:00 Re: Is this a problem in GenericXLogFinish()?
Previous Message David Steele 2023-10-26 03:38:33 Re: Remove dead code in pg_ctl.c