1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

Fix incorrect assertion in libpqwalreceiver

Was supposed to check the length of the array, but was checking its
size in bytes.

Author: Jacob Brazeal <jacob.brazeal@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA%2BCOZaA_9afJxj9ZuO73U5P7WXP%2BZM9NGnZvTDCmBFz0FGP%2BwA@mail.gmail.com
This commit is contained in:
Heikki Linnakangas 2025-03-09 20:40:45 +02:00
parent 2a943afcff
commit 03f8e9a7fe

View File

@ -208,7 +208,7 @@ libpqrcv_connect(const char *conninfo, bool replication, bool logical,
keys[++i] = NULL;
vals[i] = NULL;
Assert(i < sizeof(keys));
Assert(i < lengthof(keys));
conn = palloc0(sizeof(WalReceiverConn));
conn->streamConn = PQconnectStartParams(keys, vals,