Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nASK9-0006RT-NT for pgsql-admin@arkaria.postgresql.org; Thu, 20 Jan 2022 07:57:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nASK8-0006Jz-Ko for pgsql-admin@arkaria.postgresql.org; Thu, 20 Jan 2022 07:57:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nASK8-0006Jo-4S for pgsql-admin@lists.postgresql.org; Thu, 20 Jan 2022 07:57:36 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nASK5-0001qp-6u for pgsql-admin@postgresql.org; Thu, 20 Jan 2022 07:57:35 +0000 Received: by mail-wm1-x336.google.com with SMTP id l35-20020a05600c1d2300b0034d477271c1so11650503wms.3 for ; Wed, 19 Jan 2022 23:57:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=GRqFbuflvmFTaXzudQciyCF4maqhQwMRGkwk8j0PTRg=; b=3iW3a2B+muJOEnpjOLmfJ1TfuUCQvKCOUZfTNo2pFiRJ23c3XB/rhmlm3/L9qIESjj PXFG7g/hluNdMqRWIEQztPcYc0PizjGiWoMCH64IPrGatg9guab1/0WJ1A1ZqVN4AtOE 6062Q+L3VZwhQdB4yCX4F2Dayp16+lcQ7JTTZ7naL1WNFJ5M3hYgEF1F1KOoB4PK4s4N wbEym60M02C4/SF9/ksKweucO6uyCi4KyiTc0f9ilzJxwYJCatTDAe0pP7gZUMtIv1/1 uRv0R7X1VYWxVEppDOS1ofS9HZEKQVi/urVDMvYMVyi/wwM3e4KDVVw9F0IhA63lH55r 7JlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=GRqFbuflvmFTaXzudQciyCF4maqhQwMRGkwk8j0PTRg=; b=MroFkPIxOraGRX3FnxkxjWDJvRELC9mr805Ltq4/ollX3K9qeluv0J5iiiyGcu/EMt W3kC/mu3giUVgbGnmSzN55TuaFoQ8Z7dn5yV1m05N62dJJudSYK/DwwpQdqNdxzRCtTB uTC1JyyDHOXq43sDQ4GMIUuHeCCQOv+t9Z/Fs1wtXsJU76q0MLutxvv5VIKGQj/pFbIf Nx/1JDV+CBasym8O1GrmHfktiUF0q+btqTjGk3yV5oV6E8Tf2X6Sm5UdeePT9cbWBK0I yRpyXX7zqTMhszCiWtKSfStyC3J7uCjr+I2IXvQwgZkQo38gYn+6gufvEThona/9l4ae tjEA== X-Gm-Message-State: AOAM531ppdK+ZcIrsXRrC4NxbzeAXGfYmmjsJiGvsjuUNQ3WRQmlFm7c ZKxeczNIkrAKdxtKdBHJfSbuLA== X-Google-Smtp-Source: ABdhPJzy1YHKKOp1HI56yeRuBNxpAcLDaLo4/56djtDgO1lLGWj/IEzAI4LS2GQBVFGVBkRtdOUnSw== X-Received: by 2002:a1c:f613:: with SMTP id w19mr7470976wmc.58.1642665451221; Wed, 19 Jan 2022 23:57:31 -0800 (PST) Received: from localhost.localdomain (dynamic-ea5n5tajl6ogytbhy-pd01.res.v6.highway.a1.net. [2001:871:5e:5d9:76b9:dc22:8b26:8176]) by smtp.gmail.com with ESMTPSA id o8sm1912535wmq.41.2022.01.19.23.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 23:57:30 -0800 (PST) Message-ID: Subject: Re: COPY write load on primary impacting replica? From: Laurenz Albe To: Wells Oliver , pgsql-admin Date: Thu, 20 Jan 2022 08:57:30 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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