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 1pzzuu-0004Me-KT for pgsql-docs@arkaria.postgresql.org; Fri, 19 May 2023 13:13:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pzzut-0004rW-7n for pgsql-docs@arkaria.postgresql.org; Fri, 19 May 2023 13:13:07 +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 1pzzus-0004rN-W4 for pgsql-docs@lists.postgresql.org; Fri, 19 May 2023 13:13:06 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pzzun-000j7H-Cx for pgsql-docs@lists.postgresql.org; Fri, 19 May 2023 13:13:06 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 229F75F7B7; Fri, 19 May 2023 09:12:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snowman.net; s=dkim; t=1684501976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hHABOOPl+ib8+4jidJUp8CTrfXicLHtewtyKjgPF2W8=; b=qxyKirCm1xUq93aldkv+A2qHki5VDpt+4ZgCL0f3Fs+fz+lyBd6H8xPwiJqdRHhow+z5Uo vwcRLvBiFjngOto5asWuP/4CNtvzwXr8OvJMH3eixozeFdlABSaXIwxw5RNNdoBDNXDUss dde+CEWLWfo4bzBTtMa1eb2l/0Sjdv8= Date: Fri, 19 May 2023 09:12:56 -0400 From: Stephen Frost To: Kristjan Mustkivi Cc: pgsql-docs@lists.postgresql.org Subject: Re: pg_basebackup application does not dump all database objects Message-ID: References: <168423776321.714.17805484409630880522@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="v2HWEGKDzKZtJmlz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.4 (2021-12-11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --v2HWEGKDzKZtJmlz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, Please don't top-post on these lists. * Kristjan Mustkivi (sonicmonkey@gmail.com) wrote: > Thank you very much for the feedback and a reference! I was under the > impression that pg_basebackup does everything > pg_start_backup/pg_stop_backup but with a more user-friendly manner > and additional steps. But they are then functionally different. For my > particular case the pg_start_backup/pg_stop_backup approach was better > as it retained the replication slots as well (the end goal was to move > the db from old hardware to the new one and have it on the new hw > exactly as it was on the old one). So I was surprised that > pg_basebackup did not bring the rep slots along. pg_basebackup does effectively call pg_start_backup/pg_stop_backup (or pg_backup_start/pg_backup_stop in newer versions of PG..) and is more user-friendly and does do the additional steps expected of a low level backup- and which are documented in the link that I sent you. Again, it's not enough to just call pg_start_backup and pg_stop_backup and do a 'cp -a', and that's why pg_basebackup does more than that and also why we document those other steps for anyone interested in writing their own backup tool. Perhaps an argument can be made that replication slots should be optional for pg_basebackup to include or not (and similarily for other PG backup tools which use the low-level API). Thanks, Stephen --v2HWEGKDzKZtJmlz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEwf6gbxKhD863zrx/7WyKOINHZFUFAmRnddgACgkQ7WyKOINH ZFXSqQ/9GbTYaWsah/60j6DEILqZb1nj/HDvAwJczJ6K6TdrCfhAODBvUcXCMwq5 vaBLFaIAbleMKA+5XBfiudCwnSZOmb+TkghEaEWhwB4iSaktKP6hAxJChR+DdOnW /FtXyaVVNEKX0AhPXWM07uLfvLaAgRFLkfIj1JuOpvFlRtgoxsvBr0NsBABEKfZK jozyCqtztkqLDSqOXDq6O+yA4Lx3BxyhbzorN+SBa8QaKkvWGh5TmFn4oxQF2c0E NfkTuDMxeVDhV4jIUh8ynOXR0i/f7aQK0oWarwHmr33B1JdhUIQjpUSghAAOvs2+ RTTBNW+LXXi+Sln4NVyR3dZO69e8txHHkAIGkMs4ndvA8TRBVs5zKYbQyAMi9SWQ jcnT+fpPUKZpL+yLX0VQMLpNs1A+P6gXnDetU4quaRFQWBy3tWvCjnLBvujJ1OIp wNdv5BTID8uN9Gd8y+ODcHKozfwUYxFFYthfJ7yYhO73TrFs6aB0du5R0fJ1ysJq CspWKZLZ3JNV5BRL5eAfWd0UrJAoIL/ruO3R5QD6/y8IvxDfdYrCMIKi5PL1nrQ8 IGwDoETtwVEHU5xqB9znBzYGVSrst4LqNiqxDiPF4j3+X5jhbQuTJp/s6VJHMAEQ de8F3d+rWW/xoAyppow5WlQV0XEXeD/3PkUCTOUhURv+DLcS+TM= =tgBi -----END PGP SIGNATURE----- --v2HWEGKDzKZtJmlz--