pgsql: Add a test harness for the binary heap code.

2025-07-17 Thread Nathan Bossart
Add a test harness for the binary heap code. binaryheap is heavily used and already has decent test coverage, but it lacks dedicated tests for its correctness. This commit changes that. Author: Aleksander Alekseev Discussion: https://postgr.es/m/CAJ7c6TMwp%2Bmb8MMoi%3DSMVMso2hYecoVu2Pwf2EOkesq

Re: pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Hello, On 2025-Jul-17, Aleksander Alekseev wrote: > > Reported-by: Aleksander Alekseev > > I didn't report this issue, it was done by Alexander Lakhin. Uh, you're right, my mistake -- apologies. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "How strange it

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

pgsql: Fix PQport to never return NULL unless the connection is NULL.

2025-07-17 Thread Tom Lane
Fix PQport to never return NULL unless the connection is NULL. This is the documented behavior, and it worked that way before v10. However, addition of the connhost[] array created cases where conn->connhost[conn->whichhost].port is NULL. The rest of libpq is careful to substitute DEF_PGPORT[_ST

Re: pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Aleksander Alekseev
Hi Avaro, > Reported-by: Aleksander Alekseev I didn't report this issue, it was done by Alexander Lakhin.

pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Remove assertion from PortalRunMulti We have an assertion to ensure that a command tag has been assigned by the time we're done executing, but if we happen to execute a command with no queries, the assertion would fail. Per discussion, rather than contort things to get a tag assigned, just remove

pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Remove assertion from PortalRunMulti We have an assertion to ensure that a command tag has been assigned by the time we're done executing, but if we happen to execute a command with no queries, the assertion would fail. Per discussion, rather than contort things to get a tag assigned, just remove

pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Remove assertion from PortalRunMulti We have an assertion to ensure that a command tag has been assigned by the time we're done executing, but if we happen to execute a command with no queries, the assertion would fail. Per discussion, rather than contort things to get a tag assigned, just remove

pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Remove assertion from PortalRunMulti We have an assertion to ensure that a command tag has been assigned by the time we're done executing, but if we happen to execute a command with no queries, the assertion would fail. Per discussion, rather than contort things to get a tag assigned, just remove

pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Remove assertion from PortalRunMulti We have an assertion to ensure that a command tag has been assigned by the time we're done executing, but if we happen to execute a command with no queries, the assertion would fail. Per discussion, rather than contort things to get a tag assigned, just remove

pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Remove assertion from PortalRunMulti We have an assertion to ensure that a command tag has been assigned by the time we're done executing, but if we happen to execute a command with no queries, the assertion would fail. Per discussion, rather than contort things to get a tag assigned, just remove

pgsql: Remove assertion from PortalRunMulti

2025-07-17 Thread Álvaro Herrera
Remove assertion from PortalRunMulti We have an assertion to ensure that a command tag has been assigned by the time we're done executing, but if we happen to execute a command with no queries, the assertion would fail. Per discussion, rather than contort things to get a tag assigned, just remove

pgsql: doc: Add note about how to use pg_overexplain.

2025-07-17 Thread Nathan Bossart
doc: Add note about how to use pg_overexplain. This commit adds a note to the pg_overexplain page that describes how to use it (LOAD, session_preload_libraries, or shared_preload_libraries). The new text is mostly lifted from the auto_explain page. We should probably consider centralizing this i

pgsql: doc: Add note about how to use pg_overexplain.

2025-07-17 Thread Nathan Bossart
doc: Add note about how to use pg_overexplain. This commit adds a note to the pg_overexplain page that describes how to use it (LOAD, session_preload_libraries, or shared_preload_libraries). The new text is mostly lifted from the auto_explain page. We should probably consider centralizing this i