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 1nHLvM-0003EI-Sf for pgsql-admin@arkaria.postgresql.org; Tue, 08 Feb 2022 08:32:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nHLvL-0007Sm-6x for pgsql-admin@arkaria.postgresql.org; Tue, 08 Feb 2022 08:32:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHLvK-0007Sb-Di; Tue, 08 Feb 2022 08:32:30 +0000 Received: from admin.sibptus.ru ([2001:19f0:5001:21dc::10]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHLvH-0003CD-TQ; Tue, 08 Feb 2022 08:32:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=dAGZAZcXTUi+6aIQuskLOpCzH+Ncm+zxSGeP830AjRI=; b=Ww83AXGOvO6Rw6O1XyJcQ9zYrr UYp52QzlQ51fkvEHWicbRgOVyJNjQvvCC+aWnLpKXXolSfo6EFNxhzN6NM7hWupnX0lVdoPXSuZsV QeF5JrAS0aFxmCAEGrMnNgjpAEy6sbvnX19m6HgKg0PtukBN14qhQ1IFBAg1L3u8zQwc=; Received: from vas by admin.sibptus.ru with local (Exim 4.95 (FreeBSD)) (envelope-from ) id 1nHLvC-000GS7-1g; Tue, 08 Feb 2022 08:32:22 +0000 Date: Tue, 8 Feb 2022 08:32:22 +0000 From: Victor Sudakov To: Julien Rouhaud Cc: Nikhil Shetty , Pgsql-admin , pgsql-admin Subject: Re: Lost replication slots after pg_upgrade. Message-ID: References: <20220208070404.d2dizlt6nvz2g3og@jrouhaud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220208070404.d2dizlt6nvz2g3og@jrouhaud> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Julien Rouhaud wrote: > > > pg_basebackup takes time for large databases (> 5TB). I feel rsync should > > be faster. > > Not necessarily. pg_basebackup will do simple sequential read of all the data, > which is probably the fastest thing to do. rsync will do some extra processing > that isn't required in that scenario, so it's likely to be slower (although > probably only marginally slower). I think Nikhil was going to invoke the rsync black magic as described in https://www.postgresql.org/docs/current/pgupgrade.html, not for copying the entire PGDATA from the master to standbys. While the rsync magic should be hundreds of times faster because only modified files will be copied and the majority of files will be just hardlinked, I've never felt I have enough skill and luck to undertake this method. -- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet