Re: Assistance with an out of shared memory error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Assistance with an out of shared memory error
Дата
Msg-id 3621619.1642293672@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Assistance with an out of shared memory error  (Mladen Gogala <gogala.mladen@gmail.com>)
Список pgsql-general
Mladen Gogala <gogala.mladen@gmail.com> writes:
> On 1/13/22 18:35, Tom Lane wrote:
>> .. or else reduce the number of partitions you're using.  (People
>> frequently seem to think that more partitions are free.  That is
>> extremely not true.  I generally think that if you're using more
>> than a few dozen partitions per table, you are making a mistake.)

> Interesting. What resources do partitions consume?

Locks, planning time, execution time, cache-management overhead.
To the extent that all of your queries against a table can be
"pruned" to only touch a few partitions, you might come out ahead on
execution time; but I think few workloads are completely stylized
like that.

The poster-child use case for partitions is where you can make
them fit a recurring bulk-deletion scenario; for instance, once
a month you want to drop the oldest month's worth of data.
If you've got terabytes of data then there's also something to
be said for being able to split up vacuuming and other background
overhead.  But I think a lot of people are way too eager to
apply partitioning where it doesn't fit, or to overuse it even
where it does fit.

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: WAL Archiving and base backup
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: WAL Archiving and base backup