pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Query size limitation missing in documentation
2+ messages / 2 participants
[nested] [flat]

* Query size limitation missing in documentation
@ 2021-11-15 16:58 Martín Marqués <martin.marques@gmail.com>
  2021-11-15 17:07 ` Re: Query size limitation missing in documentation Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Martín Marqués @ 2021-11-15 16:58 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org

Hello,

I was looking at https://www.postgresql.org/docs/current/limits.html
(was brought up by a customer) and found we are missing the limitation
of the string of the SQL to be executed (it's 1GB which is the longest
string postgres can hold)

```
/* It's possible we could use a different value for this in frontend code */
#define MaxAllocSize    ((Size) 0x3fffffff) /* 1 gigabyte - 1 */
```

Would there be any objections to adding such limitations in the list
from the link above?

Attached in a proposed patch which adds this to the documentation. I
also added a paragraph mentioning why the field and query length are
limited by 1GB.

-- 
Martín Marqués
It’s not that I have something to hide,
it’s that I have nothing I want you to see

Attachments:

Add-query-length-limit.patch (text/x-patch, 795B) download diff --git a/doc/src/sgml/limits.sgml b/doc/src/sgml/limits.sgml index 7713ff7177..b9c0a05b75 100644 --- a/doc/src/sgml/limits.sgml +++ b/doc/src/sgml/limits.sgml @@ -68,6 +68,12 @@ <entry></entry> </row> + <row> + <entry>query string length</entry> + <entry>1 GB</entry> + <entry></entry> + </row> + <row> <entry>identifier length</entry> <entry>63 bytes</entry> @@ -111,6 +117,11 @@ stored inside the heap tuple. </para> + <para> + Both the field size and the query string length are limited to 1GB as that + is the maximum size of a string representation. + </para> + <para> Columns that have been dropped from the table also contribute to the maximum column limit. Moreover, although the dropped column values for newly
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: Query size limitation missing in documentation
  2021-11-15 16:58 Query size limitation missing in documentation Martín Marqués <martin.marques@gmail.com>
@ 2021-11-15 17:07 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-11-15 17:07 UTC (permalink / raw)
  To: Martín Marqués <martin.marques@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org

=?UTF-8?B?TWFydMOtbiBNYXJxdcOpcw==?= <martin.marques@gmail.com> writes:
> I was looking at https://www.postgresql.org/docs/current/limits.html
> (was brought up by a customer) and found we are missing the limitation
> of the string of the SQL to be executed (it's 1GB which is the longest
> string postgres can hold)

I kind of doubt that this is a useful piece of information, because
there are a bunch of other practical limits you're likely to hit
before that one.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-11-15 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 16:58 Query size limitation missing in documentation Martín Marqués <martin.marques@gmail.com>
2021-11-15 17:07 ` Tom Lane <tgl@sss.pgh.pa.us>

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