Re: Always truncate segments before unlink - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Always truncate segments before unlink
Date
Msg-id 430.1278340427@sss.pgh.pa.us
Whole thread Raw
In response to Always truncate segments before unlink  (Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Always truncate segments before unlink
List pgsql-hackers
Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp> writes:
> In mdunlink(), we truncate the first main fork to zero length
> and actually unlink at the next checkpoint, but other segments
> are not truncated and only unlinked. Then, if another backend
> open the segments, disk spaces occupied by them are not reclaimed
> until all of the backends close their file descriptors. Longer
> checkpoint timeout and connection pooling make things worse.

Truncating seems like an ugly kluge that's not fixing the real problem.
Why are there open descriptors for a dropped relation?  They should all
get closed as a consequence of relcache flush.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Table partitioning - is anything coming?
Next
From: Robert Haas
Date:
Subject: logistics for beta3