pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix using injection points at backend startup in EXEC_BACKEND mo
Date: Fri, 26 Jul 2024 12:38:54 +0000
Message-ID: <E1sXKDm-001IyD-28@gemulon.postgresql.org> (raw)

Fix using injection points at backend startup in EXEC_BACKEND mode

Commit 86db52a506 changed the locking of injection points to use only
atomic ops and spinlocks, to make it possible to define injection
points in processes that don't have a PGPROC entry (yet). However, it
didn't work in EXEC_BACKEND mode, because the pointer to shared memory
area was not initialized until the process "attaches" to all the
shared memory structs. To fix, pass the pointer to the child process
along with other global variables that need to be set up early.

Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f19beba3e3acfd804d678af3f768bee069038486

Modified Files
--------------
src/backend/postmaster/launch_backend.c  | 12 ++++++++++++
src/backend/utils/misc/injection_point.c |  2 +-
src/include/utils/injection_point.h      |  4 ++++
3 files changed, 17 insertions(+), 1 deletion(-)



view thread (2+ messages)

Message-ID: <E1sXKDm-001IyD-28@gemulon.postgresql.org>
Permalink:  ../E1sXKDm-001IyD-28@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sXKDm-001IyD-28@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: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix using injection points at backend startup in EXEC_BACKEND mo
  In-Reply-To: <E1sXKDm-001IyD-28@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox