| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
| Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: WAL logging of SELECT ... INTO command |
| Date: | 2006-03-22 15:06:05 |
| Message-ID: | 16480.1143039965@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches pgsql-performance |
"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
>> 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.
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.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2006-03-22 15:14:34 | Re: WAL logging of SELECT ... INTO command |
| Previous Message | Jim C. Nasby | 2006-03-22 13:19:10 | Re: WAL logging of SELECT ... INTO command |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2006-03-22 15:14:34 | Re: WAL logging of SELECT ... INTO command |
| Previous Message | Tom Lane | 2006-03-22 14:34:55 | Re: Migration study, step 1: bulk write performanceoptimization |