Allowing VACUUM to time out when waiting for locks?

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Allowing VACUUM to time out when waiting for locks?
Дата
Msg-id 6.2.0.14.0.20050130011642.05329df8@203.8.195.10
обсуждение исходный текст
Ответы Re: Allowing VACUUM to time out when waiting for locks?  (Bruno Wolff III <bruno@wolff.to>)
Re: Allowing VACUUM to time out when waiting for locks?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
We have a frequently updated (peak > 5/sec) table with about 1000 rows.

We run VACCUM FULL on this table every 5 minutes.

The regular updates are not long in duration, and the vacuum is fast, so they
do not produce noticeable delays.

When we run a pg_dump on the database:

- the dump takes a long standing AccessShareLock lock on this table
(the database is large, and the table is locked for the duration).

- the regular updates run quite happily

- the VACUUM FULL comes along and asks for a AccessExclusiveLock  (which is not granted due to PG_DUMP).

- the regular updates hang until the dump completes

Is it possible to set up a vacuum to fail if a lock is not granted in
a limited period of time (eg. 1 minute)?

We could use lock files to synchronize our dumps with our vacuums, but
were hoping for a way of managing this within the DB so that ad-hoc dumps
will not cause a problem.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                 |    --________--
PGP key available upon request,  |  /
and from pgp.mit.edu:11371       |/ 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [pgsql-hackers] Allow GRANT/REVOKE permissions to be applied to all schema
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Allowing VACUUM to time out when waiting for locks?