Re: WAL logging of SELECT ... INTO command

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: WAL logging of SELECT ... INTO command
Date: 2006-03-22 13:19:10
Message-ID: 20060322131910.GC15742@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches pgsql-performance

On Wed, Mar 22, 2006 at 01:08:34PM +0000, Simon Riggs wrote:
> On Wed, 2006-03-22 at 06:47 -0600, Jim C. Nasby wrote:
>
> > Also, why do we log rows for CTAS/SELECT INTO when PITR is in use for
> > simple SELECTs (ones that don't call non-deterministic functions)? The
> > data should alread be available AFAICS...
>
> Not sure what you're asking... SELECTs don't produce WAL.

Yes, there'd have to be some special kind of WAL entry that specifies
what select statement was used in CTAS.

> PITR wants all changes. Without PITR we can optimise certain logging
> actions.

The only change here is that we're creating a new table based on the
results of a SELECT. If that SELECT doesn't use anything that's
non-deterministic, then the machine doing the recovery should already
have all the data it needs, provided that we log the SELECT that was
used in the CTAS.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-03-22 15:06:05 Re: WAL logging of SELECT ... INTO command
Previous Message Simon Riggs 2006-03-22 13:08:34 Re: WAL logging of SELECT ... INTO command

Browse pgsql-performance by date

  From Date Subject
Next Message Spiegelberg, Greg 2006-03-22 13:56:04 Intel C/C++ Compiler Tests
Previous Message Mikael Carneholm 2006-03-22 13:12:43 Re: Migration study, step 1: bulk write performanceoptimization