Re: Simple task with partitioning which I can't realize

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Simple task with partitioning which I can't realize
Дата
Msg-id CAKFQuwYkytWo+4qgV6unHCdbsgGN40yijoXrmOmJf=YeAawHpg@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Simple task with partitioning which I can't realize  ("Andrew Zakharov" <Andrew898@mail.ru>)
Список pgsql-performance
On Tue, Mar 1, 2022 at 9:37 AM Andrew Zakharov <Andrew898@mail.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.

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Andrew Zakharov"
Дата:
Сообщение: RE: Simple task with partitioning which I can't realize
Следующее
От: "Andrew Zakharov"
Дата:
Сообщение: RE: Simple task with partitioning which I can't realize