pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: WAL logging of SELECT ... INTO command
Date: Wed, 22 Mar 2006 09:14:34 -0600
Message-ID: <20060322151434.GG15742@pervasive.com> (raw)
In-Reply-To: <16480.1143039965@sss.pgh.pa.us>
References: <20060321122211.GU15742@pervasive.com>
	<1142973230.24487.501.camel@localhost.localdomain>
	<20060322124732.GA15742@pervasive.com>
	<1143032914.24487.632.camel@localhost.localdomain>
	<20060322131910.GC15742@pervasive.com>
	<16480.1143039965@sss.pgh.pa.us>

On Wed, Mar 22, 2006 at 10:06:05AM -0500, Tom Lane wrote:
> "Jim C. Nasby" <jnasby@pervasive.com> writes:
> >> PITR wants all changes. Without PITR we can optimize 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.
> 
> This is based on a fundamental misconception about the way PITR
> log-shipping works.  We log actions at the physical level (put this
> tuple here), not the logical here's-the-statement-we-executed level.
> The two approaches cannot mix, because as soon as there's any physical
> discrepancy at all, physical-level actions would be incorrectly applied
> to the slave database.

Oh, so in other words, SELECT * INTO temp FROM table is inherently
non-deterministic at the physical level, so the only way to be able to
allow PITR to work is to duplicate all the physical changes. Darn.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



view thread (21+ messages)  latest in thread

Message-ID: <20060322151434.GG15742@pervasive.com>
Permalink:  ../20060322151434.GG15742@pervasive.com/
Also on:    postgresql.org/message-id/20060322151434.GG15742@pervasive.com

 · 

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: jnasby@pervasive.com, tgl@sss.pgh.pa.us, simon@2ndquadrant.com
  Subject: Re: WAL logging of SELECT ... INTO command
  In-Reply-To: <20060322151434.GG15742@pervasive.com>

* 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