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

Re: What's left?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>,"''Merlin Moncure' '" <merlin(dot)moncure(at)rcsonline(dot)com>,"'pgsql-hackers-win32 '" <pgsql-hackers-win32(at)postgresql(dot)org>,"'PostgreSQL-development '" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What's left?
Date: 2004-01-26 05:13:53
Message-ID: 200401260513.i0Q5Dra23724@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
Tom Lane wrote:
> Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> > One important thing I forgot, that someone could start looking at now:
> >  *  backends keeping files open when other backends are trying to
> > delete/rename them
> 
> > We must do better for the official port,
> 
> Why?  The procedure you mentioned seems perfectly adequate to me,
> seeing that it's a bit of a corner case to start with.

I don't see this as a corner case, except it being a corner case
operating system.  :-)

I think it will very likely rename/unlink will fail because of the file
descriptor cache kept by each backend.

I am attaching dir.c from the PeerDirect port.  It handles unlink
failures by appending the failed file name to a file that is later read
and another unlink attempted.  Perhaps this is something we can do, and
have try unlinks after each checkpoint.

PeerDirect handles rename by just looping.  We really can't delay a
rename.  There is discussion in the Win32 TODO detail that goes over
some options, I think.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-01-26 05:26:24
Subject: Re: What's left?
Previous:From: Dennis BjorklundDate: 2004-01-26 05:10:59
Subject: Re: Named arguments in function calls

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2004-01-26 05:26:24
Subject: Re: What's left?
Previous:From: Bruce MomjianDate: 2004-01-26 02:07:41
Subject: Re: [pgsql-hackers-win32] What's left?

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