pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Wells Oliver <wells.oliver@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: COPY write load on primary impacting replica?
Date: Thu, 20 Jan 2022 08:57:30 +0100
Message-ID: <e242f5a7e478c48a506960744f870f6de8a1e39d.camel@cybertec.at> (raw)
In-Reply-To: <CAOC+FBWNoPi_Tbmc14fOtHF0j0AYcgVMO_LWT7_XAPYeZqii0w@mail.gmail.com>
References: <CAOC+FBWNoPi_Tbmc14fOtHF0j0AYcgVMO_LWT7_XAPYeZqii0w@mail.gmail.com>

On Wed, 2022-01-19 at 17:27 -0800, Wells Oliver wrote:
> Hi: I have an issue where a big big big COPY is thrashing a disk on a DB,
> my idea was to fire up a read replica of this DB and point my users to it
> for SELECT (read) operations, thereby hopefully (?) avoiding the disk usage
> caused by COPY on the primary.
> 
> Wondering if this is foolish, whether the WAL log stuff would cause equal
> disk usage on the replica.

That is a feasible idea.
Make sure to set "max_standby_streaming_delay" high enough that COPY
won't get canceled.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (3+ messages)

Message-ID: <e242f5a7e478c48a506960744f870f6de8a1e39d.camel@cybertec.at>
Permalink:  ../e242f5a7e478c48a506960744f870f6de8a1e39d.camel@cybertec.at/
Also on:    postgresql.org/message-id/e242f5a7e478c48a506960744f870f6de8a1e39d.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, wells.oliver@gmail.com
  Subject: Re: COPY write load on primary impacting replica?
  In-Reply-To: <e242f5a7e478c48a506960744f870f6de8a1e39d.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox