Re: TRUNCATE memory leak with temporary tables? - Mailing list pgsql-general

From Ravi Krishna
Subject Re: TRUNCATE memory leak with temporary tables?
Date
Msg-id afc4c02a-9b1c-4294-b9ab-a6bdc85b6af1@me.com
Whole thread Raw
In response to Re: TRUNCATE memory leak with temporary tables?  (Ahmet Demir <dbademir@gmail.com>)
List pgsql-general
I am not sure about that
"It creates a new empty table , followed by rename of the existing table to the new empty table and finally dropping of the old table."

You mean table is re-created with new oid?

I don't think oid changes, but the file relnode on the disk changes. So let me rephrase it

truncate does the following:

1 - create a new empty file on the disk.
2 - at commit time, map the table oid to the new empty file.
3 - drop the old file.

pgsql-general by date:

Previous
From: Ahmet Demir
Date:
Subject: Re: TRUNCATE memory leak with temporary tables?
Next
From: Michael van der Kolff
Date:
Subject: Re: Modelling versioning in Postgres