Re: Background Processes in Postgres Extension

From: Sushrut Shivaswamy <sushrut(dot)shivaswamy(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, ashutosh(dot)bapat(dot)oss(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Background Processes in Postgres Extension
Date: 2024-04-27 15:55:59
Message-ID: CAH5mb9_KKVd6NX0orydN0g82Er+KkYrdtLM90VLRN2_ENCqLGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the suggestion on using postgres background worker.

I tried creating one following the implementation in worker_spi and am able
to spawn a background worker successfully.

However, the background worker seems to cause postmaster to crash when I
wait for it to finish using `WaitForBackgroundWorkerShutdown.
The function called by the background worker is empty except for logging a
message to disk.

Any ideas on what could be going wrong / tips for debugging?

Thanks,
Sushrut

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kashif Zeeshan 2024-04-27 17:04:27 Re: Read table rows in chunks
Previous Message Kashif Zeeshan 2024-04-27 15:29:22 Re: Help update PostgreSQL 13.12 to 13.14