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 1qvNYt-004qXv-EH for pgsql-general@arkaria.postgresql.org; Tue, 24 Oct 2023 19:59:35 +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 1qvNYs-00CSRO-3M for pgsql-general@arkaria.postgresql.org; Tue, 24 Oct 2023 19:59:34 +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 1qvNYr-00CSQc-Oe for pgsql-general@lists.postgresql.org; Tue, 24 Oct 2023 19:59:33 +0000 Received: from mail-yw1-x1133.google.com ([2607:f8b0:4864:20::1133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qvNYp-0027k4-7L for pgsql-general@lists.postgresql.org; Tue, 24 Oct 2023 19:59:32 +0000 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5a7c7262d5eso50296837b3.1 for ; Tue, 24 Oct 2023 12:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698177570; x=1698782370; 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=JIvkxVfXtg/IS5hhoT7UehCk5lp64l/DKRjb8DzTsiA=; b=GblXSfCmUo7MWKB8X2Cid9tErPCHsH9NJIcBIIon78npigdpF/M/BOUkhl07c+pjPK XEsT2zvnEz0SR2aZE1rM0UrVjjU1vwDToCCrJdka0ckspOHSOW9szhMnQVZHG6Y1bUxx zaEULJDEQMwXEz5r0s8tSc862f6okUlxtP+TzMrP243+uyqJVsR9yS7YTSquOP8iXpcJ tCSoLNereqhDpji4NVQsJzdnMHQbirEaZ2TwbuvMVw1Ebqbjpj0HJXTWDdJHT9SFElpN p1POUHE/6rXL0AYZIEbAvnpAnOoqRw0n+1u9882GGsGjbE8/Aqt9fJ3reVyR0CrKYzGa 5ROw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698177570; x=1698782370; 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=JIvkxVfXtg/IS5hhoT7UehCk5lp64l/DKRjb8DzTsiA=; b=Ia86ljR+uqs36kHpKHKmg1xWIzn6HqpHGexQRhb51brPO90V9FUiNTqd/219a5SCjP FnCLeQb9P+taxRMGjdWY9Zjsq2xQqF8YH3VQCUHyXrIFyBDm/1w6eLSCNWQrENLZuB8M dm8IGMXu+j2vPnOJZyKfQtmiBp2UEoMyZmkvjV+xrN9SSJNgVEd1roMLX2b1XJiHwWzt q6yDL8q+DHa5Prtct0CF2Cp6Ou/tDudmyv2iA5nGuifLnRQlRF3Kg4g1a+j/IC23mvas 0l31jpF6mI6QxvPqiEryzVdfF8vGrpjKU3mL70ZTuZTqGNWJNPBWH7qVl0RyncBvtvCI nz8A== X-Gm-Message-State: AOJu0YywzfUlh3SQU2n3pEE30bSpeEzAaoCBbzvwtfWr5ddMma6q3Bl2 h841CyUFud+B4ECWaUA9FBMcOhPSDz0= X-Google-Smtp-Source: AGHT+IFbousvk6e3ZO+xq4McFbaMxFqF2NB0VSeEZW6Q+sRkHTM01zpqU4X6CtE8kv6QMvm31wtdqQ== X-Received: by 2002:a05:690c:ec4:b0:5a7:fbd5:8b3 with SMTP id cs4-20020a05690c0ec400b005a7fbd508b3mr17591790ywb.10.1698177569695; Tue, 24 Oct 2023 12:59:29 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:990b:551:8028:180e? ([2600:1700:bd2c:b810:990b:551:8028:180e]) by smtp.googlemail.com with ESMTPSA id w194-20020a8149cb000000b00586108dd8f5sm4354148ywa.18.2023.10.24.12.59.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 12:59:29 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------fuy0tYPqBmT8WMnHatyPCqqu" Message-ID: <9f98cba1-263b-4757-b4b1-7e0fe70ba1d7@gmail.com> Date: Tue, 24 Oct 2023 14:59:29 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: setting up streaming replication Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <7a9570a6-07a9-4b41-b419-b4a0aa67fc53@gmail.com> <9d194507-1d73-4222-a7e5-fa9417bfd69f@edison> <08345d16-a49a-43e1-8dfd-b8bc9b04b314@gmail.com> From: Ron In-Reply-To: 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. --------------fuy0tYPqBmT8WMnHatyPCqqu Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/24/23 13:31, Brad White wrote: > On Tue, Oct 24, 2023 at 8:56 AM Ron wrote: > > On 10/24/23 08:14, b55white wrote: >> Is all that stuff with slots necessary since the backup will automatically create a temporary slot for replication? > > I want a permanent slot so that replication automatically resumes if > the secondary must temporarily be taken down. > > -- > > Wait. > > Are you saying that once I get streaming replication set up, it quits > working when I reboot the servers once a week? Maybe with temporary slots, but definitely not with permanent slots. I just stopped a replicated pair, and started them up again: Secondary> pg_ctl stop -mfast Primary> pg_ctl stop -mfast Primary> pg_ctl start -w Secondary> pg_ctl start -w Primary> psql -Xc "select * from pg_stat_replication;" Secondary> psql -Xc "select * from pg_stat_wal_receiver;" -- Born in Arizona, moved to Babylonia. --------------fuy0tYPqBmT8WMnHatyPCqqu Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 10/24/23 13:31, Brad White wrote:
On Tue, Oct 24, 2023 at 8:56 AM Ron <ronljohnsonjr@gmail.com> wrote:
On 10/24/23 08:14, b55white wrote:
Is all that stuff with slots necessary since the backup will automatically create a temporary slot for replication?

I want a permanent slot so that replication automatically resumes if the secondary must temporarily be taken down.

--
Wait. 

Are you saying that once I get streaming replication set up, it quits working when I reboot the servers once a week?

Maybe with temporary slots, but definitely not with permanent slots.

I just stopped a replicated pair, and started them up again:

Secondary> pg_ctl stop -mfast
Primary> pg_ctl stop -mfast
Primary> pg_ctl start -w
Secondary> pg_ctl start -w
Primary> psql -Xc "select * from pg_stat_replication;"
Secondary> psql -Xc "select * from pg_stat_wal_receiver;"

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