Skip site navigation (1) Skip section navigation (2)

Re: WAL logging volume and CREATE TABLE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WAL logging volume and CREATE TABLE
Date: 2011-08-02 15:54:24
Message-ID: 2715.1312300464@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Bruce Momjian <bruce(at)momjian(dot)us> writes:
>>> In minimal level, WAL-logging of some bulk operations, like CREATE
>>> INDEX, CLUSTER and COPY on a table that was created or truncated in the
>>> same transaction can be safely skipped, which can make those operations
>>> much faster (see Section 14.4.7).

> But the documentation states the WAL logging is reduced for CREATE INDEX
> by doing CREATE TABLE in the same transaction block.  Why is this true?

It's not true, and it doesn't say that, or at least doesn't intend to
say that.  That sentence is meant to be read as:

1. The optimization applies to CREATE INDEX.
2. The optimization applies to CLUSTER or COPY on a table that was
created or truncated in the current transaction.

I now see your point, which is that the sentence is easily misparsed.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2011-08-02 15:59:24
Subject: Re: Hot standby and GiST page splits (was Re: WIP: Fast GiST index build)
Previous:From: Bruce MomjianDate: 2011-08-02 15:32:57
Subject: Re: WAL logging volume and CREATE TABLE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group