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

Re: Resumable vacuum proposal and design overview

From: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
To: "Galy Lee" <lee(dot)galy(at)oss(dot)ntt(dot)co(dot)jp>,"Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"Jim C(dot) Nasby" <jim(at)nasby(dot)net>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Resumable vacuum proposal and design overview
Date: 2007-02-28 10:34:14
Message-ID: E1539E0ED7043848906A8FF995BDA57901CAFD36@m0143.s-mxs.net (view raw or flat)
Thread:
Lists: pgsql-hackers
> > You haven't explained how saving the dead-tuple-list could be done
in 
> > a safe mannner and it seems risky to me.
> 
> The files are placed in a new directory $PGDATA/pg_vacuum 
> with the name: spcNode.dbNode.relNode for each relations 
> which have been interrupted during vacuum.
> 
> It has the format likes:
> 
> 1. VacStateFileHeader
> 2. VacStateData
> 3. Dead Tuple list
> 4. CRC32
> 
> The files are removed
>  - when original physical heap files are removed,
>  - when vacuum full have been issued,
>  - or after the content has been read in memory.
>  - etc.
> 
> Is there any potential big risk there? Correct me if I am wrong.

The main risc is not a corrupt file or broken list. The risc is, that a
ctid in the list points at a tuple that is not dead anymore. To avoid
that risc you would need to:
1. keep the vacuum lock open
2. leave the vacuum tx open

(or reevaluate visibility of list members upon resume)

Andreas

In response to

pgsql-hackers by date

Next:From: Zeugswetter Andreas ADI SDDate: 2007-02-28 10:40:29
Subject: Re: COMMIT NOWAIT Performance Option
Previous:From: Zeugswetter Andreas ADI SDDate: 2007-02-28 10:19:44
Subject: Re: Resumable vacuum proposal and design overview

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