Re: Duplicate Key Values

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: mark bradley <markbradyju(at)outlook(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Duplicate Key Values
Date: 2025-03-11 15:12:40
Message-ID: c6ca9286-a0ea-48bb-adb0-2d4e1835ebee@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/11/25 08:05, mark bradley wrote:
> The rows that were preserved in the nodes table were the ones that were
> not dups originally.

1) To be specific:

a) If there where two or more rows with a node_id, after the reindexing
was there only one left?

b) Or for any node_ids that where duplicated did reindexing eliminate
all rows with that node_id.

2) Per post from Greg Sabino Mullane, you need to show us the steps you
took to reindex the table.

>
>
> Best regards,
> Mark Brady
> _amazon.com/author/markjbrady <https://amazon.com/author/markjbrady>_
> ------------------------------------------------------------------------
> *From:* Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
> *Sent:* Tuesday, March 11, 2025 10:56 AM
> *To:* mark bradley <markbradyju(at)outlook(dot)com>
> *Cc:* pgsql-general <pgsql-general(at)postgresql(dot)org>
> *Subject:* Re: Duplicate Key Values
> On 3/11/25 07:28, mark bradley wrote:
>> An "interesting" effect of reindexing is that all the records that were
>> dups in the nodes table were deleted, both copies.
>
> I am trying to understand above.
>
> Was there at least one row of each node_id left?
>
>>
>> Also, all rows having node_id as a foreign key in other tables were
>> deleted, which means all rows in these tables were deleted.
>>
>> Fortunately these are not huge tables.  I will reenter the data, make a
>> backup, and then try your further extended suggestions.
>>
>> Best regards,
>> Mark Brady
>> _amazon.com/author/markjbrady <https://amazon.com/author/markjbrady
> <https://amazon.com/author/markjbrady>>_
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mark bradley 2025-03-11 15:16:52 Re: Duplicate Key Values
Previous Message mark bradley 2025-03-11 15:05:12 Re: Duplicate Key Values