Re: Not able to purge partition

From: veem v <veema0000(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Not able to purge partition
Date: 2024-03-23 17:11:38
Message-ID: CAB+=1TWkCnOgQwNAzjqoUYY6QRrwVR84E_vtF2=y7G6RocqO8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Trying to consolidate the main questions here as below.

1)As we see having foreign key defined is making the detach partition run
for minutes(in our case 5-10minutes for 60 million rows partition), so how
to make the parent table partition detach and drop work fast in such a
scenario while maintaining the foreign key intact?

2)As we are using pg_partman for maintaining the partitions, So do we need
to schedule multiple crons (one for parent table and other for child
table), so that first it will drop the child table partition and then the
parent table partition(As because detaching/dropping parent partition first
will error out) called in order? OR only one cron job call like below can
do the job for us and make sure the dependency between the tables is taken
care of automatically?

SELECT cron.schedule('@daily',partman.run_maintenance());

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2024-03-23 17:38:27 Re: Not able to purge partition
Previous Message Ron Johnson 2024-03-23 10:51:30 Re: Statistics information.