Re: Regarding publish_via_partiton_root with pglogical

2024-09-27 Thread Durgamahesh Manne
Hi Any inputs from the PGDG team members regarding this ? Regards Durga Mahesh On Mon, Jul 22, 2024 at 3:35 PM khan Affan wrote: > Hi Durgamahesh > > In pglogical extension, there is no direct equivalent to the > publish_via_partition_root option found in the built-in logical replication > > y

Re: Regarding use of single column as primary key on partitioned table

2024-09-27 Thread Ron Johnson
On Sat, Sep 28, 2024 at 12:55 AM Tom Lane wrote: > Ron Johnson writes: > > On Sat, Sep 28, 2024 at 12:39 AM David G. Johnston < > > david.g.johns...@gmail.com> wrote: > >> On Friday, September 27, 2024, Durgamahesh Manne < > >>> Can't we use primary key on singal column(betid) on partitioned tab

Re: Synchronize the dump with a logical slot with --snapshot

2024-09-27 Thread Durgamahesh Manne
Hi Team Can anyone respond to my question from respected team members ? Durga Mahesh On Thu, Sep 26, 2024 at 2:23 AM Durgamahesh Manne wrote: > Hi Team > > --snapshot=snapshotname > (Use the specified synchronized snapshot when making a dump of the database > > This option is useful when needi

Re: Regarding use of single column as primary key on partitioned table

2024-09-27 Thread Tom Lane
Ron Johnson writes: > On Sat, Sep 28, 2024 at 12:39 AM David G. Johnston < > david.g.johns...@gmail.com> wrote: >> On Friday, September 27, 2024, Durgamahesh Manne < >>> Can't we use primary key on singal column(betid) on partitioned table >>> rather than using composite key (placedon,betid)? >>

Re: Regarding use of single column as primary key on partitioned table

2024-09-27 Thread Ron Johnson
On Sat, Sep 28, 2024 at 12:39 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Friday, September 27, 2024, Durgamahesh Manne < > maheshpostgr...@gmail.com> wrote: > >> >> ERROR: unique constraint on partitioned table must include all >> partitioning columns >> DETAIL: PRIMARY KEY c

Re: Regarding use of single column as primary key on partitioned table

2024-09-27 Thread Christophe Pettus
> On Sep 27, 2024, at 21:25, Durgamahesh Manne > wrote: > > Can't we use primary key on singal column(betid) on partitioned table rather > than using composite key (placedon,betid)? No. Any unique constraint on a partitioned table must include the partition key, including a primary key co

Re: Regarding use of single column as primary key on partitioned table

2024-09-27 Thread David G. Johnston
On Friday, September 27, 2024, Durgamahesh Manne wrote: > > ERROR: unique constraint on partitioned table must include all > partitioning columns > DETAIL: PRIMARY KEY constraint on table "bet" lacks column "placedon" > which is part of the partition key. > test=> > > Can't we use primary key o

Regarding use of single column as primary key on partitioned table

2024-09-27 Thread Durgamahesh Manne
Hi Team test=> CREATE TABLE public.bet ( betid int4 NOT NULL, externalbetid text NULL, externalsystem text NULL, placedon timestamptz NULL, createdon timestamptz NULL ) partition by list (placedon) ; CREATE TABLE test=> alter table public.bet add primary key

Re: Request for Insights on ID Column Migration Approach

2024-09-27 Thread Tom Lane
"Peter J. Holzer" writes: > As you can see, adding the primary key takes just as much time as > creating the unique index. So it doesn't look like PostgreSQL is able to > take advantage of the existing index (which makes sense since it still > has to create a new index). No, but you can attach an

Re: Request for Insights on ID Column Migration Approach

2024-09-27 Thread Peter J. Holzer
On 2024-09-27 07:26:45 +0530, Aditya Singh wrote: > we plan to migrate from the int4 ID column to an int8 ID column. > > The plan involves renaming the int8 column to the id column and setting it as > the primary key. However, this process will require downtime, which may be > substantial in a pro