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 1ukDfR-00HBqL-Oc for pgsql-general@arkaria.postgresql.org; Fri, 08 Aug 2025 03:21:17 +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 1ukDfQ-003X30-0i for pgsql-general@arkaria.postgresql.org; Fri, 08 Aug 2025 03:21:16 +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 1ukDfP-003X2m-MB for pgsql-general@lists.postgresql.org; Fri, 08 Aug 2025 03:21:15 +0000 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ukDfN-001MtN-0Y for pgsql-general@lists.postgresql.org; Fri, 08 Aug 2025 03:21:15 +0000 Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-500006b3efdso1457995137.1 for ; Thu, 07 Aug 2025 20:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754623271; x=1755228071; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=VLH6e8kXwJn35job91kcld0PYiecvlAl7kcEx7LB6TM=; b=GxmAzXgI3MdCcQFEkmoM5tPcgWkZRZSAA9zgxfKSNnWFHCnwPXlEmyIbSapUQF57U5 /FEQm+U6ZYdneo14zsz2raKR3Id/MjxOPsi9c+1Ivk3Hq+/iwNOZ7gOT+dwBU92PHdVh uXIipPvrM3JvGbIJ2jBtkFIzH9hWrWDUMqPLuRgxL0Esov8ehRB2I2oC3keU49OZ6Ul+ QBfV0dhJk0QDby4LEFouzBun/RFY0q9OkWcNELUp1aDtObK5beKbmxeFtJC1dU9xJ/Uv DWnkWqVbHOy5wjXzot28o1FdHHRiSjQhhjqfd0JX1MhP8RyNUKq7tRbS+QFf3sp1DLVk 7RnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754623271; x=1755228071; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=VLH6e8kXwJn35job91kcld0PYiecvlAl7kcEx7LB6TM=; b=EJIcDeB8N3VvdMGWMVJdOHCfvimNuQLJ1867hfGkzI0vooaCZR4KOVP8DILs73jNo0 kbXZVCDDLcz9j/5NGAne00Y9eo/waYEQkXxd3xO28fPJc7emvUyidlKEvsaVkIGoEQb2 N6MmVVMBR1cega+e4wbSNteN2WM/Pjg5Tl3xtSrp1v7ZQhWxnprxvBhNSrWHc49Ak6xZ E2wAqIiAA5FsJr4p1ISZm+Rm1tow846TE2YV2E9Qd5uAt777h/EzEO2GUFirauSUlNXk kzVYVefiHDvf09GQ7tk6Ndy6HjveKWEUP19Zxp4H9tPi48vhLH/pUBE2fY6Vr/myfPZ/ wQSg== X-Gm-Message-State: AOJu0Yy9SwUUUHz/OHyDiGaL1TlI5UXDJdX9aKGI5cRx3PinMH5fKKKh JKxJTmX/Tv+IL0Yx7Q79Lj6lwYV5pOF393l2BJs3XwI8cG81qNytcIFXclrOdhzsrbl9bU4xnB1 nkUtc7iy3DF2QuZyAaHDu1KOMGcwbdOOjRCpp++E= X-Gm-Gg: ASbGnctdYRzdPSkKOyUNP3YMpbYWG49YvzJuKR8UDVVx2MZQSrmXUnFO4B7uCtLK+ZZ kNLzT5uWSMB/G2sMa73KXLUaQivA4j9JR0nIEcBiLrTMbzn5/LevpdX3BJfm9jU2JzG8VRAeSrC JcOltN1KZ2xOhhxoc9UKsWhNKbZtSiASXA8wr1wkWCxnWpeIS+81uuN6iUbPBEjm+bKcehAzAze uJbFptvPQZYnfg3b+bFaiiVn4gE6vGT5lXYyaIuzA== X-Google-Smtp-Source: AGHT+IHDB2oUXrUhJPN1m1AwAawDPdTfuzOw2KEHvvCBJ65Qoe0Bm0fpR1ctZOWgEw8+qJlcm22DzwHFhT9weQfvJY8= X-Received: by 2002:a05:6102:2927:b0:4eb:3f3:bd17 with SMTP id ada2fe7eead31-5060d1a0bd7mr566750137.2.1754623271658; Thu, 07 Aug 2025 20:21:11 -0700 (PDT) MIME-Version: 1.0 From: px shi Date: Fri, 8 Aug 2025 11:20:59 +0800 X-Gm-Features: Ac12FXzOGuIdVID8wMPaq1nZEe_NIAoKfgX83ZtOOefhc68hPkmouprPzMZyJrQ Message-ID: Subject: Questions about the continuity of WAL archiving To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d26cab063bd210fc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d26cab063bd210fc Content-Type: text/plain; charset="UTF-8" Hi, There is a scenario: the current timeline of the PostgreSQL primary node is 1, and the latest WAL file is 100. The standby node has also received up to WAL file 100. However, the latest WAL file archived is only file 80. If the primary node crashes at this point and the standby is promoted to the new primary, archiving will resume from file 100 on timeline 2. As a result, WAL files from 81 to 100 on timeline 1 will be missing from the archive. Is there a good solution to prevent this situation? Regards, Pixian Shi --000000000000d26cab063bd210fc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,=C2=A0
There is a scenario: the current timeline of= the PostgreSQL primary node is 1, and the latest WAL file is 100. The stan= dby node has also received up to WAL file 100. However, the latest WAL file= archived is only file 80. If the primary node crashes at this point and th= e standby is promoted to the new primary, archiving will resume from file 1= 00 on timeline 2. As a result, WAL files from 81 to 100 on timeline 1 will = be missing from the archive.
Is there a good solution to prevent this si= tuation?

Regards,
Pixian Shi
--000000000000d26cab063bd210fc--