pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: veem v <veema0000@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Not able to purge partition
Date: Mon, 25 Mar 2024 07:52:51 +0100
Message-ID: <017026018f323be685087ba2d0e1b7c5a9b331ea.camel@cybertec.at> (raw)
In-Reply-To: <CAB+=1TVAJTD=grwZ5RDQgpU2QzhkzqqkPwTJdbWW56ngkD+3dg@mail.gmail.com>
References: <CAB+=1TU3kCsNM7xSHTCCu1AJAbL2-5phVmisLB_uTg-q2wEFvg@mail.gmail.com>
	<c07417320869cfc1f0bededec98cb92298c37df0.camel@cybertec.at>
	<CAB+=1TUg+xCycqewFrMD7KWh6qwutDFHjhv5rO=CUuC2HTowHg@mail.gmail.com>
	<508cb815fafbb0a82c59e451b235a6b9b44a0575.camel@cybertec.at>
	<CAB+=1TW+bnifVFMtC4u5Ok2sjyse54iDK242v47txf4gotU7nw@mail.gmail.com>
	<CAB+=1TWkCnOgQwNAzjqoUYY6QRrwVR84E_vtF2=y7G6RocqO8A@mail.gmail.com>
	<16b303b8cc44eece159d144cf483517c99c61f2a.camel@cybertec.at>
	<CAB+=1TWpW0zfrQ5d3FrYVeijggNuDWOak6Fk9e=2Ywg3fdyYUA@mail.gmail.com>
	<7f7b1f46cbba679ebd7cd35a3cbf77fc8a4c6312.camel@cybertec.at>
	<CAB+=1TVAJTD=grwZ5RDQgpU2QzhkzqqkPwTJdbWW56ngkD+3dg@mail.gmail.com>

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 tables without any foreign
> key constraints first. Then create parent table future partitions first
> (say 10 days partitions) and then child table future 10 days partitions
> manually and during that define the foreign key constraints , indexes
> etc. Here , how to exactly find the exact matching parent partitions
> so as to create the foreign keys one to one

I don't see what's so hard about it.  When the time is there to create
a new partition, create a partition for both the parent and the child
table and define a foreign key between them.

Yours,
Laurenz Albe





view thread (17+ messages)  latest in thread

Message-ID: <017026018f323be685087ba2d0e1b7c5a9b331ea.camel@cybertec.at>
Permalink:  ../017026018f323be685087ba2d0e1b7c5a9b331ea.camel@cybertec.at/
Also on:    postgresql.org/message-id/017026018f323be685087ba2d0e1b7c5a9b331ea.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, veema0000@gmail.com
  Subject: Re: Not able to purge partition
  In-Reply-To: <017026018f323be685087ba2d0e1b7c5a9b331ea.camel@cybertec.at>
  References: <CAB+=1TU3kCsNM7xSHTCCu1AJAbL2-5phVmisLB_uTg-q2wEFvg@mail.gmail.com> <c07417320869cfc1f0bededec98cb92298c37df0.camel@cybertec.at> <CAB+=1TUg+xCycqewFrMD7KWh6qwutDFHjhv5rO=CUuC2HTowHg@mail.gmail.com> <508cb815fafbb0a82c59e451b235a6b9b44a0575.camel@cybertec.at> <CAB+=1TW+bnifVFMtC4u5Ok2sjyse54iDK242v47txf4gotU7nw@mail.gmail.com> <CAB+=1TWkCnOgQwNAzjqoUYY6QRrwVR84E_vtF2=y7G6RocqO8A@mail.gmail.com> <16b303b8cc44eece159d144cf483517c99c61f2a.camel@cybertec.at> <CAB+=1TWpW0zfrQ5d3FrYVeijggNuDWOak6Fk9e=2Ywg3fdyYUA@mail.gmail.com> <7f7b1f46cbba679ebd7cd35a3cbf77fc8a4c6312.camel@cybertec.at> <CAB+=1TVAJTD=grwZ5RDQgpU2QzhkzqqkPwTJdbWW56ngkD+3dg@mail.gmail.com> <017026018f323be685087ba2d0e1b7c5a9b331ea.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox