| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Greg Stark <stark(at)mit(dot)edu> |
| Cc: | "<pgsql-hackers(at)postgresql(dot)org>" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: An idle thought |
| Date: | 2010-03-16 15:55:26 |
| Message-ID: | 9742.1268754926@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Greg Stark <stark(at)mit(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2010-03-16 16:04:48 | Re: Bug in 9.0Alpha4 |
| Previous Message | Greg Stark | 2010-03-16 15:29:06 | An idle thought |