Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> Use this lmgr feature inside count_nondeletable_pages() of vacuumlazy.c to
> periodically check, if there is a conflicting lock request waiting. If not,
> keep going. If there is a waiter, truncate the relation to the point checked
> thus far, release the AccessExclusiveLock, then loop back to where we
> acquire this lock in the first place and continue checking/truncating.
I think that maybe we could just bail out after releasing the
AccessExclusiveLock and trust autovacuum to get back to truncating that
relation later. That would allow removing 2 of the 3 GUCs below:
> autovacuum_truncate_lock_check = 100ms # how frequent to check
> # for conflicting locks
This is the one remaining. Could we maybe check for lock conflict after
every move backward a page, or some multiple thereof? The goal would be
to ensure that progress is made, while also being aware of concurrent
activity, ala CHECK_FOR_INTERRUPTS().
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
In response to
Responses
pgsql-hackers by date
| Next: | From: Tom Lane | Date: 2012-11-15 22:38:47 |
| Subject: Re: another idea for changing global configuration settings from SQL |
| Previous: | From: Peter Geoghegan | Date: 2012-11-15 22:25:55 |
| Subject: Re: Index only scans wiki page |