Re: [HACKERS] Re: [HACKERS] GSoC 2015 proposal: Improve the performance of “ALTER TABLE .. SET LOGGED / UNLOGGED” statement

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Subject: Re: [HACKERS] Re: [HACKERS] GSoC 2015 proposal: Improve the performance of “ALTER TABLE .. SET LOGGED / UNLOGGED” statement
Date: 2015-07-09 13:39:35
Message-ID: CAFcNs+o7X01y6QT8cQrtog1xru3df93wdVqOzAOSCGOQF4sGkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 8, 2015 at 11:37 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> On 2015-07-08 10:58:51 -0300, Fabrízio de Royes Mello wrote:
> > Think in an ETL job that can be use an unlogged table to improve the
load
> > performance, but this job create a "large table" and to guarantee the
data
> > consistency you need to transform it into a regular table, and with the
> > current implementation rewrite the entire heap, toast and indexes.
>
> Don't buy that. The final target relation will usually already have
> content. Also everything but wal_level=minimal will force you to WAL log
> the contents anyway.

If the "wal_level=minimal" we don't need to force the wal log of the
contents. If the "wal_level != minimal" we need just to xlog all the pages,
but in both cases we don't need the extra job to create a new datafiles and
copy the contents between them. So we'll improve performance, or am I
missing something?

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2015-07-09 13:40:19 Re: Cube extension kNN support
Previous Message Alexander Korotkov 2015-07-09 13:33:41 Re: Fillfactor for GIN indexes