pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tristan Partin <tristan@neon.tech>
To: Heikki Linnakangas <hlinnaka@iki.fi>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Subject: Re: Refactoring backend fork+exec code
Date: Fri, 01 Dec 2023 10:31:19 -0600
Message-ID: <CXD52ST7330T.1J5XRORQO5BD3@neon.tech> (raw)
In-Reply-To: <3b02a5a1-81ea-44e4-a09e-c0a594a4cef8@iki.fi>
References: <7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi>
	<20230710225043.svl7fqxecwshwc7a@awork3.anarazel.de>
	<119551e6-60f6-49b2-ae04-a382a89f900c@iki.fi>
	<e0dcfabb-f59a-45e8-bd92-f8d706c92128@iki.fi>
	<CXCDA9YFDZS1.Y5JUZBHLLXYR@neon.tech>
	<3b02a5a1-81ea-44e4-a09e-c0a594a4cef8@iki.fi>

On Fri Dec 1, 2023 at 6:10 AM CST, Heikki Linnakangas wrote:
> On 30/11/2023 20:44, Tristan Partin wrote:
> > Patches 1-3 seem committable as-is.
>
> Thanks for the review! I'm focusing on patches 1-3 now, and will come 
> back to the rest after committing 1-3.
>
> There was one test failure with EXEC_BACKEND from patch 2, in 
> 'test_shm_mq'. In restore_backend_variables() I checked if 'bgw_name' is 
> empty to decide if the BackgroundWorker struct is filled in or not, but 
> it turns out that 'test_shm_mq' doesn't fill in bgw_name. It probably 
> should, I think that's an oversight in 'test_shm_mq', but that's a 
> separate issue.
>
> I did some more refactoring of patch 2, to fix that and to improve it in 
> general. The BackgroundWorker struct is now passed through the 
> fork-related functions similarly to the Port struct. That seems more 
> consistent.
>
> Attached is new version of these patches. For easier review, I made the 
> new refactorings compared in a new commit 0003. I will squash that 
> before pushing, but this makes it easier to see what changed.
>
> Barring any new feedback or issues, I will commit these.

My only thought is that perhaps has_bg_worker is a better name than 
has_worker, but I agree that having a flag is better than checking 
bgw_name.

-- 
Tristan Partin
Neon (https://neon.tech)





view thread (50+ messages)  latest in thread

Message-ID: <CXD52ST7330T.1J5XRORQO5BD3@neon.tech>
Permalink:  ../CXD52ST7330T.1J5XRORQO5BD3@neon.tech/
Also on:    postgresql.org/message-id/CXD52ST7330T.1J5XRORQO5BD3@neon.tech

 · 

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-hackers@postgresql.org
  Cc: tristan@neon.tech, hlinnaka@iki.fi, andres@anarazel.de, thomas.munro@gmail.com
  Subject: Re: Refactoring backend fork+exec code
  In-Reply-To: <CXD52ST7330T.1J5XRORQO5BD3@neon.tech>

* 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