postgres.git / summary / log / commit / refs
commit aba24b51cc1b045a9810458b4bb15fee2c182948
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Wed Mar 31 22:16:58 2021 +0000
First released in: 14.0
Initialize conn->Pfdebug to NULL when creating a connection
Failing to do this can cause a crash, and I suspect is what has happened
with a buildfarm member reporting mysterious failures.
This is an ancient bug, but I'm not backpatching since evidently nobody
cares about PQtrace in older releases.
Discussion: https://postgr.es/m/3333908.1617227066@sss.pgh.pa.us
src/interfaces/libpq/fe-connect.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index a90bdb8ab6d..56a8266bc3f 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -3952,6 +3952,7 @@ makeEmptyPGconn(void)
conn->verbosity = PQERRORS_DEFAULT;
conn->show_context = PQSHOW_CONTEXT_ERRORS;
conn->sock = PGINVALID_SOCKET;
+ conn->Pfdebug = NULL;
/*
* We try to send at least 8K at a time, which is the usual size of pipe
[parent: a6d3dea8e5e0]