| От | Tom Lane |
|---|---|
| Тема | Re: Alternative for vacuuming queue-like tables |
| Дата | |
| Msg-id | 1217.1146238121@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Alternative for vacuuming queue-like tables (Csaba Nagy <nagy@ecircle-ag.com>) |
| Ответы |
Re: Alternative for vacuuming queue-like tables
|
| Список | pgsql-general |
Csaba Nagy <nagy@ecircle-ag.com> writes:
> I'm not sure how this operation can work in the presence of other long
> running transactions which did not touch the queue table yet, but it
> actually does work, I can confirm that. Is it violating MVCC maybe ?
Yes :-(. I think you can get away with it if all your transactions that
use the queue table run in READ COMMITTED (not serializable) mode, and
if they work like
BEGIN;
LOCK queue_table IN some-suitable-mode;
process queue table;
COMMIT;
Grabbing the lock will ensure that CLUSTER finishes before any snapshot
is taken.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера