Re: Nasty VACUUM/bgwriter/segmentation bug

From: "Bort, Paul" <pbort(at)tmwsystems(dot)com>
To: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Nasty VACUUM/bgwriter/segmentation bug
Date: 2006-11-19 16:52:02
Message-ID: DB106B1B5B8F734B8FF3E155A3A556C20548CF50@clemail1.tmwsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> I think that the easiest fix might be to not remove no-longer-used
> segment files during a truncate, but simply reduce them to zero size
> rather than delete them. Then any open file pointers aren't
> invalidated. The only alternative I can see is to invent some new
> signaling mechanism to force closure of open files, but that seems
> ugly, complex, and perhaps subject to race conditions.
>

Setting the files to zero size seems to make sense all around, as when
the bgwriter wants to use one of those segments it can 'figure out' that
there's nothing in the file and it should start at offset zero.

Regards,
Paul Bort

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2006-11-19 18:33:05 Re: Nasty VACUUM/bgwriter/segmentation bug
Previous Message Kai-Uwe Sattler 2006-11-19 11:46:49 Re: [Fwd: Index Advisor]