pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas@vondra.me>
Cc: Greg Sabino Mullane <htamfids@gmail.com>
Cc: Niklas Hambüchen <mail@nh2.me>
Cc: pgsql-bugs@lists.postgresql.org, ruben@benaco.com, Niklas Hambüchen <niklas@benaco.com>
Subject: Re: "memory exhausted" in query parser/simplifier for many nested parentheses
Date: Fri, 13 Dec 2024 11:08:38 -0500
Message-ID: <1073817.1734106118@sss.pgh.pa.us> (raw)
In-Reply-To: <cb8fa16c-0141-4569-8599-d009e0f1d96d@vondra.me>
References: <161892c0-65fc-42a6-8af9-b098879decd4@nh2.me>
	<654489.1734019548@sss.pgh.pa.us>
	<e50e8be3-7b5e-42fa-ac8f-388e6598106b@nh2.me>
	<CAKAnmmJZbU0htYb9fN8amRiUEJ9BAoTkbvrdw8f3ZT8zgMjSjw@mail.gmail.com>
	<cb8fa16c-0141-4569-8599-d009e0f1d96d@vondra.me>

Tomas Vondra <tomas@vondra.me> writes:
> On 12/13/24 15:44, Greg Sabino Mullane wrote:
>> Documentation patches are always welcome. Perhaps at https://
>> www.postgresql.org/docs/current/limits.html <https://www.postgresql.org/
>> docs/current/limits.html> ?

> FWIW I don't think it's practical to document such limits in detail.

Yeah.  To take the current example:

1. The grammar nesting limit is imposed by bison, not by us, and it
would be odd for us to be the ones to document it.  We don't even
know whether it's the same across all versions of bison.

2. The stack-overflow limit during optimization is going to manifest
at some ridiculously platform-dependent depth.  It'll depend on
max_stack_depth to begin with, and then the actual number of stack
frames that fit into that will depend on a huge number of factors,
and probably will change in every PG release.  The best the
documentation could possibly do is to mention that there's a limit,
which seems unhelpful.

> Everyone knows the limits exist, and there's a lot of them

This.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <1073817.1734106118@sss.pgh.pa.us>
Permalink:  ../1073817.1734106118@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1073817.1734106118@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tomas@vondra.me, htamfids@gmail.com, mail@nh2.me, niklas@benaco.com
  Subject: Re: "memory exhausted" in query parser/simplifier for many nested parentheses
  In-Reply-To: <1073817.1734106118@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox