pg_store_plans is loaded on a fresh database cluster.
WARNING: 1 temporary files and directories not closed at end-of-transaction
pgsp_shmem_startup forgot to close the temporary plan storeage file
when the main persistent storage file is missing. It should be closed
before exiting the function.
file = AllocateFile(PGSP_DUMP_FILE, PG_BINARY_R);
if (file == NULL)
{
- if (errno == ENOENT)
- return; /* ignore not-found error */
+ /* ignore not-found error */
+ if (errno != ENOENT)
+ goto read_error;
+
/* No existing persisted stats file, so we're done */
- goto read_error;
+ if (pfile)
+ FreeFile(pfile);
+ return;
}
buffer_size = plan_size;