Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQWHP-0005A0-0c for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2020 13:16:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jQWHN-0005T5-P2 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Apr 2020 13:16:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQWHN-0005Sw-CX for pgsql-hackers@lists.postgresql.org; Mon, 20 Apr 2020 13:16:05 +0000 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jQWHE-0005VW-Nf for pgsql-hackers@postgresql.org; Mon, 20 Apr 2020 13:16:04 +0000 Received: by mail-qv1-xf44.google.com with SMTP id q2so1609878qvd.1 for ; Mon, 20 Apr 2020 06:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=4n2Lqwr8Id0rAyr0DKYOzAQZ34db5x9OmwyPT6oS/XA=; b=aa9KjRlwcQ+0mtKPNtSmeUkNdiQYWFzlzAIaAUoZkHBBApm390ANHXwZ85iOpzbczM zj+2kqWxOyZ0goR12H0dHf0G7Ho7baV+o/q1JM6Ro4Kuf3pqEI9NMo0FAnHtBYZM/uJx Sv6e4SJUIh3XcbvFTrpnhpr1uoXZNILyVyC8sb78IQvC4DqC6CRxnzzGpNe6ciHBSE1U IvD5P2WUIFSWamln3wbgq+xfDNGA7vBPEYBOcRnpJxjYqBP9WgayPBA1rVEhSFptSBse Ho1F2cwJUm5w+KlPJQKtLNV6TKlm1AMre5IaLKsECrWN/oscFy91C5C1hgc73ZrM81Yd yJAA== 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-transfer-encoding :content-language; bh=4n2Lqwr8Id0rAyr0DKYOzAQZ34db5x9OmwyPT6oS/XA=; b=avUOSs38Gm527jU6uksj9VpDgpaOdyetIz3HlB3T3ZAiDyOlPtqG+JixAZUQhrh4mx LtvML3J1cnKl+Zry5TZPqfnUbcWtnLu0hIz6WM42NEdlqY5VoUycofUgi23Ye++i+9Vm gYFvWJx4mAMKf6AicZmXNGzZU+YRYw8NAZVOmN62dJRpAoQ1WjfsDJazBxmsa7s/N3Tu jV/h//FD+aM6KGiE2vdGuOnmPXuSUJ3xXGQxSUTFlnbgVx1OrX14qcXTRdatC7MYKi6g eR0eIHZ4c1ZXBabl4zPp9u+8GXFpvTat7531R1nU9PnVEnvv+zS9Ktz+PVcTgquO4Vle u5yQ== X-Gm-Message-State: AGi0PuYZKIr5wLDA0PL0kSF3hDGNwSF6TdLPlxtOkievtkvfVjaOHiqj eHMlGSne8lKDskRkvrxjjPd1fktaMAn3AB3E8IzGcnK0N1brLl0eRYtBfQSz6jntnWcRzH4wGhQ 4TNUY6h44YYL1UphCtDigyuG/pnar2nQpgSY5nt3SFY/yLYlXZwbEoT7okowtwD+cgJw+hUEsvb T/AP+DgkXq4ylbyIgB3WakKjPYutO6AHjVHLej X-Google-Smtp-Source: APiQypLAkgbY6F58/24p4+bqlQQ1uImlHPYxn6f9qXulhV7FfYbhAL5KCRw33SBMpS2yPpFvmfXMTA== X-Received: by 2002:ad4:4e64:: with SMTP id ec4mr13392857qvb.137.1587388554442; Mon, 20 Apr 2020 06:15:54 -0700 (PDT) Received: from localhost.localdomain ([45.113.251.168]) by smtp.gmail.com with ESMTPSA id w94sm461408qte.21.2020.04.20.06.15.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 06:15:53 -0700 (PDT) Subject: Re: [Proposal] Global temporary tables To: =?UTF-8?B?5pu+5paH5peM?= , Prabhat Sahu Cc: Pavel Stehule , Robert Haas , Tomas Vondra , Konstantin Knizhnik , PostgreSQL Hackers , =?UTF-8?B?6JSh5p2+6Zyy?= =?UTF-8?B?KOWtkOWYiSk=?= , "Cai, Le" , =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= References: <24099f4e-742c-e92b-729c-77bac1ca80d4@postgrespro.ru> <8517A6EA-17A6-4160-8987-B01073A0ECAF@alibaba-inc.com> <8BC7841E-3B32-4518-9586-D9ED571F4922@alibaba-inc.com> <80DC3BA7-E5C0-43CA-A66C-2CCB45C10EA7@alibaba-inc.com> <953705a7-52df-4b7e-a7b5-675a6303a262@enterprisedb.com> <88124F96-7519-4CD4-9011-3CDAADEB7FFA@alibaba-inc.com> From: tushar Message-ID: Date: Mon, 20 Apr 2020 18:45:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <88124F96-7519-4CD4-9011-3CDAADEB7FFA@alibaba-inc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 4/20/20 2:59 PM, 曾文旌 wrote: > Please check my new patch. Thanks Wenjing. Please refer this below scenario , getting error -  ERROR:  could not read block 0 in file "base/16466/t4_16472": read only 0 of 8192 bytes Steps to reproduce Connect to psql terminal,create a table ( create global temp table t2 (n int primary key ) on commit delete rows;) exit from psql terminal and execute (./clusterdb -t t2 -d postgres -v) connect to psql terminal and one by one execute these below sql statements ( cluster verbose t2 using t2_pkey; cluster verbose t2 ; alter table t2 add column i int; cluster verbose t2 ; cluster verbose t2 using t2_pkey; create unique index ind on t2(n); create unique index concurrently  ind1 on t2(n); select * from t2; ) This last SQL - will throw this error -  - ERROR:  could not read block 0 in file "base/16466/t4_16472": read only 0 of 8192 bytes -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company