public inbox for [email protected]  
help / color / mirror / Atom feed
From: ISHAN CHHANGANI . <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Switch background worker on/off in runtime.
Date: Fri, 31 May 2024 09:28:25 +0000
Message-ID: <SL2P216MB13807782E32729AAD3DC805CF5FC2@SL2P216MB1380.KORP216.PROD.OUTLOOK.COM> (raw)

Hi,
Is it possible to switch on/off a background worker in runtime?

worker.bgw_flags = BGWORKER_SHMEM_ACCESS;
worker.bgw_start_time = BgWorkerStart_PostmasterStart;

I want to switch off the worker based on some flag value, etc, either from the main process or the worker itself.

Are there any already existing examples?

Thanks,
Ishan.

-- 
The information contained in this electronic communication is intended 
solely for the individual(s) or entity to which it is addressed. It may 
contain proprietary, confidential and/or legally privileged information. 
Any review, retransmission, dissemination, printing, copying or other use 
of, or taking any action in reliance on the contents of this information by 
person(s) or entities other than the intended recipient is strictly 
prohibited and may be unlawful. If you have received this communication in 
error, please notify us by responding to this email or telephone and 
immediately and permanently delete all copies of this message and any 
attachments from your system(s). The contents of this message do not 
necessarily represent the views or policies of BITS Pilani.


view thread (3+ messages)  latest in thread

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: [email protected]
  Cc: [email protected]
  Subject: Re: Switch background worker on/off in runtime.
  In-Reply-To: <SL2P216MB13807782E32729AAD3DC805CF5FC2@SL2P216MB1380.KORP216.PROD.OUTLOOK.COM>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox