Re: Speeding up INSERTs and UPDATEs to partitioned tables
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Speeding up INSERTs and UPDATEs to partitioned tables |
| Дата | |
| Msg-id | 17610.1532623666@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Speeding up INSERTs and UPDATEs to partitioned tables (David Rowley <david.rowley@2ndquadrant.com>) |
| Список | pgsql-hackers |
David Rowley <david.rowley@2ndquadrant.com> writes:
> 1) Got rid of PARTITION_ROUTING_MAXSIZE. The code using this was
> useless since the int would have wrapped long before it reached
> UINT_MAX. There's no shortage of other code doubling the size of an
> array by multiplying it by 2 unconditionally without considering
> overflowing an int. Unsure why you considered this more risky.
As long as you're re-palloc'ing the array each time, and not increasing
its size more than 2X, this is perfectly safe because of the 1GB size
limit on palloc requests. You'll fail because of that in the iteration
where the request is between 1GB and 2GB, just before integer overflow
can occur.
(Yes, this is intentional.)
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера