aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/postmaster/postmaster.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 7a5cd06c5c9..ccc12f91a16 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -4490,6 +4490,14 @@ internal_forkexec(int argc, char *argv[], Port *port)
BackendParameters param;
FILE *fp;
+ /*
+ * Make sure padding bytes are initialized, to prevent Valgrind from
+ * complaining about writing uninitialized bytes to the file. This isn't
+ * performance critical, and the win32 implementation initializes the
+ * padding bytes to zeros, so do it even when not using Valgrind.
+ */
+ memset(&param, 0, sizeof(BackendParameters));
+
if (!save_backend_variables(&param, port))
return -1; /* log made by save_backend_variables */