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 1nRg1D-0004CG-FL for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Mar 2022 20:01:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nRg1C-000330-BH for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Mar 2022 20:01:14 +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 1nRg1C-00032r-0K for pgsql-hackers@lists.postgresql.org; Tue, 08 Mar 2022 20:01:14 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nRg19-0003DN-IE for pgsql-hackers@lists.postgresql.org; Tue, 08 Mar 2022 20:01:13 +0000 Received: by mail-pl1-x62f.google.com with SMTP id t19so78787plr.5 for ; Tue, 08 Mar 2022 12:01:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5McnwslKOsPuZ6wJPgeO1joLZ3sJNGhA0MbylDCbmIs=; b=GClB4L//c16bTc2DbuqL3h5S7AjXorkisUOK9x4GB7g8B8XQp6Dz3LyjY7O4Nwugm/ ZfXDlBKm/4/k9XDvXdP852bLrAsmf7LFs6s/+tG4PBIdGaD/zKw7fi9kw16BsrD8bj9P 9OgPpXC428f5z8S/ev4qXd9ZGjRD/3D7KJi0kGcXEOaw9c6jCDPcL4xXUEb3pypueMZi 1BID00R12lSvzLxBCy9hzW0xwxb7LHPCIhAdE5oSmlixvLHhc4p7Nbz0LDiBytY5K8y1 cz4dTkEHry/sugJ1x+GWi3JGn7ntX5K7+cOlikUz3YPBGgUfh6RNbVYEXFfkhq5lzxF+ 8t+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5McnwslKOsPuZ6wJPgeO1joLZ3sJNGhA0MbylDCbmIs=; b=tR3fp3r1pHjaoMuOpRMbi3siIIRk/+ieO6UjgcOUCkn2+KAB1o6xjnW2/G6dVah3Qi 93Ho3Gg1cnKrTerLBXthviwemJAAFH2vNYl5lb1aooSgw6kkjPSKJrFdsolXO3suMoTW vn+Rxa2rH2KF1g58ixF1/2x7gSfYna3c+0Om3bHnVYt7RE65+azsvvrh21G86HznJtGP 72bsjNbfMx4flC49DgxWIjCQy+i1TVTKpYv2fPhb8XfJwWIsxCICEvlbbK7p9gIFyC2H iKrfuF8U96avb+s+Ky4C9q3S/Nm6KftOB703erDdvhZ8s26/al5kYgOYJXCJA3Enc5v1 ioCA== X-Gm-Message-State: AOAM530Pk/mC9KrOtRWVFWehL1adfyplNBHtSw6PTN9Q0hscXxh3aHeN F4VOodJHWRodENErqMx/h/k= X-Google-Smtp-Source: ABdhPJwQ5iapzoxWiEvazdODbqFEelDlNg/OUn8Yxuqkz3YGjS9lURa5aNpr28wwkK+HIN+PEbXi5g== X-Received: by 2002:a17:902:7595:b0:151:7b0b:11c4 with SMTP id j21-20020a170902759500b001517b0b11c4mr19674338pll.126.1646769670455; Tue, 08 Mar 2022 12:01:10 -0800 (PST) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id s3-20020a056a00194300b004f6da3a1a3bsm13825941pfk.8.2022.03.08.12.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 12:01:09 -0800 (PST) Date: Tue, 8 Mar 2022 12:01:07 -0800 From: Nathan Bossart To: Chapman Flack Cc: Stephen Frost , David Steele , pgsql-hackers@lists.postgresql.org Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file Message-ID: <20220308200107.GA85558@nathanxps13> References: <621E4529.1090601@anastigmatix.net> <20220301173208.GB1031413@nathanxps13> <1f685b3a-7ec2-825e-bb2b-d87d78ad5bd9@pgmasters.net> <621E6C2E.2050801@anastigmatix.net> <20220301191441.GW10577@tamriel.snowman.net> <621E7A5C.1030203@anastigmatix.net> <20220301200523.GX10577@tamriel.snowman.net> <20220302010302.GA1182956@nathanxps13> <621FC447.90502@anastigmatix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <621FC447.90502@anastigmatix.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 02, 2022 at 02:23:51PM -0500, Chapman Flack wrote: > I did not notice this earlier (sorry), but there seems to remain in > backup.sgml a programlisting example that shows a psql invocation > for pg_backup_start, then a tar command, then another psql invocation > for pg_backup_stop. > > I think that was only workable for the exclusive mode, and now it is > necessary to issue pg_backup_start and pg_backup_stop in the same session. > > (The 'touch backup_in_progress' business seems a bit bogus now too, > suggesting an exclusivity remembered from bygone days.) > > I am not sure what a workable, simple example ought to look like. > Maybe a single psql script issuing the pg_backup_start and the > pg_backup_stop, with a tar command in between with \! ? > > Several bricks shy of production-ready, but it would give the idea. Another option might be to just remove this section. The top of the section mentions that this is easily done using pg_basebackup with the -X parameter. The bottom part of the section includes more complicated steps for when "more flexibility in copying the backup files is needed..." AFAICT the more complicated strategy was around before pg_basebackup, and the pg_basebackup recommendation was added in 2012 as part of 920febd. Thoughts? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com