Re: [HACKERS] tables > 1 gig - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] tables > 1 gig
Date
Msg-id 7605.929716931@sss.pgh.pa.us
Whole thread Raw
In response to RE: [HACKERS] tables > 1 gig  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> Unlinking unused segments after truncating to zero length may cause 
> the result such as 
>      Existent backends write to the truncated file to extend the relation
>      while new backends create a new segment file to extend the relation. 

Ooh, good point.  So, unless we want to invent some way for the process
that's running vacuum to force other backends to close their FDs for
segment files, the *only* correct solution is to truncate to zero length
but leave the files in place.

I still don't quite see why there is such a big problem, however, unless
you're asserting that vacuum is broken for single-segment tables too.
Surely vacuum acquires a lock over the whole table, not just a segment?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] Memory problem?
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] New TODO item