Closed mwild1 closed 5 years ago
@sparked435 I'm unable to reproduce the segfault that that commit aims to fix. Any tips?
If I revert the change (e.g. remove that if()
guard) then all tests still pass ok.
Looking at the commit, is the logic not inverted? Is the logic meant to be "if the connection is not null, deallocate"? It looks like it's checking for a null connection instead?
To be completely honest, I can't remember making that commit. I had a lot going on March 2016...
I agree it looks like a case of inverted logic. Ok with me to merge the fix.
@sparked435 thanks!
To reproduce: prepare, execute and close multiple SQL statements. Then, on the same connection,
SELECT * FROM pg_prepared_statements
- all the previously closed statements are still listed, even though they should have been DEALLOCATEd.A bisect suggests the problem started with commit b47c4b8338ef093e7b4af8bac693553560d454f1.