Re: Thread-safe stringToNode() / pg_strtok()

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: Thread-safe stringToNode() / pg_strtok()
Date: 2026-08-19 13:19:47
Message-ID: 4qxhvsylqecpffn63b6jymgp4eo3uydwjnxnbovz26yihqqcre@rzfmin23bkqs
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-08-16 16:13:20 +0900, Michael Paquier wrote:
> On Fri, Aug 14, 2026 at 04:08:24PM +0200, Matthias van de Meent wrote:
> > There are other things we could do to improve this code (e.g.
> > de/serializaing based on node descriptors instead of generated
> > functions), but I consider such improvements to be out of scope for
> > this patch; the attached is just a simple move from global variables
> > to a context struct passed down the call stack.
>
> That sounds fair.
>
> Any thoughts or comments from others?

Tackling those things separately makes a lot of sense to me. Not using static
variables for the node infrastructure also makes a lof of sense, I find APIs
like pg_strtok() quite terrible, even disregarding thread safety.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Andres Freund 2026-08-19 13:16:23 Re: Python/pytest test framework take two