Re: Does CLUSTER generate WAL data?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Craig James <cjames(at)emolecules(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Does CLUSTER generate WAL data?
Date: 2016-08-24 23:49:24
Message-ID: CAKFQuwZ-s2s1VJwjKdTo8RygvpKSYOhthViCoN=HP7TK3FJ7tQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Aug 24, 2016 at 7:06 PM, Craig James <cjames(at)emolecules(dot)com> wrote:

> I know the CLUSTER command essentially creates a new table, copies the
> data in INDEX order, then deletes the original table.
>
> Does that mean all of the data passes through the WAL logs, or is it
> purely an internal operation? More specifically, if we're doing streaming
> replication, will all of the data for the table being clustered be
> transmitted across the network to the hot-standby slave?
>
>
Not looking at the code but, yes, the replica must be an exact physical
duplicate of the master and since the only ongoing source of data for the
replica is the WAL the actions taken as part of performing a CLUSTER must
be logged.

David J.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Craig James 2016-08-25 00:09:11 Re: Does CLUSTER generate WAL data?
Previous Message Craig James 2016-08-24 23:06:34 Does CLUSTER generate WAL data?