Skip site navigation (1) Skip section navigation (2)

Re: [Win32] Problem with rename()

From: "Peter Brant" <Peter(dot)Brant(at)wicourts(dot)gov>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>,<Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>,<Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [Win32] Problem with rename()
Date: 2006-04-18 14:15:04
Message-ID: 4444AE18020000BE00002F1F@gwmta.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Unfortunately, it's not that simple.  It would be straightforward to
track down if it were.

In response to other questions:

It's Postgres 8.1.3 running on Windows 2003 Server.  No anti-virus
software is installed.  The servers are essentially bare except for the
OS and Postgres.

We have "handle -a" output from two occurrences (different servers):

For the first one:

LOG:  could not rename file "pg_xlog/000000010000010A000000BD" to
"pg_xlog/000000010000010A000000D7", continuing to try

Only one process (postgres.exe) is holding a handle to
pg_xlog/000000010000010A000000BD:

  F84: Event         \BaseNamedObjects\pgident: postgres: bigbird
bigbird 127.0.0.1(3306) BIND
  FF4: File          G:\pgsql\data\pg_xlog\000000010000010A000000BD

Nothing has the target file open.

The second is similar, except that two postgres.exe processes (and
nothing else) have the file open:

LOG:  could not rename file "pg_xlog/000000010000010A0000006E" to
"pg_xlog/000000010000010A00000087", continuing to try

#1:
  F84: Event         \BaseNamedObjects\pgident: postgres: bigbird
bigbird 127.0.0.1(2367) SELECT
  EFC: File          G:\pgsql\data\pg_xlog\000000010000010A0000006E

#2:
  F84: Event         \BaseNamedObjects\pgident: postgres: bigbird
bigbird 127.0.0.1(2420) SELECT
  FF4: File          G:\pgsql\data\pg_xlog\000000010000010A0000006E

Nothing has the target file open.

Pete

>>> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> 04/18/06 2:58 am >>>
Yes, comment I added to dirmod.c give a hint:

    /*
     * We need these loops because even though PostgreSQL uses flags
that
     * allow rename while the file is open, other applications might
have
     * these files open without those flags.
     */

so someone else has the file opened, but didn't use the required flags.

As to what could have it open, I don't know.


In response to

Responses

pgsql-bugs by date

Next:From: Harald Armin MassaDate: 2006-04-18 14:35:19
Subject: Re: [Win32] Problem with rename()
Previous:From: Bruce MomjianDate: 2006-04-18 12:39:52
Subject: Re: [martin@bugs.unl.edu.ar: BUG in logs]

pgsql-patches by date

Next:From: Harald Armin MassaDate: 2006-04-18 14:35:19
Subject: Re: [Win32] Problem with rename()
Previous:From: Albe LaurenzDate: 2006-04-18 07:22:52
Subject: Re: LDAP lookup of connection parameters

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group