Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLsRS-00075s-4P for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Dec 2017 15:13:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLsRR-0002z8-IH for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Dec 2017 15:13:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eLsRR-0002yu-7g for pgsql-bugs@lists.postgresql.org; Mon, 04 Dec 2017 15:13:57 +0000 Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eLsRN-0005rJ-OF for pgsql-bugs@postgresql.org; Mon, 04 Dec 2017 15:13:56 +0000 Received: by mail-wr0-x234.google.com with SMTP id h1so17647315wre.12 for ; Mon, 04 Dec 2017 07:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cZomMgB9vdtExmJ7L3PhORBxZJythJsRsPNYVJvpv1A=; b=oDlDfKS4rrp5NQIoiqTpjHBdusCoGamKrBAXtdrGq1eHFPX5f2EcvhQowFK0I1TiNR Jzma5AOp3ay7R2SKE6i8w2SrchZ1quAHpmB9K+6o33G6gq5EsY1TWu+UZKLDqS8twNhp /T/J+O0y5Jk7DyWhTdNEM0W2iba28ZzS5hcVyPbyb5OpvCXpyWqITH/ZB+gl3zIUOtnR pb+zb4m8lxWSOMAC2PT15rQgnnO/RFzYTp/PsX3qq1YT+SNdFHfz+xxHT/qV6UgmGIwk xdAjbYvWVbCGR9AfJKDABoB/WT5j1Yc8l+9g9ElZEzacZ1kWFCmwIK2SfAt5CksZ5XQd LxQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cZomMgB9vdtExmJ7L3PhORBxZJythJsRsPNYVJvpv1A=; b=l5HvoGumVVn28OeA8Xh5LrKko0wjXMhKVWFC5wuS2Xcj8YlW05MW0aYLqjZPxUXjHM pcl0L9IiJnwo1HA+iVvh7Jb8hrmtGKGYXie4ozqxQkV6K4uCjfaLkIKlW6j0P4PtLVSZ rxOfD4BL0nP8UMPmpfV/55kRjRd7W7RbWSFcTmz7ujPEQWvu8ZseqVW23ecF5unO7zYK aczQT+BdedpYJNkIZlnlUau1mWOwQLGTU+DsFtZTOnIxvSzdBc7ZKUNqFi8OxpEX6vOZ Omu5cHZQ1iq5dDI6yB2nAM14F8eF5jKM21Xvp9tP+m5taNwTzLMTv9ixnxS88/yG0giS qnXg== X-Gm-Message-State: AJaThX4f7JiK6s7geW+uDcP23t9nYI4ZMu4HDDx+MRjBDDDTSiya5x8y x6rSKuTvE/dqB504snOAhPJI4386NIRotk9gCwo4nh04nTjDpRkHf1NcASJGpWi771tr0rC1NYe K0zeYBWm6pti14f9coKJM/NvKbQSHg8C5DWcVgZdaNxABWyzt+PlqDD5UXJJf9DX4yumf8HEPaN DZUKYo X-Google-Smtp-Source: AGs4zMZyr4a8S35yyzS0V0Vew9nLUprJTm4Q43x/7umEtZDA062+mtr/GoHgQZWLHxZXlu/VHb6glQ== X-Received: by 10.223.158.203 with SMTP id b11mr12802267wrf.256.1512400431007; Mon, 04 Dec 2017 07:13:51 -0800 (PST) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id o63sm7984290wmb.4.2017.12.04.07.13.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 07:13:50 -0800 (PST) Subject: Re: BUG #14940: Duplicated records inspite of primary key and unique constraint To: =?UTF-8?B?0KHQtdGA0LPQtdC5INCQLiDQpNGA0L7Qu9C+0LI=?= , Alvaro Herrera Cc: pgsql-bugs@postgresql.org References: <20171201171513.if4pd67kh5sl7u53@alvherre.pgsql> <023c1715-3a10-1a4d-6efd-ccb8823fdfb8@smetarik.ru> <2e9f0483-f084-53e9-e80b-bf112f9a6053@2ndquadrant.com> From: Tomas Vondra Message-ID: <4dc917b7-6edb-01d5-1c91-27ad7e9f12da@2ndquadrant.com> Date: Mon, 4 Dec 2017 16:13:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/04/2017 04:01 PM, Сергей А. Фролов wrote: > page inspection is > > SELECT * FROM page_header(get_raw_page('nb.nb_basedtl', 0)); > SELECT * FROM heap_page_items(get_raw_page('nb.nb_basedtl', 0)); > >  lsn | checksum | flags | lower | upper | special | pagesize | version | > prune_xid > -----+----------+-------+-------+-------+---------+----------+---------+----------- > >  0/0 |        0 |     0 |   320 |   416 |    8192 |     8192 | 4 > |         0 > (1 строка) > >  lp | lp_off | lp_flags | lp_len | t_xmin | t_xmax | t_field3 | t_ctid | > t_infomask2 | t_infomask | t_hoff | t_bits              | t_oid | t_data > ----+--------+----------+--------+--------+--------+----------+--------+-------------+------------+--------+----------------------------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------ > >   1 |   8080 |        1 |    108 | 364507 |      0 |        0 | (0,1)  > |          27 |       2817 |     32 | 11111110011100111100000010000000 > |       | > Thanks. Unfortunately that does not explain anything, and makes it ever stranger - none of the items on the page is HOT-updated (t_infomask2 is 27, so it only contains number of attributes) or even deleted. And the only xmin value on the page is 364507. So where did the other values (370881, 370882) come from? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services