Re: [HACKERS] tables > 1 gig

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: "Bruce Momjian" <maillist(at)candle(dot)pha(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] tables > 1 gig
Date: 1999-06-18 14:42:11
Message-ID: 7605.929716931@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-06-18 14:44:36 Re: [HACKERS] New TODO item
Previous Message Vince Vielhaber 1999-06-18 14:40:11 Re: [HACKERS] Memory problem?