Re: WAL logging of SELECT ... INTO command

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: WAL logging of SELECT ... INTO command
Date: 2006-03-21 20:33:50
Message-ID: 1142973230.24487.501.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches pgsql-performance

On Tue, 2006-03-21 at 06:22 -0600, Jim C. Nasby wrote:
> Currently, it appears that SELECT * INTO new_table FROM old_table logs
> each page as it's written to WAL. Is this actually needed? Couldn't the
> database simply log that the SELECT ... INTO statement was executed
> instead? Doing so would likely result in a large performance improvement
> in most installs. Is there no provision for writing anything but data
> page changes (or whole pages) to WAL?

AFAIK it takes the same code path as CREATE TABLE AS SELECT, which
already does exactly what you suggest (except when using PITR).

Best Regards, Simon Riggs

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2006-03-21 22:18:40 Re: Automatically setting work_mem
Previous Message Simon Riggs 2006-03-21 20:05:50 Re: Automatically setting work_mem

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Riggs 2006-03-21 20:44:50 Re: Migration study, step 1: bulk write performance
Previous Message Vivek Khera 2006-03-21 20:32:01 Re: Best OS & Configuration for Dual Xeon w/4GB & Adaptec