Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iptOL-0004ee-TL for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2020 12:27:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iptOJ-0001hb-PB for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2020 12:27:51 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iptLH-0006TE-5J for pgsql-hackers@lists.postgresql.org; Fri, 10 Jan 2020 12:24:43 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1iptLE-0005JY-A0 for pgsql-hackers@postgresql.org; Fri, 10 Jan 2020 12:24:42 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 946F121C3D06; Fri, 10 Jan 2020 15:24:38 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.27.200] (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 4FF7021C3CF7; Fri, 10 Jan 2020 15:24:38 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1578659078; bh=dFvTDElfpOePAItRjfSbmHJI74sm7OfzaH6J11LHWdE=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=WEqhc684wsFKpTF1M8wGVPLHIzgCsZ/iVU8abGCOceQd0UxQfzZ2jA14HfSurjJ/m f86nnB9M5yIWZKFIL4XfRKfwxxWW5+xHi2xh9LNQq6MTgbvCcRSXnZeVxuj0SToVGB 8HHtrq2uRSDy1OkyxZ/y+YBUxsaK7Z19bymPoYOA= Subject: Re: [Proposal] Global temporary tables To: Tomas Vondra Cc: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= , Pavel Stehule , Robert Haas , PostgreSQL Hackers , =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= , "Cai, Le" , =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= References: <24099f4e-742c-e92b-729c-77bac1ca80d4@postgrespro.ru> <80cf30c2-ebd5-a568-9f62-a970e4d91326@postgrespro.ru> <5767433E-1A77-4682-B3FD-4869911021C8@alibaba-inc.com> <6b7570aa-14ea-2f28-c3b5-74dd785bbafe@postgrespro.ru> <20200105200603.wrb4beacwb57hhpk@development> <33969545-BEF7-4518-A741-302CBF7FF269@alibaba-inc.com> <20200106110119.zfrg2m5e2q5mvi5v@development> <3f360d7b-a46a-79f6-27b6-1b1df8c3ee82@postgrespro.ru> <20200109163037.u76k3kdr3pcmrytb@development> From: Konstantin Knizhnik Message-ID: Date: Fri, 10 Jan 2020 15:24:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20200109163037.u76k3kdr3pcmrytb@development> Content-Type: multipart/alternative; boundary="------------D66F616015E3019B1CDB98DB" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------D66F616015E3019B1CDB98DB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 09.01.2020 19:30, Tomas Vondra wrote: > >> >>> >>>> 3 Still no one commented on GTT's transaction information >>>> processing, they include >>>> 3.1 Should gtt's frozenxid need to be care? >>>> 3.2 gtt’s clog clean >>>> 3.3 How to deal with "too old" gtt data >>>> >>> >>> No idea what to do about this. >>> >> >> I wonder what is the specific of GTT here? >> The same problem takes place for normal (local) temp tables, doesn't it? >> > > Not sure. TBH I'm not sure I understand what the issue actually is. Just open session, create temporary table and insert some data in it. Then in other session run 2^31 transactions (at my desktop it takes about 2 hours). As far as temp tables are not proceeded by vacuum, database is stalled:  ERROR:  database is not accepting commands to avoid wraparound data loss in database "postgres" It seems to be quite dubious behavior and it is strange to me that nobody complains about it. We discuss  many issues related with temp tables (statistic, parallel queries,...) which seems to be less critical. But this problem is not specific to GTT - it can be reproduced with normal (local) temp tables. This is why I wonder why do we need to solve it in GTT patch. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------D66F616015E3019B1CDB98DB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 09.01.2020 19:30, Tomas Vondra wrote:





3 Still no one commented on GTT's transaction information processing, they include
3.1 Should gtt's frozenxid need to be care?
3.2 gtt’s clog clean
3.3 How to deal with "too old" gtt data


No idea what to do about this.


I wonder what is the specific of GTT here?
The same problem takes place for normal (local) temp tables, doesn't it?


Not sure. TBH I'm not sure I understand what the issue actually is.

Just open session, create temporary table and insert some data in it.
Then in other session run 2^31 transactions (at my desktop it takes about 2 hours).
As far as temp tables are not proceeded by vacuum, database is stalled:

 ERROR:  database is not accepting commands to avoid wraparound data loss in database "postgres"

It seems to be quite dubious behavior and it is strange to me that nobody complains about it.
We discuss  many issues related with temp tables (statistic, parallel queries,...) which seems to be less critical.

But this problem is not specific to GTT - it can be reproduced with normal (local) temp tables.
This is why I wonder why do we need to solve it in GTT patch.

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 
--------------D66F616015E3019B1CDB98DB--