postgres.git / summary / log / commit / refs
commit e179115dc04159eb364ffda88fed82e511aff0f7
Author: Peter Eisentraut <peter@eisentraut.org>
Date: Tue Sep 16 05:23:50 2025 +0000
First released in: 18.0
Fix incorrect const qualifier
Commit 7202d72787d added in passing some const qualifiers, but the one
on the postmaster_child_launch() startup_data argument was incorrect,
because the function itself modifies the pointed-to data. This is
hidden from the compiler because of casts. The qualifiers on the
functions called by postmaster_child_launch() are still correct.
src/backend/postmaster/launch_backend.c | 2 +-
src/include/postmaster/postmaster.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/postmaster/launch_backend.c b/src/backend/postmaster/launch_backend.c
index bf6b55ee830..ae94cc99d31 100644
--- a/src/backend/postmaster/launch_backend.c
+++ b/src/backend/postmaster/launch_backend.c
@@ -227,7 +227,7 @@ PostmasterChildName(BackendType child_type)
*/
pid_t
postmaster_child_launch(BackendType child_type, int child_slot,
- const void *startup_data, size_t startup_data_len,
+ void *startup_data, size_t startup_data_len,
ClientSocket *client_sock)
{
pid_t pid;
diff --git a/src/include/postmaster/postmaster.h b/src/include/postmaster/postmaster.h
index 92497cd6a0f..753871071ac 100644
--- a/src/include/postmaster/postmaster.h
+++ b/src/include/postmaster/postmaster.h
@@ -108,7 +108,7 @@ extern PGDLLIMPORT struct ClientSocket *MyClientSocket;
/* prototypes for functions in launch_backend.c */
extern pid_t postmaster_child_launch(BackendType child_type,
int child_slot,
- const void *startup_data,
+ void *startup_data,
size_t startup_data_len,
struct ClientSocket *client_sock);
const char *PostmasterChildName(BackendType child_type);
[parent: 2ddbfede0c61]