Re: Behaviour of bgworker with SIGHUP
Guillaume Lelarge <guillaume@lelarge.info>
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-03T10:56:31Z
Lists: pgsql-hackers
Attachments
- worker_spi.patch (text/x-patch) patch
On Mon, 2012-12-31 at 17:44 -0300, Alvaro Herrera wrote: > Alvaro Herrera wrote: > > Guillaume Lelarge wrote: > > > On Mon, 2012-12-31 at 11:03 -0300, Alvaro Herrera wrote: > > > > > > I think this (have a config option, and have SIGHUP work as expected) > > > > would be useful to demo in worker_spi, if you care to submit a patch. > > > > > > Yeah, I would love too. Reading the code of worker_spi, we could add one > > > or three parameters: a naptime, and the schemaname for both bgprocess. > > > One would be enough or do you prefer all three? > > > > I got no problem with three. > > Actually, it occurs to me that it might be useful to demonstrate having > the number of processes be configurable: so we could use just two > settings, naptime and number of workers. Have each worker just use a > hardcoded schema, say "worker_spi_%d" or something like that. > Here you go. worker_spi.naptime is the naptime between two checks. worker_spi.total_workers is the number of workers to launch at postmaster start time. The first one can change with a sighup, the last one obviously needs a restart. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make worker_spi sample code more complete
- e543631f3c16 9.3.0 cited