Re: [GENERAL] Config for fast huge cascaded updates - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: [GENERAL] Config for fast huge cascaded updates
Date
Msg-id 20170627132843.ranvsfdk5zpclsbt@crankycanuck.ca
Whole thread Raw
In response to Re: [GENERAL] Config for fast huge cascaded updates  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: [GENERAL] Config for fast huge cascaded updates  (Craig de Stigter <craig.destigter@koordinates.com>)
List pgsql-general
On Mon, Jun 26, 2017 at 07:26:08PM -0700, Joshua D. Drake wrote:

> Alternatively, and ONLY do this if you take a backup right before hand, you
> can set the table unlogged, make the changes and assuming success, make the
> table logged again. That will great increase the write speed and reduce wal
> segment churn.

Note that this is not for just that table, but for all of the
implicated ones because of the CASCADE statements.  It sounds like the
OP is basically rewriting a significant chunk of the entire database,
so nothing is going to be super fast: all those CASCADEs have to fire
and all those other tables need to be updated too.

> However, if that fails, the table is dead. You will have to reload it from
> backup.

Right, and that goes for all the affected tables.

Best regards,

A

--
Andrew Sullivan
ajs@crankycanuck.ca


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Accessing DB2 tables from postgresql
Next
From: Albe Laurenz
Date:
Subject: Re: [GENERAL] Re: Unable to understand index only scan as it is nothappening for one table while it happens for other