Re: Cleaning up threading code - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Cleaning up threading code
Date
Msg-id CA+hUKGJggGdDOdkoJXmrQwHFgY5zYenNod3SKNjGzsiz6+vUdA@mail.gmail.com
Whole thread Raw
In response to Re: Cleaning up threading code  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Cleaning up threading code
List pgsql-hackers
On Mon, Jul 10, 2023 at 10:45 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> * defined ENABLE_THREAD_SAFETY 1 in c.h, for the benefit of extensions

I may lack imagination but I couldn't think of any use for that
vestigial macro in backend/extension code, and client code doesn't see
c.h and might not get the right answer anyway if it's dynamically
linked which is the usual case.  I took it out for now.  Open to
discussing further if someone can show what kinds of realistic
external code would be affected.

> * defined ENABLE_THREAD_SAFETY 1 ecpg_config.h, for the benefit of ECPG clients

I left this one in.  I'm not sure if it could really be needed.
Perhaps at a stretch, perhaps ECPG code that is statically linked
might test that instead of calling PQisthreadsafe().

Pushed.



pgsql-hackers by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: MERGE ... RETURNING
Next
From: Matthias van de Meent
Date:
Subject: Re: Parallel CREATE INDEX for BRIN indexes