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 1pSzcW-0004Df-5J for pgsql-admin@arkaria.postgresql.org; Fri, 17 Feb 2023 12:13:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSzcU-0004ef-N1 for pgsql-admin@arkaria.postgresql.org; Fri, 17 Feb 2023 12:13:42 +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 1pSzcU-0004eW-0p for pgsql-admin@lists.postgresql.org; Fri, 17 Feb 2023 12:13:42 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSzcN-0005NI-EU for pgsql-admin@lists.postgresql.org; Fri, 17 Feb 2023 12:13:41 +0000 Received: by mail-wm1-x333.google.com with SMTP id x12-20020a05600c21cc00b003e00c739ce4so694879wmj.5 for ; Fri, 17 Feb 2023 04:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=SQ1bg+z7bvK8xi6ekfaAGyQLW7C97xhJcYVtFFXpsaQ=; b=KVGgc+rkbrNfTSWzquw/6zINMSiDbQFVXajYcaON0z5pO5vsWLnQCRMLmIdhaPNln+ 74mvXEFuf8S0LK++dHOxqOG9iG6km9W3JYz7l8mdYlEryMbnsSpUswgNgPeV4I4b6yGl pQ7ud7CBYr0sOIQMo24McojaBAEyLt2QcjBtA6RSFHmPNksbRmybbEqFLODY932VS10k /CGaZJypxunNDpEnUUcm+tRs3a/wlcQFzWhf5ilVgZFYUgII4yarTKIfYdFDhsUIOj8T RqE2WSdAutigFyv8zhzZNify2v4ULFhfVJIOzk2t8mzmzgm1TxVhS0ehwpCxmiF9QyhL hTHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=SQ1bg+z7bvK8xi6ekfaAGyQLW7C97xhJcYVtFFXpsaQ=; b=Fnfl6S/8NbaunVtJSgKhP21f4/AzHzKgOtJKvGkK+z5SdccsYnu93i3S/a7XxETFgV tVlsVKSIabeXfY6ZwDsGaiLqosiukK1CWlhd9DTj+VqXOro8JiX3UTTjzyubjy0OmWNI sUo1+5KvFEPwCfol1tbCBI5jJJVXye2Nzj2rcdSq7IcqaudSEnl1l6f7PqmAK30KUV54 gfzv4MNoaPPQSpJMeIuQ5Y3Yr/UD0kkdh6tRzUOtfcvkYXsuvZHuEBrKjvmiIA7Lf9ys aRfuMSXHPdqV8ob5LK3qD5bI8cINVXVh7X+Qh80nqMrFIbM1w2FnKSKERZdF/ye11Zyo ghCQ== X-Gm-Message-State: AO0yUKVaxkt3C5WIyv/9brpoVLEl/Cu998WFXxQ3QBMsHRUcgG/5khIL OBrFpeumtqmsKaOP4CVoXYJ5nQ== X-Google-Smtp-Source: AK7set/SLl8i9pA37Ed6xe17p+yPFxp0j0b36z4rZWhdLIlP3L86UAFqws+VhLBVMtmb7Du8Og/PhQ== X-Received: by 2002:a05:600c:46d2:b0:3dd:37a5:dc90 with SMTP id q18-20020a05600c46d200b003dd37a5dc90mr436236wmo.32.1676636013843; Fri, 17 Feb 2023 04:13:33 -0800 (PST) Received: from dynamic-pd01.res.v6.highway.a1.net ([2001:871:5e:539:1b2c:c52a:475d:310c]) by smtp.gmail.com with ESMTPSA id j26-20020a05600c1c1a00b003df245cd853sm5322267wms.44.2023.02.17.04.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 04:13:33 -0800 (PST) Message-ID: <28454b4ba1d1cad92d6eb40e68265c728b0c830f.camel@cybertec.at> Subject: Re: Upgrading postgres quickly, without downtime. From: Laurenz Albe To: Karthik Krishnakumar , pgsql-admin Date: Fri, 17 Feb 2023 13:13:32 +0100 In-Reply-To: <1865eb25ef2.12bfda8e286305.6340275209123460062@zohocorp.com> References: <1865eb25ef2.12bfda8e286305.6340275209123460062@zohocorp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2023-02-17 at 15:01 +0530, Karthik Krishnakumar wrote: > I have a number of pg servers(~100 (each with a couple of replicas, so 30= 0 > clusters in total), each with ~2TB data) that is running version 10. > I am planning on upgrading to PG 15 and looking for ways to get it done > without downtime and quickly.=20 > There seem to be a couple of ways to do this -=20 > 1. dump/restore or upgrade -> but this causes downtime.=20 > 2. logical replication/pglogical -> this is going to be slow, adds additi= onal > load on the master, and it isnt recommended to do DDL during time.=20 >=20 > I do have daily backups of these databases.=20 > Is there a way I can use these daily backups to upgrade to 15 and sync th= e changes for the day alone?=20 > I can code in C/scripts, and know bit of internals and wanted to ask wher= e to start on this.=20 > I am also open to any alternate ideas.=C2=A0 Take 10 minutes downtime and use "pg_upgrade --link". Yours, Laurenz Albe