Re: Declarative partitioning and automatically generated row-IDs using BIGSERIAL - Mailing list pgsql-general

From Thorsten Schöning
Subject Re: Declarative partitioning and automatically generated row-IDs using BIGSERIAL
Date
Msg-id 10710704258.20201231205009@am-soft.de
Whole thread Raw
In response to Re: Declarative partitioning and automatically generated row-IDs using BIGSERIAL  (Michael Lewis <mlewis@entrata.com>)
Responses Re: Declarative partitioning and automatically generated row-IDs using BIGSERIAL  (Michael Lewis <mlewis@entrata.com>)
List pgsql-general
Guten Tag Michael Lewis,
am Donnerstag, 31. Dezember 2020 um 19:28 schrieben Sie:

> select
>        t.reloptions
> from pg_class t
>   join pg_namespace n on n.oid = t.relnamespace
> where t.relname = 'clt_rec'
>   and n.nspname = 'public';

That outputs NULL, as well for other tested indexes. Additionally, the
following two lines only apply to the index associtaed with the
primary key, not the table itself, don't they?

>         CONSTRAINT pk_clt_rec PRIMARY KEY (id)
>          WITH (FILLFACTOR = 10),

I've checked pgModeler and it seems to set such low fill factors
automatically on old primary keys only. Will remove those.

> Sequences are incremented and return the new value whenever they are
> called. If all partitions inherit the same sequence (behavior determined by
> which options you use when you create partitions LIKE parent)[...]

Am I allowed or is it necessary to use LIKE? The docs don't use that
and the description sounds wrong as well.

> CREATE TABLE measurement_y2006m02 PARTITION OF measurement
>     FOR VALUES FROM ('2006-02-01') TO ('2006-03-01');

> Unlike INHERITS, the new table and original table are completely
> decoupled after creation is complete. Changes to the original table
> will not be applied to the new table, and it is not possible to
> include data of the new table in scans of the original table.

The option you mention is INCLUDING IDENTITY and that would need to be
AVOIDED to NOT get multiple SEQUENCES?

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning
AM-SoFT IT-Service - Bitstore Hameln GmbH

E-Mail:  Thorsten.Schoening@AM-SoFT.de
Web:     http://www.AM-SoFT.de/

Telefon: 05151-  9468-55
Fax:     05151-  9468-88
Mobil:    0178-8 9468-04

Firmensitz: Bitstore IT-Consulting, Frankfurter Allee 285, 10317 Berlin
Steuernummer 037/230/30566, HR 27198, Amtsgericht Potsdam Geschäftsführer Janine Galonska




pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Declarative partitioning and automatically generated row-IDs using BIGSERIAL
Next
From: Thorsten Schöning
Date:
Subject: How to REMOVE a fillfactor set by accident?