Re: Question on partman extension while relation exist

From: yudhi s <learnerdatabase99(at)gmail(dot)com>
To: Muhammad Ikram <mmikram(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Question on partman extension while relation exist
Date: 2024-07-02 07:54:07
Message-ID: CAEzWdqdGyJKuKJYmvi8Xm0M9xKvffcHS9wO4kQyFCnwTZLyd1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2 Jul, 2024, 12:43 pm Muhammad Ikram, <mmikram(at)gmail(dot)com> wrote:

> Hi Yudhi,
>
> I think disabling foreign keys before maintenance will help.
>
> --
> Muhammad Ikram
>

Do you mean to say call the parent table first for maintenance followed by
child, and remove all the foreign key first which are pointing to this
parent table partition which is going to be dropped by the pg_partman?

As drop/create partition is being called from within pg_partman without our
intervention, so where should we put this drop foreign key code? Do you
mean having that with another event trigger which will fire before drop?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message clipperDB 2024-07-02 16:13:04 printing PGresult content with gdb
Previous Message Muhammad Ikram 2024-07-02 07:13:21 Re: Question on partman extension while relation exist