On Thu, Sep 10, 2020 at 11:02:07AM +0800, Craig Ringer wrote: > Hi all > > As I've gained experience working on background workers, it's become > increasingly clear that they're a bit too different to normal backends for > many > nontrivial uses. > > I thought I'd take a moment to note some of it here, along with some proposals > for things we could potentially do to make it much easier to use bgworkers > correctly especially when using them to run queries. > > This is NOT A PATCH SET. It's a set of discussion proposals and it's also > intended as a bit of a helper for people just getting started on bgworkers. > There are a lot of subtle differences in the runtime environment a basic > bgworker provides vs the runtime environment extension authors will be used to > when writing fmgr-callable C functions. > > (It looks like pg12 and pg13 have some improvements, so some of the issues I > was going to mention with error cleanup paths and locking aren't relevant > anymore.) > > DIFFERENCES WHEN CODING FOR BGWORKERS
Can we put this information somewhere in our docs or source code as a README? -- Bruce Momjian <br...@momjian.us> https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee