RE: PostgreSQL 10.20 crashes / Antivirus - Mailing list pgsql-general

From Thomas, Richard
Subject RE: PostgreSQL 10.20 crashes / Antivirus
Date
Msg-id LO2P123MB509462A985A2A7A5DEEDFEE6F1F59@LO2P123MB5094.GBRP123.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: PostgreSQL 10.20 crashes / Antivirus  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: PostgreSQL 10.20 crashes / Antivirus  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Adrian Klaver wrote:
> What are the actual commands you are using to do the above?

The command used in a PowerShell script (run with Windows task scheduler) to dump each database should evaluate to:

"C:\Program Files\PostgreSQL\10\bin\pg_dump.exe" -b -v -F c -d $dbName -h localhost -p 6488 -U backup_su -f $backupFile
2`>`&1| Out-File $pgdumpLogFile
 

where:
- "backup_su" is a superuser role (with password stored in the user's pgpass.conf file)
- $backupFile and $pgdumpLogFile are in folders excluded from McAfee scanning
- pg_dump.exe executable is not excluded from McAfee on-access scanning (although as recommended postgres.exe is)

The actual script segment building the command is:

        $pgdumpCmd = "C:\Program Files\PostgreSQL\10\bin\pg_dump.exe"
        $pgdumpArgs = @("-b", "-v",
            "-F", "c",
            "-d", $dbName,
            "-h", "localhost",
            "-p", "6488",
            "-U", " backup_su",
            "-f", $backupFile)
        cmd /c $pgdumpCmd $pgdumpArgs 2`>`&1 | Out-File $pgdumpLogFile

Note that the .backup file for the first failing pg_dump (after several successful ones) is now being produced but is
oflength 0, with the associated pg_dump log file simply reading:
 

pg_dump: [archiver (db)] connection to database "dbexample" failed: could not connect to server: Connection refused
(0x0000274D/10061)
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 6488?
could not connect to server: Connection refused (0x0000274D/10061)
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 6488?

Richard

-----Original Message-----
From: Adrian Klaver <adrian.klaver@aklaver.com>
Sent: 19 April 2022 18:11
To: Thomas, Richard <Richard.Thomas@atkinsglobal.com>; pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL 10.20 crashes / Antivirus

On 4/19/22 04:59, Thomas, Richard wrote:
> A request for further suggestions for how to fix/diagnose this PG crash (having just got back from holiday I discover
thatPG is still crashing even though I have changed the pgdump target output location to a folder excluded from the
McAfeeAntivirus scanning - but thanks for the suggestion Adrian). The last few crashes have occurred only during the
backupprocess, when database pg_dump completes (successfully - including the disconnection message in the log) but
beforethe next database pgdump can begin (that pg_dump command gets the error that it cannot connect to the database as
theserver is no longer responding). This will happen after dumping several databases - sometimes it manages the
completemultiple database dump fine. One new thing I've noticed is that when it fails the file access 0xC0000022 error
occursa second time when PG is trying to restart itself after shutting down all the other processes, suggesting
whatevercaused the crash is still around (a later manual restart works fine):
 

 From you original post:

"... although the new pg_dump log file was created (is empty) it does not get as far as creating the .backup file ..."

What are the actual commands you are using to do the above?
At Atkins - member of the SNC-Lavalin Group, we work flexible hours around the world. Although I have sent this email
ata time convenient for me, I don't expect you to respond until it works for you.
 
NOTICE – This email message and any attachments may contain information or material that is confidential, privileged,
and/orsubject to copyright or other rights. Any unauthorized viewing, disclosure, retransmission, dissemination, or
otheruse of or reliance on this message or anything contained therein is strictly prohibited and may be unlawful. If
youbelieve you may have received this message in error, kindly inform the sender by return email and delete this
messagefrom your system. Thank you.
 

pgsql-general by date:

Previous
From: Ram Pratap Maurya
Date:
Subject: RE: Huge archive log generate in Postgresql-13
Next
From: Huan Ruan
Date:
Subject: PITR and Temp Tables