| От | pinker |
|---|---|
| Тема | pg_sleep() inside plpgsql block - pro & cons |
| Дата | |
| Msg-id | 1538475003972-0.post@n3.nabble.com обсуждение исходный текст |
| Ответы |
Re: pg_sleep() inside plpgsql block - pro & cons
|
| Список | pgsql-general |
Hi! There is second time I see that somebody uses pg_sleep function inside plpgsql block. This case is quite similar to the last one - it's some kind of wait for data to be loaded. After pg_sleep there is a check if some condition is true, if not procedure goes to sleep again. As a result an average duration of this function is 1,5h... I'm trying to gather pros and cons regarding using pg_sleep this way. What's coming to my mind are only 2 cons: * clog contention * long running open transactions (which is quite good described in here: https://www.simononsoftware.com/are-long-running-transactions-bad/) So maybe you'll add some more to the list? -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера