Re: Background Processes in Postgres Extension
| От | Tom Lane |
|---|---|
| Тема | Re: Background Processes in Postgres Extension |
| Дата | |
| Msg-id | 3384911.1713887967@sss.pgh.pa.us обсуждение |
| Ответ на | Background Processes in Postgres Extension (Sushrut Shivaswamy <sushrut.shivaswamy@gmail.com>) |
| Ответы |
Re: Background Processes in Postgres Extension
|
| Список | pgsql-hackers |
Sushrut Shivaswamy <sushrut.shivaswamy@gmail.com> writes:
> I'm developing a postgres extension as a custom Table Interface method
> definition.
> WIthin the extension, I"m planning to create two background processes using
> `fork()` that will process data in the background.
> Are there any recommendations / guidelines around creating background
> processes within extensions in postgres?
fork() is entirely the wrong way to do it, mainly because when the
creating session exits the postmaster will be unaware of those
now-disconnected child processes. See the mechanisms for creating
background worker processes (start with bgworker.h).
regards, tom lane
В списке pgsql-hackers по дате отправления: