Re: Truncate and delete adds wal logs for slave to process.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Chris Barnes <compuguruchrisbarnes(at)hotmail(dot)com>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Truncate and delete adds wal logs for slave to process.
Date: 2010-02-11 23:30:13
Message-ID: 20100211233013.GK3145@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Barnes wrote:

> Because both truncate and delete, I would think that this action would
> be put into the pg_log as a log file that can be rolled back. And,
> when complete, it would be shipped to the standby to be processed?

You would be wrong -- truncate does not log the full data, only the fact
that a truncate happened. In order to be able to roll it back, the
underlying file is kept around until transaction commit.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2010-02-11 23:30:40 Alter index .. set tablespace uses ACCESS EXCLUSIVE lock?
Previous Message Richard Huxton 2010-02-11 23:28:30 Re: left join count