Tom Lane escribió: > Note that allowing subsequent requests to jump the queue would not be a > good fix for this; if you do that, it's likely the ex-lock will never be > granted, at least not till the next system idle time. Which if you've > got one, you don't need a feature like this at all; you might as well > just reindex normally during your idle time.
Not really. The time to run a complete reindex might be several hours. If the idle time is just a few minutes or seconds long, it may be more than enough to complete the switch operation, but not to run the complete reindex. Maybe another idea is that the reindexing is staged: the user would first run a command to create the replacement index, and leave both present until the user runs a second command (which acquires a strong lock) that executes the switch. Somehow similar to a constraint created as NOT VALID (which runs without a strong lock) which can be later validated separately. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers