]> granicus.if.org Git - postgresql/commit
Ensure BackgroundWorker struct contents are well-defined.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Apr 2017 03:23:44 +0000 (23:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 17 Apr 2017 03:23:44 +0000 (23:23 -0400)
commitb6dd1271281ce856ab774fc0b491a92878e3b501
treeb18a6815271b38f83defd55390a30653697ed4bd
parentc7d225e227aa481c30532b2954055afd1705af31
Ensure BackgroundWorker struct contents are well-defined.

Coverity complained because bgw.bgw_extra wasn't being filled in by
ApplyLauncherRegister().  The most future-proof fix is to memset the
whole BackgroundWorker struct to zeroes.  While at it, let's apply the
same coding rule to other places that set up BackgroundWorker structs;
four out of five had the same or related issues.
src/backend/access/transam/parallel.c
src/backend/replication/logical/launcher.c
src/test/modules/test_shm_mq/setup.c
src/test/modules/worker_spi/worker_spi.c