Re: Huge memory consumption on partitioned table with FKs

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, keisuke kuroda <keisuke(dot)kuroda(dot)3862(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, tatsuhito(dot)kasahara(dot)rd(at)hco(dot)ntt(dot)co(dot)jp
Subject: Re: Huge memory consumption on partitioned table with FKs
Date: 2021-03-08 12:58:03
Message-ID: CA+HiwqFywoBsnYgzB2yid-zZjT2HrPkei2UPDM4FtBKb_wsi3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 8, 2021 at 9:53 PM Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote:
> On Mon, Mar 8, 2021 at 8:42 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
>> On Mon, Mar 8, 2021 at 8:39 PM Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote:
>> > On Mon, Mar 8, 2021 at 3:43 PM Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote:
>> >> My point below is a bit off-topic, but I want to share it here. Since
>> >> we implement a partitioned table in PG with the inherited class, it has much
>> >> more flexibility than other databases. Like in PG, we allow different partitions
>> >> have different physical order, different indexes, maybe different index states.
>> >> that would cause our development work hard in many places and cause some
>> >> runtime issues as well (like catalog memory usage), have we discussed
>> >> limiting some flexibility so that we can have better coding/running experience?
>> >> I want to do some research in this direction, but it would be better that I can
>> >> listen to any advice from others. More specifically, I want to reduce the memory
>> >> usage of Partitioned table/index as the first step. In my testing, each IndexOptInfo
>> >> will use 2kB memory in each backend.
>> >
>> >
>> > As for the compatible issue, will it be ok to introduce a new concept like "
>> > CREATE TABLE p (a int) partitioned by list(a) RESTRICTED". We can add these
>> > limitation to restricted partitioned relation only.
>>
>> I think you'd agree that the topics you want to discuss deserve a
>> separate discussion thread. You may refer to this discussion in that
>> new thread if you think that your proposals can solve the problem
>> being discussed here more generally, which would of course be great.
>
> Sure, I can prepare more data and start a new thread for this.

Great, thanks.

--
Amit Langote
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ibrar Ahmed 2021-03-08 13:06:48 Re: pg_rewind race condition just after promotion
Previous Message Amit Kapila 2021-03-08 12:55:09 Re: [HACKERS] logical decoding of two-phase transactions