Re: [HACKERS] Avoid endless futile table locks in vacuuming.

2015-12-29 Thread Tom Lane
Jeff Janes writes: > If we are not doing a scan_all and we fail to acquire a clean-up lock on > the last block, and the last block reports that it needs freezing, then we > continue on to wait for the clean-up lock. But there is no need, we don't > really need to freeze the block, and we already k

Re: [HACKERS] Avoid endless futile table locks in vacuuming.

2015-12-29 Thread Jeff Janes
On Mon, Dec 28, 2015 at 2:12 PM, Tom Lane wrote: > I wrote: >> Jeff Janes writes: >>> If a partially-active table develops a slug of stable all-visible, >>> non-empty pages at the end of it, then every autovacuum of that table >>> will skip the end pages on the forward scan, think they might be >

Re: [HACKERS] Avoid endless futile table locks in vacuuming.

2015-12-28 Thread Tom Lane
I wrote: > Jeff Janes writes: >> If a partially-active table develops a slug of stable all-visible, >> non-empty pages at the end of it, then every autovacuum of that table >> will skip the end pages on the forward scan, think they might be >> truncatable, and take the access exclusive lock to do

Re: [HACKERS] Avoid endless futile table locks in vacuuming.

2015-12-27 Thread Tom Lane
Jeff Janes writes: > If a partially-active table develops a slug of stable all-visible, > non-empty pages at the end of it, then every autovacuum of that table > will skip the end pages on the forward scan, think they might be > truncatable, and take the access exclusive lock to do the truncation.