Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Guy Burgess
Thanks - yes pleas send me a private link and I will try to reproduce it in a test environment and then test the patch. Regards, Guy On 18/03/2021 1:08 pm, Michael Paquier wrote: On Thu, Mar 18, 2021 at 12:25:45PM +1300, Guy Burgess wrote: FWIW, this looks the same issue I am getting

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Guy Burgess
FWIW, this looks the same issue I am getting (reported last month: https://www.postgresql.org/message-id/f444a84e-2d29-55f9-51a6-a5dcea3bc253%40burgess.co.nz) I get the same Process Monitor output, including BUFFER OVERFLOW entries.  No sign of any process other than postgres.exe touching the

Old .deleted file in pg_wal

2021-02-26 Thread Guy Burgess
Hello, There is a file in my pg_wal directory called "0001003B00D0.deleted", last modified in December 2020, and has survived PG & server restarts.  I've been having some errors with WAL files

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-16 Thread Guy Burgess
On 16/02/2021 12:23 am, Thorsten Schöning wrote: The mystery now is that the only process logged as touching the affected WAL files is postgres.exe (of which there are many separate processes). Could it be that one of the postgres.exe instances is holding the affected WAL files in use after

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-15 Thread Guy Burgess
On 12/02/2021 4:33 am, Thorsten Schöning wrote: The behaviour you describe happens exactly when two processes e.g. concurrently hold HANDLEs on the same file and one of those deletes the file then. Windows keeps file names until all open HANDLEs are closed and depending on how those HANDLEs have

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-12 Thread Guy Burgess
On 12/02/2021 4:33 am, Thorsten Schöning wrote: If you see that somewhat frequently, use Process Monitor and Process Explorer to see who accesses those files how. ProcExp easily allows you to find all open handles per file. If it's not AV, it might be something like Windows Search Indexer as

Re: PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-12 Thread Guy Burgess
On 12/02/2021 12:31 am, Lionel Bouton wrote: I haven't dealt with a Windows environment for quite some time, but from what I remember an antivirus installs a driver intercepting file accesses and these drivers are still active even if you disable the antivirus (I suppose they just call a noop

PostgreSQL occasionally unable to rename WAL files (NTFS)

2021-02-10 Thread Guy Burgess
Hello, Running 13.1 on Windows Server 2019, I am getting the following log entries occasionally:     2021-02-11 12:34:10.149 NZDT [6072] LOG:  could not rename file "pg_wal/0001009900D3": Permission denied     2021-02-11 12:40:31.377 NZDT [6072] LOG:  could not rename file

Re: Feature suggestion: auto-prefixing SELECT query column names with table/alias names

2020-06-22 Thread Guy Burgess
On 22/06/2020 3:25 pm, Laurenz Albe wrote: Then there is the case of "a JOIN b USING (somecol)". Here, "somecol" will appear in the output only once. How should it be labeled? If you say "not at all", then what do you want to happen for SELECT * FROM a JOIN b USING (id) JOIN c USING (x)

Feature suggestion: auto-prefixing SELECT query column names with table/alias names

2020-06-21 Thread Guy Burgess
Hello, I've seen some situations where it would be very handy if PostgreSQL could automatically prefix column names in a SELECT query with their table names (or its alias).   So for two tables, a & b, each with columns "id" and "title":     SELECT * FROM a , b; instead of returning

Transition tables for column-specific UPDATE triggers

2019-10-08 Thread Guy Burgess
Hello, The manual says: https://www.postgresql.org/docs/current/sql-createtrigger.html A column list cannot be specified when requesting transition relations. And (I think the same point): The standard allows transition tables to be used with column-specific |UPDATE| triggers, but

CTE optimization fence

2018-06-26 Thread Guy Burgess
Hello, I am running into performance issues with large CTE "WITH" queries (just for selecting, not updating).  I was surprised to find that the queries run much faster if I convert the CTEs to subqueries. From googling, I see that this is due to CTE acting as an optimization fence in PG.