pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Zhidenkov <andrei.zhidenkov@n26.com>
To: Ravi Krishna <srkrishna@myself.com>
Cc: Vikas Sharma <shavikas@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Partitioning large table (140GB)
Date: Wed, 20 Nov 2019 11:51:09 +0100
Message-ID: <87B2C428-2932-47BA-B1A6-7A68986D3DA9@n26.com> (raw)
In-Reply-To: <trinity-c080158b-3124-4989-8c4f-65310bd05eb7-1574246959204@3c-app-mailcom-lxa11>
References: <CAN6gwKyuosNZKsZ=JnpJLimvtYx1RGtnSZ4r328s_J+GNuLLKg@mail.gmail.com>
	<trinity-c080158b-3124-4989-8c4f-65310bd05eb7-1574246959204@3c-app-mailcom-lxa11>

You can also use extensions like pg_partman or pg_pathman. The last one allows to partition tables smoothly on live environments.

> On 20. Nov 2019, at 11:49, Ravi Krishna <srkrishna@myself.com> wrote:
> 
>> In our production, we use postgres 9.5 with streaming replication 
>> using repmgr, there is a large table of 140GB size which receives
>> lots of inserts,
>> Is it possible to partition this table in this version of postgres? 
>> and if so, please, can someone let me know the best way to accomplish 
>> this and the best practices around it?
> 
> In this version only inheritance is possible.  From my experience avoid using
> triggers for insert and let the application (if possible) directly write to the 
> right table.
>  
>  
> 
> 






view thread (3+ messages)

Message-ID: <87B2C428-2932-47BA-B1A6-7A68986D3DA9@n26.com>
Permalink:  ../87B2C428-2932-47BA-B1A6-7A68986D3DA9@n26.com/
Also on:    postgresql.org/message-id/87B2C428-2932-47BA-B1A6-7A68986D3DA9@n26.com

 · 

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: andrei.zhidenkov@n26.com, srkrishna@myself.com, shavikas@gmail.com
  Subject: Re: Partitioning large table (140GB)
  In-Reply-To: <87B2C428-2932-47BA-B1A6-7A68986D3DA9@n26.com>
  References: <CAN6gwKyuosNZKsZ=JnpJLimvtYx1RGtnSZ4r328s_J+GNuLLKg@mail.gmail.com> <trinity-c080158b-3124-4989-8c4f-65310bd05eb7-1574246959204@3c-app-mailcom-lxa11> <87B2C428-2932-47BA-B1A6-7A68986D3DA9@n26.com>

* 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