Postgresql13_beta1 (could not rename temporary statistics file) Windows 64bits

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Postgresql13_beta1 (could not rename temporary statistics file) Windows 64bits
Date: 2020-06-12 18:15:52
Message-ID: CAEudQAoR5e7=uMZ0otzuCVb25zTC8QQBe+2Dt1JRsa3u+XuwJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
001_simplifies_write_statsfiles.patch application/octet-stream 1.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pantelis Theodosiou 2020-06-12 18:19:03 Re: Serializable wrong?
Previous Message Justin Pryzby 2020-06-12 18:15:42 Re: how to create index concurrently on partitioned table