Partitions and Primary Keys

From: Ian Dauncey <Ian(dot)Dauncey(at)bankzero(dot)co(dot)za>
To: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Partitions and Primary Keys
Date: 2021-05-04 09:02:09
Message-ID: DBAPR08MB568780CB7A07B94B40E900E5C05A9@DBAPR08MB5687.eurprd08.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Morning.

I have converted a few of our standard tables to partition tables (partition by HASH) and what I have noticed is that the some of the primary index columns have been switched around after the creation of the tables and partitions.
Can anyone shed some light as to why this happens.
We are running Postgresql V12.2 on Ubuntu 20.04.1 LTS

Below is an extract displaying the difference in the index
table_name
index_name
column_names
account_balance_beod
account_balance_beod_pkey
yyyymmdd, accountid
account_balance_beod_part1
account_balance_beod_part1_pkey
yyyymmdd, accountid
account_balance_beod_part2
account_balance_beod_part2_pkey
accountid, yyyymmdd
account_balance_beod_part3
account_balance_beod_part3_pkey
accountid, yyyymmdd
account_balance_beod_part4
account_balance_beod_part4_pkey
accountid, yyyymmdd
account_balance_beod_part5
account_balance_beod_part5_pkey
accountid, yyyymmdd

Regards
Ian

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.

Browse pgsql-admin by date

  From Date Subject
Next Message dbatoCloud Solution 2021-05-04 10:37:34 PostgreSQL community vs PostgreSQL EDB comparison and Difference document needed!!!!
Previous Message Victor Sudakov 2021-05-04 03:48:51 timescaledb backup, pg_dump warnings