ossc-db / pg_store_plans

Store execution plans like pg_stat_statements does for queries.
http://ossc-db.github.io/pg_store_plans/
Other
53 stars 26 forks source link

PostgreSQL 14 Issue temp files #23

Closed mixmind closed 2 years ago

mixmind commented 2 years ago

Hello,

I was trying to use this extension on CentOS 7 with postgresql 14 and received warning in log file, also golang postgres driver(pgx) failed to connect to postgres at all.

The warning is fired every minute and brakes my application. Can you please help with this?

logfile
2022-01-19 02:33:31.964 EST [22961] WARNING:  1 temporary files and directories not closed at end-of-transaction
2022-01-19 02:33:31.965 EST [22959] WARNING:  1 temporary files and directories not closed at end-of-transaction
2022-01-19 02:34:12.245 EST [23074] WARNING:  1 temporary files and directories not closed at end-of-transaction
2022-01-19 02:34:32.052 EST [23123] WARNING:  1 temporary files and directories not closed at end-of-transaction
2022-01-19 02:35:32.111 EST [23276] WARNING:  1 temporary files and directories not closed at end-of-transaction
2022-01-19 02:36:32.147 EST [23429] WARNING:  1 temporary files and directories not closed at end-of-transaction
kasaharatt commented 2 years ago

Hello,

I encountered the same thing. I've submitted a PR(#24) to fix this problem. If you can, please try it and see if it fixes the problem.

Regards,

mixmind commented 2 years ago

Hello,

I encountered the same thing. I've submitted a PR(#24) to fix this problem. If you can, please try it and see if it fixes the problem.

Regards,

Yes, it works for me too, maube better to use such approach? if (errno != ENOENT) goto read_error; else goto fail; return;

horiguti commented 2 years ago

Mmm. I remember I saw the same several times. The diagnosis and the fix is correct so pushed with a small rearrange of commetns. I'll wait for a week before releasing the next version for other bug fixes to merge with.

Thanks for the report and the fix!