pgsql: Ensure BackgroundWorker struct contents are well-defined.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Ensure BackgroundWorker struct contents are well-defined.
Date: 2017-04-17 03:24:25
Message-ID: E1czxH7-0002Wk-2F@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b6dd1271281ce856ab774fc0b491a92878e3b501

Modified Files
--------------
src/backend/access/transam/parallel.c | 2 +-
src/backend/replication/logical/launcher.c | 6 ++++++
src/test/modules/test_shm_mq/setup.c | 1 +
src/test/modules/worker_spi/worker_spi.c | 2 ++
4 files changed, 10 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-17 13:53:54 pgsql: pg_dump: Emit ONLY before table added to publication
Previous Message Peter Eisentraut 2017-04-17 00:53:14 pgsql: Fix compiler warning