Re: Not able to purge partition - Mailing list pgsql-general

From veem v
Subject Re: Not able to purge partition
Date
Msg-id CAB+=1TWkCnOgQwNAzjqoUYY6QRrwVR84E_vtF2=y7G6RocqO8A@mail.gmail.com
Whole thread Raw
In response to Re: Not able to purge partition  (veem v <veema0000@gmail.com>)
Responses Re: Not able to purge partition  (Laurenz Albe <laurenz.albe@cybertec.at>)
List 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());

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Statistics information.
Next
From: Laurenz Albe
Date:
Subject: Re: Not able to purge partition