Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ts1Hk-00DImf-9o for pgsql-general@arkaria.postgresql.org; Tue, 11 Mar 2025 15:12:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ts1Hj-000YkV-2z for pgsql-general@arkaria.postgresql.org; Tue, 11 Mar 2025 15:12:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ts1Hi-000YkI-LI for pgsql-general@lists.postgresql.org; Tue, 11 Mar 2025 15:12:46 +0000 Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ts1He-002G4N-1X for pgsql-general@postgresql.org; Tue, 11 Mar 2025 15:12:46 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id A29B9114015A; Tue, 11 Mar 2025 11:12:41 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Tue, 11 Mar 2025 11:12:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1741705961; x=1741792361; bh=irSwEJ10+FDXQpV1XGbQtjcaXSPfo0nYGiqB9nLGe3w=; b= Z1uSZvNWisP4E/i4ZbjxxCStIXb7JjVOf6RNEE/aSVCFFzuo15kVHlbXCvimIedk AzSmI3xvulCg9VZ/4e5pFRTtl6M62BFk+JPNRLz9MHTSDfMQ+zQJOy+gEGxuxWqr WE7735Jkf/gvHl4rAWrfSEGJPp5OetwXH8+4USJOZjXwRweblTh+/XTpoSmDCvnq AmqHsJM44IhRIE4HGbcaGdi6W+iewV+8nUJyMQf2T1omuk0IzqjZLz43ln3nKSYh 8Ea+Dyz45mBWnyPFcSi9yIDFkcZhCaH23slPwVGUihx0OM1eQUgatKsk839LtIfj bcM0ncrZ33GtE/Q5qXys5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1741705961; x= 1741792361; bh=irSwEJ10+FDXQpV1XGbQtjcaXSPfo0nYGiqB9nLGe3w=; b=T NouHSekQfKi9VsycM5XT9tj+m18SO+pFvv51y2vDXF5Sn4tPsaYlTkmCKzFQNPll uo+GDDDENjRcytboFMjPMas95Y3OosEruR6OE0AATmPB1g/2PWMjncFLvjQR+up2 rJZb1qGPJQljfOnJ9hzfH01Q9alu6RC39yF4Bm+a0VtAAjkMpEcSa24X8sPl2J4b 8uFzOHbRSUV5ks6V2otER9fbvDjQ2ZqbUFysu1Kc7ateyAEpaFOJisdJwpNCWcPi i0tQwnojZleGPSPBo/04GZKQomTpgMfzieIFE8fDglgtRLiMN87cMLq47Xqv4Vd/ HTJaE+B17Zd50HDJVeGDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvddvheeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff ggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghnucfmlhgr vhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtf frrghtthgvrhhnpedvhfffhffffeehueetfefgiedujeevjeffgfetfeehfeetgeegleek veevffffkeenucffohhmrghinheppggrmhgriihonhdrtghomhdprghmrgiiohhnrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggu rhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvd dpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhgrrhhksghrrgguhihjuhesohhu thhlohhokhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsth hgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Mar 2025 11:12:40 -0400 (EDT) Message-ID: Date: Tue, 11 Mar 2025 08:12:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Duplicate Key Values To: mark bradley Cc: pgsql-general References: <6aee94f9-d421-4622-bccc-bdac37969be0@aklaver.com> <75b33741-ee99-4524-b63a-edad21c1266d@aklaver.com> <9d919848-3fe1-46fd-b343-c5f2931864f7@aklaver.com> <513ddbee-135c-4af2-b6f6-acca667b8d09@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 _ > ------------------------------------------------------------------------ > *From:* Adrian Klaver > *Sent:* Tuesday, March 11, 2025 10:56 AM > *To:* mark bradley > *Cc:* pgsql-general > *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 >_ > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com