Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8IVF-0006h1-5W for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Apr 2018 04:46:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f8IVD-0005Js-QH for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Apr 2018 04:45:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8IVB-0005Jd-Ve for pgsql-bugs@lists.postgresql.org; Tue, 17 Apr 2018 04:45:59 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8IV3-0006je-Uc for pgsql-bugs@lists.postgresql.org; Tue, 17 Apr 2018 04:45:56 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C42D721803; Tue, 17 Apr 2018 00:45:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 17 Apr 2018 00:45:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=fC/2X4Noqa0ya6VSt52IaHjFZFRP8+j2RkZHy14Sg/E=; b=zEsLDISv k2iyL/D4GqW5TRyejLyTxLKzyq80qU6zep3tkvxA4jMXKuHYWwIKhNStC0nBnjsk PZrU8qCyStR2HJ1jIpFCJJk70Dl5sUeKGxTCni3Mj7rs54urgnNE6U5SQM9AQz0P 2ihy2iEnt25RulqsqdMnjLBp+XYgPTBH83prTgZsyzv6CnMnFQYnQJVLqN43SiXP 9HEG/PiYSUrxSRW75nPhhn+p8+iHQsoJsiK4224+9cLIrWBASQtXQI0AhzSalB3/ Ky7sIPwfPK1fpc5ottpj+hXxYz08gx0I/VgHmz4WjeGerc0+89mmQgAggTSGAkln zQf4yYdBTqVMqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=fC/2X4Noqa0ya6VSt52IaHjFZFRP8 +j2RkZHy14Sg/E=; b=YobX35GyqtQ8cYBL2VW0Pp5+8VK6EObnlAf8Vb7ZNoY1U RAwGvy5ffA7nzIUq1E7hyVwfyUyS0YPbHn8Y3yM0+pRxGhyiDUKbOa3qo5BAys37 PkGoNWes7tXdXCPEtnIc3QUb3sjOPN4CUp1GrWLLD+GNTOCx4/5yNnDg5ihEI0Vo 9CMAQf/Qd7vhzJjKlNhXkgVsDGzgWFinsMeZvi4cD7xnKAChZFqKBTQ6ZjNoxl6F e0+T91W0Afr/mWArjZOaJCCM94forfZResCRcwzsvSVSw/byUuFBKWC4YggW60is +iOtlIgZ5mWHrDvnI6FQzKk+DiJQJWVsAbf39RjgA== X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 59115102E4; Tue, 17 Apr 2018 00:45:47 -0400 (EDT) Date: Tue, 17 Apr 2018 13:45:44 +0900 From: Michael Paquier To: sandhya.k_s@nokia.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15159: Duplicate records for same primary key Message-ID: <20180417044544.GE4998@paquier.xyz> References: <152393987113.19372.6629000851922993437@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="so9zsI5B81VjUb/o" Content-Disposition: inline In-Reply-To: <152393987113.19372.6629000851922993437@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --so9zsI5B81VjUb/o Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 17, 2018 at 04:37:51AM +0000, PG Bug reporting form wrote: > 1. Primary key is created to have unique records, then how two records are > being created/inserted? > 2. After delete of malicious record, how other record is showing up to be > having duplicate records? Am I missing anything to be checked ? The bug nick-named around as freeze-the-dead. 9.3.21 has fixed an issue where tuples not normally visible, or marked as dead could come back to life and become visible. That's this entry in the release notes: "Fix vacuuming of tuples that were updated while key-share locked (Andres Freund, =C1lvaro Herrera) In some cases VACUUM would fail to remove such tuples even though they are now dead, leading to assorted data corruption scenarios." And here are the corresponding release notes: https://www.postgresql.org/docs/devel/static/release-9-3-21.html So you first need to update this version of PostgreSQL, and then some manual cleanup of those duplicated tuples is needed with for example a tid mathing. -- Michael --so9zsI5B81VjUb/o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlrVe/gACgkQnvQgOdby QH3Y9xAAndnhGGc9CdOTddgzU32EBIi2MzFcFNncTR6h19btCETfC/uG8M+bvRuq Z0VqqHGGNfd1QW/JbwEaj3TjOnfzbIME4poUoq61WYYBKbzbbS8M6RCuMWiqRFe+ QLTEmY3NNWTTsgAj7b5Q2B5zZZOUn5axRsC9d8vbpy4KR+xKXfIWH8m7NowM2ql6 cg9Xeof3+hpAPZ0+mhRk3ArME3cFFgvSog/LYZxZlbFiFRs2L6I2HfNVGjq9yTp7 4XfhXkUxJ8vbuK08DGCVqF1fDbhG6vFXPirtKk8uNmsokEGy2D/akt6ynimVxyKo k7YhQrJqHRXAlXowdIBr72fv7eEZM07Up2WZZDrYTbiQISiHxhgRlAvEFn7dEDlk jY7xNXgW6mVxwrZnwMxfB8XXN8LP2YR49ArO2g9glOCqtGRszHWnWZw7/Vks6Ype k/AdoIFr38murwGttaKY27woS5oWkASS2qZr8ETmA3IKYZ2NyNXx5LJ9sfM6VTvq dBrU0QxIn2P0GL8+82poLnONpcrWNS/5rjYqjcm5BigDrzLHvhEOL5yuX3iOISAA HMLOizy4jkz57RTf3luz5MOBl47VVNJs5uqcwKw33K5SNHQm0+ZK3PmZqn++/2+S s2AenZOmQHDeLoEOqCc5j55J5mTjathnGbEHoUpycCWJ+eMousM= =or9+ -----END PGP SIGNATURE----- --so9zsI5B81VjUb/o--