pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Jim C. Nasby <jnasby@pervasive.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: WAL logging of SELECT ... INTO command
Date: Tue, 21 Mar 2006 20:33:50 +0000
Message-ID: <1142973230.24487.501.camel@localhost.localdomain> (raw)
In-Reply-To: <20060321122211.GU15742@pervasive.com>
References: <20060321122211.GU15742@pervasive.com>

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




view thread (21+ messages)  latest in thread

Message-ID: <1142973230.24487.501.camel@localhost.localdomain>
Permalink:  ../1142973230.24487.501.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1142973230.24487.501.camel@localhost.localdomain

 · 

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: pgsql-performance@postgresql.org
  Cc: simon@2ndquadrant.com, jnasby@pervasive.com
  Subject: Re: WAL logging of SELECT ... INTO command
  In-Reply-To: <1142973230.24487.501.camel@localhost.localdomain>

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

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