Re: Possibly corrupted shared memory, PostgreSQL 8.1 beta2, Windows 2000 - Mailing list pgsql-bugs

From Qingqing Zhou
Subject Re: Possibly corrupted shared memory, PostgreSQL 8.1 beta2, Windows 2000
Date
Msg-id di15a5$1ca1$1@news.hub.org
Whole thread Raw
In response to Re: Possibly corrupted shared memory, PostgreSQL 8.1 beta2, Windows 2000  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List pgsql-bugs
""Jean-Pierre Pelletier"" <pelletier_32@sympatico.ca> wrote in message
news:003801c5c9b0$03e08500$6401a8c0@JP...
>
> Yes, there is an antivirus software on the machine, a reboot is needed
> when it's turned off,
> I'll be allowed to reboot it tonight or I'll do it sooner if it crashes
> before that.
>
> There are around 15 connections to PostgreSQL when it crashes but most are
> idle
> there may be a few inserts but no bulk inserts, the biggest load would
> come from
> select statements.
>

We haven't identified that the failed read/write are caused by anti-virus
software or intensive read/write. If you can compile the source, can you
patch smgrread()/smgrwrite() like this to capture the native windows error:

void
smgrwrite(SMgrRelation reln, BlockNumber blocknum, char *buffer, bool
isTemp)
{
 if (!(*(smgrsw[reln->smgr_which].smgr_write)) (reln, blocknum, buffer,
               isTemp))
   ereport(ERROR,
    (errcode_for_file_access(),
     errmsg("could not write block %u of relation %u/%u/%u:%d: %m",
      blocknum,
      reln->smgr_rnode.spcNode,
      reln->smgr_rnode.dbNode,
      reln->smgr_rnode.relNode,
      GetLastError())));
}

Regards,
Qingqing

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #1939: enhancement
Next
From: "Jean-Pierre Pelletier"
Date:
Subject: Re: Possibly corrupted shared memory, PostgreSQL 8.1 beta2, Windows 2000