pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Cc: Matti Linnanvuori <matti.linnanvuori@portalify.com>
Subject: Re: Partition By Range Without PrimaryKey : Postgresql Version 12.8 on AWS RDS
Date: Mon, 22 May 2023 09:15:32 -0600
Message-ID: <5F09A2FE-117F-47D4-B78B-25023A02AFB7@elevated-dev.com> (raw)
In-Reply-To: <VI1PR10MB7671781EA8ADC72B088F1D318D439@VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.COM>
References: <VI1PR10MB76711B1B17D38E3CFF4E73008D439@VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.COM>
	<VI1PR10MB7671180739AB51DF1455A1A48D439@VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.COM>
	<404AADDB-83F9-4A4A-B6D7-E736C278EFDA@portalify.com>
	<VI1PR10MB7671D817E765A2ADFA174CAD8D439@VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.COM>
	<9558F0D3-4B5B-4CE2-A27F-156149E75916@elevated-dev.com>
	<2BE78422-2D94-424F-ACA7-1FBAA62D7F5E@elevated-dev.com>
	<VI1PR10MB7671781EA8ADC72B088F1D318D439@VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.COM>

> On May 22, 2023, at 8:07 AM, Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.com> wrote:
> 
> However, since I was telling other ripple effects, we're trying to test creating subpartitions by placedon and partitions by brandid like below.
>  The reason being : we'll have to archive or purge the data post 90 days.

You could still partition by placedon... Partitioning by brandid is not much help with rotating out old data.

Why the change in primary key? In fact, your primary key in that example is not guaranteed unique--if I'm reading this correctly there is a chance of collision.

What's wrong with partitioning by placedon, with a primary key of (betid, placedon)?






view thread (18+ messages)  latest in thread

Message-ID: <5F09A2FE-117F-47D4-B78B-25023A02AFB7@elevated-dev.com>
Permalink:  ../5F09A2FE-117F-47D4-B78B-25023A02AFB7@elevated-dev.com/
Also on:    postgresql.org/message-id/5F09A2FE-117F-47D4-B78B-25023A02AFB7@elevated-dev.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott_ribe@elevated-dev.com, phani.somayajula@pragmaticplay.com, pgsql-admin@lists.postgresql.org, matti.linnanvuori@portalify.com
  Subject: Re: Partition By Range Without PrimaryKey : Postgresql Version 12.8 on AWS RDS
  In-Reply-To: <5F09A2FE-117F-47D4-B78B-25023A02AFB7@elevated-dev.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