From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Andrew Zakharov <Andrew898(at)mail(dot)ru> |
Cc: | Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Simple task with partitioning which I can't realize |
Date: | 2022-03-01 16:43:37 |
Message-ID: | CAKFQuwYkytWo+4qgV6unHCdbsgGN40yijoXrmOmJf=YeAawHpg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, Mar 1, 2022 at 9:37 AM Andrew Zakharov <Andrew898(at)mail(dot)ru> wrote:
> David, - yes, creation composite foreign/primary key is not a problem. But
> the main question is what method should I use for partitioning by composite
> key gid, region_code?
>
The convention here is to inline or bottom-post responses.
Your original plan - list partitions by region_code. You couldn't do that
before because you weren't seeing the region_code as being part of your PK
and all partition columns must be part of the PK. My suggestion is that
instead of figuring out how to work around that limitation (not that I
think there is a good one to be had) you accept it and just add region_code
to the PK.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Zakharov | 2022-03-01 16:45:40 | RE: Simple task with partitioning which I can't realize |
Previous Message | Andrew Zakharov | 2022-03-01 16:37:09 | RE: Simple task with partitioning which I can't realize |