Re: BUG #18484: "Cannot enlarge string buffer" during parallel execution of prepared statement/partitioning

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #18484: "Cannot enlarge string buffer" during parallel execution of prepared statement/partitioning
Дата
Msg-id CAApHDvo+sBc1836ktwVNesgPb7L9Bx1=p4OQpeieq8pg0nW-hg@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #18484: "Cannot enlarge string buffer" during parallel execution of prepared statement/partitioning  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18484: "Cannot enlarge string buffer" during parallel execution of prepared statement/partitioning  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-bugs
On Wed, 29 May 2024 at 04:42, PG Bug reporting form
<noreply@postgresql.org> wrote:
> ERROR:  out of memory
> DETAIL:  Cannot enlarge string buffer containing 1073741812 bytes by 32 more
> bytes.

> I agree that the overall schema architecture should be rethought and much
> fewer partitions be used (and they are looking into this), but as the error
> does only happen with a parallel plan, I am reporting it here in case there
> is an easy fix for this, or at least maybe we can abort earlier with a
> better error message?

I think we should at least write a better error message.  "out of
memory" is misleading. I've attached a patch with some proposed better
wording.

The above will become:
ERROR:  string buffer exceeds maximum allowed length (1073741823)
DETAIL:  Cannot enlarge string buffer containing 1073741812 bytes by 32 more

I also see a few other places that report
ERRCODE_PROGRAM_LIMIT_EXCEEDED and display "out of memory". Namely:

pg_do_encoding_conversion
perform_default_encoding_conversion
pvsnprintf

We should probably consider fixing those too.

I understand this isn't to the level that you'd like to see this
fixed, but it at least should stop people from thinking that
installing more RAM might help.

David

Вложения

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

Предыдущее
От: Marcin Barczyński
Дата:
Сообщение: Re: BUG #18334: Segfault when running a query with parallel workers
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: BUG #18484: "Cannot enlarge string buffer" during parallel execution of prepared statement/partitioning