Re: temporary tables are logged somehow?

From: Andrey Lizenko <lizenko79(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: temporary tables are logged somehow?
Date: 2015-01-22 16:45:45
Message-ID: CADKuZZB=9M0gEUo9G4o-4tr2FMsxo-+GQDUw1TGNxzEa=pei3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It means, that 8192 commits + 8192 "create temp table" (and drop it after
closing connection) costs me 48 MB of WAL files.
And there is no way to reduce disk space usage, right?
Does amount of data which has to be written to WAL-file depend on size of
transaction?

On 22 January 2015 at 18:44, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> > On Thu, Jan 22, 2015 at 11:06 PM, Andrey Lizenko <lizenko79(at)gmail(dot)com>
> wrote:
> >> 3. They are not WAL-logged.
> >> Whats wrong with it in my case?
>
> > Nothing. Temporary tables are not WAL-logged, but transaction commit is.
>
> Right. I think there is some optimization for transactions that only
> wrote temp-table data, but it could at most be skipping fsync of the
> transaction commit record, not omitting generating it entirely.
>
> Also, changes to the system catalogs are always WAL-logged; so creation
> and deletion of a temp table cause some amount of WAL output, even if
> manipulation of the table's contents does not.
>
> regards, tom lane
>

--
Regards, Andrey Lizenko

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-01-22 17:21:06 Re: Problem with unixODBC and PostgreSQL
Previous Message Julie Reier 2015-01-22 16:35:02 Problem with unixODBC and PostgreSQL