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 1qzHvX-00FIS0-TF for pgsql-admin@arkaria.postgresql.org; Sat, 04 Nov 2023 14:47:08 +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 1qzHvW-006NXC-JY for pgsql-admin@arkaria.postgresql.org; Sat, 04 Nov 2023 14:47:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qzHvW-006NX4-15 for pgsql-admin@lists.postgresql.org; Sat, 04 Nov 2023 14:47:06 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qzHvT-003w8r-Fk for pgsql-admin@lists.postgresql.org; Sat, 04 Nov 2023 14:47:04 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-5a8ada42c2aso34912747b3.3 for ; Sat, 04 Nov 2023 07:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699109222; x=1699714022; darn=lists.postgresql.org; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=WBoYJLMXo+LcMBmuqyyz0UTsxYAH986tTTkvYNyNkx8=; b=i/bVn1le2s+K8nImaHTQqPS1vEf8m5NMzXPqY7G0oYiUHOoFSQQECL2YnYHRpQpOXJ bMJyEBiAM3U4s5ok3cjgbpkqUwQ0oZ3YOWxuJX4PotvvYZVfLVM1ovbmt6rYKqsnJvu0 1eFiaQa1Qf1zVODQhYHa+rcV0G6bNPDJmdTA1H4oHBqdCb6WLkH0pS7L5gqsUwmxqF1G Cmm7ddfVEtLFCFJMRWBiiIx9inP4UTWXBnJYduuAZoD31VR6D/oFd4/qAVH4mwCzVfkI DamKHYd9wMlFuqqxBHECNgZKN1r1E1nZpFi2ZNVDwtm08IToIcCZpYlUJzqoCvQQG3+d QblA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699109222; x=1699714022; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=WBoYJLMXo+LcMBmuqyyz0UTsxYAH986tTTkvYNyNkx8=; b=JlHQ+rnzWEfNVqSY94DFXEzYWmKPoEvbS8LOSJ/F9BF0qECHgdtD9ZPZP1GnOhQOOi eFETRpnynvGNk0n6jCSpWPErcbU4ieaIKzmaGF6sn7IjgSJzyS29Tj9nxgL4MxxUgpZE VhbDvjQgSI2+zZr0G/7CTa1tORveLw2HsE2qQhia3ZKOZdET1IMw1SNvKxSy6Q429Nn2 BNkRHFHeYZDYS/uEmkGy6u5zY5Skckagx9yoNIIAhLGDYsVRdoyM3ojfdlKfrsekcepc f2e/XcGlosGWDAcnRr8+3EZy02OwL4T9MtUw8UDLRKwGlorljM4q9s3a7V4aoQ/SDw9W cziA== X-Gm-Message-State: AOJu0YzRpwWvO48tJN5Gm+Dmwa9JBeYjv+7qauc0zDQMsA7QRkpW0k1U FORYl4yXRiRVZBWrBBO8VG74f8MPU7E= X-Google-Smtp-Source: AGHT+IHgfmkfSN/g9LsGPws5dADJACmo2YNITat15Y3nQZQ2Sj5Gid+xclFKSz95xwQaQmqi3U5zIw== X-Received: by 2002:a0d:cb95:0:b0:5a1:d63f:5371 with SMTP id n143-20020a0dcb95000000b005a1d63f5371mr6111434ywd.20.1699109222459; Sat, 04 Nov 2023 07:47:02 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810::44? ([2600:1700:bd2c:b810::44]) by smtp.googlemail.com with ESMTPSA id w200-20020a0dd4d1000000b005a50575b1c8sm2109515ywd.26.2023.11.04.07.47.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Nov 2023 07:47:02 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------aZA5ssGrrBudGgvXuSh6eq0K" Message-ID: <7a19cf7c-a172-4525-a349-bb254ec1d6e5@gmail.com> Date: Sat, 4 Nov 2023 09:47:01 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Recovering standby from primary archived WAL segments Content-Language: en-US To: "pgsql-admin@lists.postgresql.org" References: <27541699100382@mail.yandex.com.tr> <117cf700fc5db3085f9e294e76f545e3d9ee72f0.camel@cybertec.at> <8357c11f-388f-436a-bd51-4c4dcbc0ea7a@gmail.com> <387721699108418@mail.yandex.com.tr> From: Ron In-Reply-To: <387721699108418@mail.yandex.com.tr> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------aZA5ssGrrBudGgvXuSh6eq0K Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Well that stinks.  And seems a pretty fatal flaw in repmgr. On 11/4/23 09:41, Ebubekir Büyüktosun wrote: > Hi Ron, > I test it using repmgr. So, when i close the postgres and repmgr services > at the standby site, as i understand, repmgr drops it's replication slot > so there is no wal accumulation in pg_wal at primary site but archiving is > working well because it is enabled. > Thanks for response, > 04.11.2023, 17:16, "Ron" : > > On 11/4/23 08:42, Laurenz Albe wrote: > >  On Sat, 2023-11-04 at 15:46 +0300, Ebubekir Büyüktosun wrote: > >  I want to ask how we should configure primary and/or standby > servers in case of need >  to recover the standby server from primary archived WAL segments. > >  If it is possible, how primary and/or standby servers must be > configured? > >  Set "restore_command" on the standby. > > > When using physical replication and a replication slot still exists in > pg_replication_slots, won't the WAL files "just" accumulate in pg_wal/ > until > Pg on the replica is restarted?  (I just tested that, and it seems to > work.) > > -- > Born in Arizona, moved to Babylonia. > > *İyi çalışmalar * > *Best Regards* -- Born in Arizona, moved to Babylonia. --------------aZA5ssGrrBudGgvXuSh6eq0K Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Well that stinks.  And seems a pretty fatal flaw in repmgr.

On 11/4/23 09:41, Ebubekir Büyüktosun wrote:
Hi Ron,
 
I test it using repmgr. So, when i close the postgres and repmgr services at the standby site, as i understand, repmgr drops it's replication slot so there is no wal accumulation in pg_wal at primary site but archiving is working well because it is enabled.
 
Thanks for response,
 
04.11.2023, 17:16, "Ron" <ronljohnsonjr@gmail.com>:

On 11/4/23 08:42, Laurenz Albe wrote:

 On Sat, 2023-11-04 at 15:46 +0300, Ebubekir Büyüktosun wrote:
 I want to ask how we should configure primary and/or standby servers in case of need
 to recover the standby server from primary archived WAL segments.
   
 If it is possible, how primary and/or standby servers must be configured?
 Set "restore_command" on the standby.


When using physical replication and a replication slot still exists in
pg_replication_slots, won't the WAL files "just" accumulate in pg_wal/ until
Pg on the replica is restarted?  (I just tested that, and it seems to work.)
 

--
Born in Arizona, moved to Babylonia.

 
 
 
 
İyi çalışmalar
Best Regards
 
 

--
Born in Arizona, moved to Babylonia.
--------------aZA5ssGrrBudGgvXuSh6eq0K--