Open petrov9268 opened 1 week ago
--enable-cassert
also enables this.
HGETALL
returns a virtual table, by querying data only on the first row scan and filling data for the latter ones with stored in context values. The problem seems to be in how the key (in the example above) is stored and in the query itself.
Basically, use after free.
This does not happen if data is queried with:
SELECT * FROM rft_hash WHERE key = 'hkey';
if this is relevant to empty SELECT on other custom built PostgreSQL server on different OS.
This issue is completely unrelated to this problem. The server in question is built without --enable-cassert
, but returns nothing on any query, including those not affected by this issue.
After removing
Assert
from #17, the server process no longer crashes, but there still seem to be problems when running on a server built with the--enable-cassert
build flag.For example, this works just fine without
--enable-cassert
:However, if enabled:
Server version seems to be irrelevant, result is the same on
15.8
.Not sure how
Assert
can affect SELECT result, or if this is relevant to empty SELECT on other custom built PostgreSQL server on different OS.The above result is from Rocky Linux 9 running inside a Docker container.