passing a pointer from a BackgroundWorker to a DynamicBackgroundWorker

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: passing a pointer from a BackgroundWorker to a DynamicBackgroundWorker
Date: 2024-12-20 15:57:53
Message-ID: CAKoxK+7ZHmv_GoEvtDDKtxpFfmPGUp+D3wDtZRgLXLjNm+yL5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I've a doubt about background workers. I've a worker (loaded by a
module via shared_preloaded_libraries) should register a dyanmic
background worker per database, in a manner similar to what autovacuum
does.
I would like to pass to these dynamic background workers a pointer to
a custom struct, that has been allocated and initialized by the "main"
background worker.
Is it sage to pass the pointer via the Datum main argument from one
worker to another? Clearly, the struct has be allocated in a shared
memory segment,but I'm not sure in which context.
Any suggestion is appreciated.

Thanks,
Luca

Browse pgsql-general by date

  From Date Subject
Next Message Bharani SV-forum 2024-12-20 16:09:56 Re: cannot drop a tablespace which never exists in pg_tablespace
Previous Message Tom Lane 2024-12-20 15:31:26 Re: Streaming replication problem with collation