Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qqTup-00ATqH-KM for pgsql-general@arkaria.postgresql.org; Wed, 11 Oct 2023 07:45:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qqTun-00Dr1e-26 for pgsql-general@arkaria.postgresql.org; Wed, 11 Oct 2023 07:45:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qqTum-00Dr1S-KH for pgsql-general@lists.postgresql.org; Wed, 11 Oct 2023 07:45:57 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qqTuk-001QWd-5x for pgsql-general@lists.postgresql.org; Wed, 11 Oct 2023 07:45:56 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5334d78c5f6so11199348a12.2 for ; Wed, 11 Oct 2023 00:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1697010352; x=1697615152; darn=lists.postgresql.org; 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=LqR+yhvkfpTV/XmnCg3tzySHpx528C6xTBRtQk57qjM=; b=Nxhmidruz9tiswPf4LrD9qW7n0BK9AaASnXTUxk4yNsKbeLS1G7jIBu+5W5XJOd4CQ Xx+DRsRzWWXrZyQkUlcnnRJ8anl5Chq9fXpWumggUMvDP8CvjNUtZ6Y/u9Bc0htQTMvy Ppg4QOOobkOl6uxCIar4ZYoeeUTPFuKkVN1dt7v5Tuan9qpSGPavTugRn0uKJr1G6eGC DqIjNmE1FmFJ0DHEcEkp4MZW/g2FQSZLO4/m+mM7IUDdCpEYwviZNMKdOtjjbtZAYqZn xXwTVCpqIau8bwGxX1qQlMCRNN9hqW1O57T7FYvh4UVFTJQoij1PVrzYuc64ian7ghMR GjRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697010352; x=1697615152; 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=LqR+yhvkfpTV/XmnCg3tzySHpx528C6xTBRtQk57qjM=; b=FE1oziPd5m2ofgtCpKYs+hNIPoDbCs4FfIwDLPJ+0OIURXgJPIfGi5QO0tKEnSlFay fQ9iGbVT1X52NT5RbTcXurxhqgR8wmYvT1Owgy7HIzaH8Bon0FTc7ezgjTizjGOD6Rwe QWJPLEWgwuSzk6B0dGyVZtRvqgErIl5XEAju0VV8CnVOjBpbcHM6sjbTkZLcmZLXW3oJ gyK7QB8RqTZL3JAjK55KjXFgdSMdX//jTD8G6xTCKSp9yfqPOlc4o1ZQ19GnlcJDtNxx vL0cflkFZYT7KiSvVRQ9rB7zua2ik9YwbRMTWGvYsaSPNQdFx4k+SsILGI9uroC6HYya ItCA== X-Gm-Message-State: AOJu0Yw1CAKwvAGc5DzOF6iSatwfI0jEaWfU9ax1IqyPuva/Zn+KQ65a KCxaYUg59UwVm7yBsRlU6jezLLOCEHUtxp45Auk= X-Google-Smtp-Source: AGHT+IFciGDL4I1Ilp+yaf3XU1DhdX8cfKgXCv2OwrGRLT8mXOlFrzB6sQCiP7PKGPRVBW4Gc+n9vA== X-Received: by 2002:a17:906:314c:b0:9ae:6a60:81a2 with SMTP id e12-20020a170906314c00b009ae6a6081a2mr18174477eje.25.1697010352063; Wed, 11 Oct 2023 00:45:52 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:6a2c:cc97:efad:aba0:d0d0]) by smtp.gmail.com with ESMTPSA id f17-20020a1709062c5100b009934b1eb577sm9597231ejh.77.2023.10.11.00.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 00:45:51 -0700 (PDT) Message-ID: <386a5cbfb38a6cd0c5fd5ed7f0d08154c2cdb49b.camel@cybertec.at> Subject: Re: A question about possible recovery inconsistency From: Laurenz Albe To: Eugen Konkov , pgsql-general@lists.postgresql.org Date: Wed, 11 Oct 2023 09:45:51 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-10-10 at 11:46 -0400, Eugen Konkov wrote: > [wants to avoid > FATAL:=C2=A0 recovery ended before configured recovery target was reache= d > that is issued in v13 and later] > > 1. Why here (in experiment2.txt) redo done at 0/7000028 when recovery > target name "2023-10-10 15:07:37" is at 0/7000090? > I suppose 0/7000090 should be included, because > `recovery_target_inclusive=3Dtrue` by default. Because there was no transaction at 0/7000090. > 2. Is there any way to include a label into a base backup which I can > use as `recoverty_target_name`? > This is not clear from documentation > https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-= LOWLEVEL-BASE-BACKUP > Is 'label' the name for `recovery_target_name` / > `pg_create_restore_point` is called by `pg_backup_start`? No. > 3. Is there any way to get the latest time from a base backup which is > reachable and could be used as the value for `recovery_target_time`? > As a workaround for XX000 error I inserted one additional record into > the database, so a new WAL file is generated. Then I can use the t3 > value for `recovery_target_time`. > This only works when archive_command/restore_command was configured. > But without them it seems I can not use the `recovery_target_time` > option. Is this true? Perhaps you could use the time from the "backup" file in the WAL archive, not sure. But why do you want to do that, if all that you have to do is specify "recovery_target =3D 'immediate'" to recover to the end of the backup? Yours, Laurenz Albe