Thread: Pg partman

Pg partman

From
Sathish Reddy
Date:
Hi 
  We are planning to create function like run_maintance_proc which can do detach partition concurrently and create new partion s using pre-make in run maintenance..

    Please share any use case on these..

Thanks 
Sathish Reddy 

Re: Pg partman

From
Keith Fiske
Date:


On Mon, Aug 26, 2024 at 2:13 PM Sathish Reddy <sathishreddy.postgresql@gmail.com> wrote:
Hi 
  We are planning to create function like run_maintance_proc which can do detach partition concurrently and create new partion s using pre-make in run maintenance..

    Please share any use case on these..

Thanks 
Sathish Reddy 

You cannot create a function or procedure within the database that can do any commands with the CONCURRENT flag. PostgreSQL simply does not allow that otherwise I would have done it already. As I stated elsewhere, this would require an external script


--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com

Re: Pg partman

From
Sathish Reddy
Date:

Please share the script which used..

Thanks
Sathish Reddy

On Tue, Aug 27, 2024, 12:11 AM Keith Fiske <keith.fiske@crunchydata.com> wrote:


On Mon, Aug 26, 2024 at 2:13 PM Sathish Reddy <sathishreddy.postgresql@gmail.com> wrote:
Hi 
  We are planning to create function like run_maintance_proc which can do detach partition concurrently and create new partion s using pre-make in run maintenance..

    Please share any use case on these..

Thanks 
Sathish Reddy 

You cannot create a function or procedure within the database that can do any commands with the CONCURRENT flag. PostgreSQL simply does not allow that otherwise I would have done it already. As I stated elsewhere, this would require an external script


--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com

Re: Pg partman

From
Keith Fiske
Date:


On Mon, Aug 26, 2024 at 3:36 PM Sathish Reddy <sathishreddy.postgresql@gmail.com> wrote:

Please share the script which used..

Thanks
Sathish Reddy

On Tue, Aug 27, 2024, 12:11 AM Keith Fiske <keith.fiske@crunchydata.com> wrote:


On Mon, Aug 26, 2024 at 2:13 PM Sathish Reddy <sathishreddy.postgresql@gmail.com> wrote:
Hi 
  We are planning to create function like run_maintance_proc which can do detach partition concurrently and create new partion s using pre-make in run maintenance..

    Please share any use case on these..

Thanks 
Sathish Reddy 

You cannot create a function or procedure within the database that can do any commands with the CONCURRENT flag. PostgreSQL simply does not allow that otherwise I would have done it already. As I stated elsewhere, this would require an external script


--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com


There are no scripts written for this yet.

--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com