Re: An idle thought - Mailing list pgsql-hackers

From Tom Lane
Subject Re: An idle thought
Date
Msg-id 9742.1268754926@sss.pgh.pa.us
Whole thread Raw
In response to An idle thought  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> However then I started thinking about this case and wondered if it
> wouldn't be possible to optimize. One of the suggested optimizations
> was to look at using TRUNCATE. But I wonder why it's necessary to use
> a dedicated command. Shouldn't it be possible for the system to notice
> this situation and do effectively the same thing itself?

Not unless you'd like DELETE to always acquire exclusive lock...

> There are a couple problems with the way I've described this idea
> here.

Precisely because of the lack of lock.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: An idle thought
Next
From: Domenico Rotiroti
Date:
Subject: Re: [RFC] Comments on PostPic project - Repost