Re: PostgreSQL Limits and lack of documentation about them.

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: John Naylor <jcnaylor(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL Limits and lack of documentation about them.
Date: 2018-10-31 22:22:43
Message-ID: CAKJS1f_wT925=WoBKfXR-eG7UNgEfuJsiRhTwUv7hLtYM0zAZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1 November 2018 at 04:40, John Naylor <jcnaylor(at)gmail(dot)com> wrote:
> Thanks for doing this. I haven't looked at the rendered output yet,
> but I have some comments on the content.
>
> + <entry>Maximum Relation Size</entry>
> + <entry>32 TB</entry>
> + <entry>Limited by 2^32 pages per relation</entry>
>
> I prefer "limited to" or "limited by the max number of pages per
> relation, ...". I think pedantically it's 2^32 - 1, since that value
> is used for InvalidBlockNumber. More importantly, that seems to be for
> 8kB pages. I imagine this would go up with a larger page size. Page
> size might also be worth mentioning separately. Also max number of
> relation file segments, if any.

Thanks for looking at this.

I've changed this and added mention of BLKSIZE. I was a bit unclear
on how much internal detail should go into this.

> + <entry>Maximum Columns per Table</entry>
> + <entry>250 - 1600</entry>
> + <entry>Depending on column types. (More details here)</entry>
>
> Would this also depend on page size? Also, I'd put this entry before this one:
>
> + <entry>Maximum Row Size</entry>
> + <entry>1600 GB</entry>
> + <entry>Assuming 1600 columns, each 1 GB in size</entry>
>
> A toast pointer is 18 bytes, according to the docs, so I would guess
> the number of toasted columns would actually be much less? I'll test
> this on my machine sometime (not 1600GB, but the max number of toasted
> columns per tuple).

I did try a table with 1600 text columns then inserted values of
several kB each. Trying with BIGINT columns the row was too large for
the page. I've never really gotten a chance to explore these limits
before, so I guess this is about the time.

> + <entry>Maximum Identifier Length</entry>
> + <entry>63 characters</entry>
> + <entry></entry>
>
> Can this be increased with recompiling, if not conveniently?

Yeah. I added a note about that.

> + <entry>Maximum Indexed Columns</entry>
> + <entry>32</entry>
> + <entry>Can be increased by recompiling
> <productname>PostgreSQL</productname></entry>
>
> How about the max number of included columns in a covering index?

Those are included in the limit. I updated the text.

>> I'm not so sure about detailing limits of GUCs since the limits of
>> those are mentioned in pg_settings.
>
> Maybe we could just have a link to that section in the docs.

That's likely a good idea. I was just unable to find anything better
than the link to the pg_settings view.

I've attached an updated patch, again it's just intended as an aid for
discussions at this stage. Also included the rendered html.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
dblimits.html text/html 4.2 KB
v2-0001-Add-documentation-section-appendix-detailing-some.patch application/octet-stream 4.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-10-31 22:48:02 Re: replication_slots usability issue
Previous Message Tom Lane 2018-10-31 21:21:29 Re: Should pg 11 use a lot more memory building an spgist index?