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

Re: Advice on MyXactMade* flags, MyLastRecPtr, pendingDeletes and lazy XID assignment

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Postgresql-Hackers" <pgsql-hackers(at)postgresql(dot)org>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Subject: Re: Advice on MyXactMade* flags, MyLastRecPtr, pendingDeletes and lazy XID assignment
Date: 2007-08-30 13:39:36
Message-ID: 87ejhl5eg7.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
"Florian G. Pflug" <fgp(at)phlo(dot)org> writes:

>>> It seems doable, but it's not pretty. One possible scheme would be to
>>> emit a record *after* chosing a name but *before* creating the file,
>>
>> No, because the way you know the name is good is a successful
>> open(O_CREAT).
>
> The idea was to log *twice*. Once the we're about to create a file, and
> the second time that we succeeded. That way, the filename shows up in the
> log, even if we crash immediatly after physically creating the file, which
> gives recovery at least a chance to clean up the mess.

It sounds like if the reason it fails is because someone else created the same
file name you'll delete the wrong file?

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2007-08-30 13:43:36
Subject: Re: [HACKERS] Contrib modules documentation online
Previous:From: Peter EisentrautDate: 2007-08-30 13:30:11
Subject: Re: [HACKERS] Contrib modules documentation online

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