Postgresql13_beta1 (could not rename temporary statistics file)Windows 64bits - Mailing list pgsql-hackers

From Ranier Vilela
Subject Postgresql13_beta1 (could not rename temporary statistics file)Windows 64bits
Date
Msg-id CAEudQAoR5e7=uMZ0otzuCVb25zTC8QQBe+2Dt1JRsa3u+XuwJg@mail.gmail.com
Whole thread Raw
Responses Re: Postgresql13_beta1 (could not rename temporary statistics file)Windows 64bits  (Ranier Vilela <ranier.vf@gmail.com>)
Re: Postgresql13_beta1 (could not rename temporary statistics file)Windows 64bits  (Michael Paquier <michael@paquier.xyz>)
Re: Postgresql13_beta1 (could not rename temporary statistics file)Windows 64bits  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Posgres13_beta1, is consistently writing to the logs, "could not rename temporary statistics file".
When analyzing the source that writes the log, I simplified the part that writes the logs a little.

1. I changed from if else if to if
2. For the user, better to have more errors recorded, which can help in discovering the problem
3. Errors are independent of each other
4. If I can't release tmpfile, there's no way to delete it (unlink)
5. If I can rename, there is no need to delete it (unlink) tmpfile.

Attached is the patch that proposes these changes.

Now, the problem has not been solved.
1. statfile, is it really closed or does it not exist in the directory?
     There is no way to rename a file, which is open and in use.
2. Why delete (pgstat_stat_filename), if permanent is true:
const char * statfile = permanent? PGSTAT_STAT_PERMANENT_FILENAME: pgstat_stat_filename;
statfile is PGSTAT_STAT_PERMANENT_FILENAME and not pgstat_stat_filename

regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: how to create index concurrently on partitioned table
Next
From: Pantelis Theodosiou
Date:
Subject: Re: Serializable wrong?