Skip site navigation (1) Skip section navigation (2)

Re: BUG #3067: Unnecessary lock blocks reindex

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Axel Noltemeier" <axel(dot)noltemeier(at)gmx(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3067: Unnecessary lock blocks reindex
Date: 2007-02-25 18:15:14
Message-ID: 9279.1172427314@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Axel Noltemeier" <axel(dot)noltemeier(at)gmx(dot)de> writes:
> -- This statement generates an unnecessary(?) lock
> -- on factory_pkey. That index is not used in the plan.
> EXPLAIN ANALYZE SELECT *
> FROM factory f
> Where f.id IN (select m.factory_id from machine m);

That behavior was changed here:
http://archives.postgresql.org/pgsql-committers/2006-07/msg00356.php
I'm disinclined to consider reverting that change...

It's possible that we could modify the planner to release locks at the
end of planning on indexes it chooses not to use, but 99.9% of the time
it'd be a waste of cycles to do that.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: EugeneDate: 2007-02-26 11:54:33
Subject: BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in
Previous:From: Alvaro HerreraDate: 2007-02-25 17:40:23
Subject: Re: BUG #3064: In Stored Procedures (pgplgql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group