On Thu, Jul 30, 2015 at 3:47 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> Hmm. worker_spi module uses bgw_main. Is that bad? Given that work_spi is
> supposedly an example or template that you copy-paste from when writing your
> own bgworker, we should make sure it follows the best practice. Also, I note
> that worker_spi doesn't memset(0) its BackgroundWorker struct, so any
> uninitialized fields will contain garbage. Including bgw_library_name and
> bgw_function_name. That seems bad.
Yeah, that stuff is bad.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company