public inbox for [email protected]  
help / color / mirror / Atom feed
From: =?UTF-8?B?5pu+5paH5peMKOS5ieS7jik=?= <[email protected]>
To: Pavel Stehule <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Konstantin Knizhnik <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: =?UTF-8?B?6JSh5p2+6ZyyKOWtkOWYiSk=?= <[email protected]>
Cc: =?UTF-8?B?Q2FpLCBMZQ==?= <[email protected]>
Cc: =?UTF-8?B?6JCn5bCR6IGqKOmTgeW6tSk=?= <[email protected]>
Subject: Re: [Proposal] Global temporary tables
Date: Sun, 16 Feb 2020 23:16:19 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFj8pRCz52CbxnNmO=NK7cBA=9o=rdWVEBJRKOeVJ1FwzqzLRw@mail.gmail.com>
References: <[email protected]>
	<CAFj8pRBo8YZ=bJESqf2fkxGL8Bq2Fs7=SjxisS7UhXHh6yPSfA@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<20200105200603.wrb4beacwb57hhpk@development>
	<[email protected]>
	<[email protected]>
	<20200109164829.mdl3z5xalmaqxs67@development>
	<[email protected]>
	<20200112015109.caab6qdr2ob6d5jv@development>
	<CA+TgmobRhPA1gVbMsj9YLA-sv0Ub8NpMrkWCKwRiD=bnjVND3Q@mail.gmail.com>
	<[email protected]>
	<CAFj8pRCnHvditiNKtGAByfzLjayOg0AZT-KXFvELvtfGJLRL8w@mail.gmail.com>
	<[email protected]>
	<CA+TgmobtnmTguphZ_7536yhzENzCSDPEkJnha-29a4Q7hAwEWg@mail.gmail.com>
	<[email protected]>
	<CAFj8pRBSFwhj+iccFF50WdrruAXbMsvqTMTfCVu9x2LPcvnd2w@mail.gmail.com>
	<CAFj8pRBNssuJoYH6d51-yqOfV2_nB+aK-Mj7maLPQH+O8cm-TA@mail.gmail.com>
	<[email protected]>
	<CAFj8pRCz52CbxnNmO=NK7cBA=9o=rdWVEBJRKOeVJ1FwzqzLRw@mail.gmail.com>



> 2020年2月15日 下午6:06,Pavel Stehule <[email protected]> 写道:
> 
> 
>> postgres=# insert into foo select generate_series(1,10000);
>> INSERT 0 10000
>> postgres=# \dt+ foo
>>                           List of relations
>> ┌────────┬──────┬───────┬───────┬─────────────┬────────┬─────────────┐
>> │ Schema │ Name │ Type  │ Owner │ Persistence │  Size  │ Description │
>> ╞════════╪══════╪═══════╪═══════╪═════════════╪════════╪═════════════╡
>> │ public │ foo  │ table │ pavel │ session     │ 384 kB │             │
>> └────────┴──────┴───────┴───────┴─────────────┴────────┴─────────────┘
>> (1 row)
>> 
>> postgres=# truncate foo;
>> TRUNCATE TABLE
>> postgres=# \dt+ foo
>>                           List of relations
>> ┌────────┬──────┬───────┬───────┬─────────────┬───────┬─────────────┐
>> │ Schema │ Name │ Type  │ Owner │ Persistence │ Size  │ Description │
>> ╞════════╪══════╪═══════╪═══════╪═════════════╪═══════╪═════════════╡
>> │ public │ foo  │ table │ pavel │ session     │ 16 kB │             │
>> └────────┴──────┴───────┴───────┴─────────────┴───────┴─────────────┘
>> (1 row)
>> 
>> I expect zero size after truncate.
> Thanks for review.
> 
> I can explain, I don't think it's a bug.
> The current implementation of the truncated GTT retains two blocks of FSM pages.
> The same is true for truncating regular tables in subtransactions.
> This is an implementation that truncates the table without changing the relfilenode of the table.
> 
> 
> This is not extra important feature - now this is little bit a surprise, because I was not under transaction.
> 
> Changing relfilenode, I think, is necessary, minimally for future VACUUM FULL support.
Not allowing relfilenode changes is the current limit.
I think can improve on it. But ,This is a bit complicated.
so I'd like to know the necessity of this improvement.
Could you give me more details?

> 
> Regards
> 
> Pavel Stehule
>  
> 
> Wenjing
> 
>> 
>> Regards
>> 
>> Pavel
>> 
>> 
>> 
>> Wenjing
>> 
>> 
>> 
>> 
>> > 
>> > -- 
>> > Robert Haas
>> > EnterpriseDB: http://www.enterprisedb.com <http://www.enterprisedb.com/;
>> > The Enterprise PostgreSQL Company
>> 
> 



view thread (492+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [Proposal] Global temporary tables
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox