On 1 November 2018 at 04:40, John Naylor <jcnay...@gmail.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
Title: Appendix B. Database Limitations

Appendix B. Database Limitations

The following table describes the limits of PostgreSQL

Table B.1. PostgreSQL limitations

ItemLimitComment
Maximum Database SizeUnlimited 
Maximum Number of DatabasesUnlimited 
Maximum Relation Size32 TBLimited to 2^32 - 1 pages per relation. Can be increased by increasing BLCKSZ and recompiling PostgreSQL
Maximum Columns per Table250 - 1600Depending on column types. (More details here)
Maximum Row Size1600 GBAssuming 1600 columns, each 1 GB in size
Maximum Field Size1 GB 
Maximum Identifier Length63 charactersCan be increased by recompiling PostgreSQL
Maximum Rows per TableUnlimited 
Maximum Indexes per TableUnlimited 
Maximum Indexed Columns32Can be increased by recompiling PostgreSQL. Limit includes any INCLUDE columns
Maximum Partition Keys32Can be increased by recompiling PostgreSQL
Maximum Relations per DatabaseUnlimited 
Maximum Partitions per Partitioned Relations268,435,456May be increased by using sub-partitioning

Attachment: v2-0001-Add-documentation-section-appendix-detailing-some.patch
Description: Binary data

Reply via email to