On Tue, 2024-04-02 at 01:41 +0530, sud wrote:
> On Thu, Mar 21, 2024 at 6:18 PM Laurenz Albe wrote:
> > > [create some partitions, then drop a partition of the referenced table]
> > >
> > > SQL Error [P0001]: ERROR: cannot drop table
> > > schema1.test_part_drop_parent_p2024_02_01 because other o
On Thu, Mar 21, 2024 at 6:18 PM Laurenz Albe
wrote:
>
> > [create some partitions, then drop a partition of the referenced table]
> >
>
> > SQL Error [P0001]: ERROR: cannot drop table
> schema1.test_part_drop_parent_p2024_02_01 because other objects depend on it
> > CONTEXT: SQL statement "DROP T
On Mon, 2024-03-25 at 02:54 +0530, veem v wrote:
> Can you please suggest some docs which shows the way we should
> do the partition maintenance (if not using pg_partman)?
man cron
> Actually , I am not able to visualize the steps here. Do you mean
> to say , we will just create the partition tab
On Sun, 24 Mar 2024 at 20:29, Laurenz Albe wrote:
> On Sun, 2024-03-24 at 00:37 +0530, veem v wrote:
> > > Instead, use foreign keys between the partitions.
> >
> > I am struggling to understand how to maintain those partitions then?
> > As because we were planning to use pg_partman for creating
On Sun, 2024-03-24 at 00:37 +0530, veem v wrote:
> > Instead, use foreign keys between the partitions.
>
> I am struggling to understand how to maintain those partitions then?
> As because we were planning to use pg_partman for creating and dropping
> partitions automatically without much hassle.
On Sun, Mar 24, 2024 at 12:38 AM veem v wrote:
> On Sat, 23 Mar 2024 at 23:08, Laurenz Albe
> wrote:
>
>> On Sat, 2024-03-23 at 22:41 +0530, veem v wrote:
>> > 1)As we see having foreign key defined is making the detach partition
>> run
>> > for minutes(in our case 5-10minutes for 60 million r
On Sat, 23 Mar 2024 at 23:08, Laurenz Albe wrote:
> On Sat, 2024-03-23 at 22:41 +0530, veem v wrote:
> > 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 partit
On Sat, 2024-03-23 at 22:41 +0530, veem v wrote:
> 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 m
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 maintai
Can someone please confirm if this behavior of foreign key is expected with
the partition created through partman extension and thus we need to have
our manual process written for partition purge (in order of child first and
then parent) , rather relying on partman partition maintenance to take car
On Thu, 21 Mar 2024 at 23:39, Laurenz Albe wrote:
> On Thu, 2024-03-21 at 22:50 +0530, veem v wrote:
> > So when you mentioned "to create the foreign keys *not* between the
> > partitioned table but between the individual partitions" , can that
> > be done using the same "partman.create_parent" p
On Thu, 2024-03-21 at 22:50 +0530, veem v wrote:
> So when you mentioned "to create the foreign keys *not* between the
> partitioned table but between the individual partitions" , can that
> be done using the same "partman.create_parent" procedure and automated
> cron job schedule or has to be done
On Thu, 21 Mar, 2024, 6:18 pm Laurenz Albe,
wrote:
What you *can* do is detach the partition and then drop it, but detatching
will
be slow because PostgreSQL has to check for referencing rows.
The best solution is to create the foreign key *not* between the partitioned
tables, but between the i
- Mail original -
> De: "Laurenz Albe"
> À: "veem v" , "pgsql-general"
>
> Envoyé: Jeudi 21 Mars 2024 13:48:19
> Objet: Re: Not able to purge partition
> On Thu, 2024-03-21 at 11:07 +0530, veem v wrote:
>> CREATE TABLE schema1.t
On Thu, 2024-03-21 at 11:07 +0530, veem v wrote:
> CREATE TABLE schema1.test_part_drop_parent
> (
> c1 varchar(36) NOT NULL ,
> c2_part_date timestamp with time zone NOT NULL ,
> c3 numeric(12,0) NOT NULL ,
> CONSTRAINT test_part_drop_parent_PK PRIMARY KEY (c1,c2_part_date)
> ) PARTITION B
Also, i see, its not allowing to drop the parent table partition even all
the respective child partitions are dropped and no child record exists in
the child table. But this started working , when we detach parent partition
and then drop the partitions. So it means if we just change the setup of
th
Hello All,
We created two partitioned tables one being parent and other child. Both
are range partitioned and one table has a foreign key to the other parent
table. Now , when we run the partition maintenance job to drop the older
partitions which meet the partition retention criteria, it's not le
17 matches
Mail list logo