Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1itqcQ-00086c-Qm for pgsql-general@arkaria.postgresql.org; Tue, 21 Jan 2020 10:18:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1itqcO-0006ic-Pm for pgsql-general@arkaria.postgresql.org; Tue, 21 Jan 2020 10:18:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1itqcO-0006iU-8V for pgsql-general@lists.postgresql.org; Tue, 21 Jan 2020 10:18:44 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1itqcI-0002zf-LO for pgsql-general@lists.postgresql.org; Tue, 21 Jan 2020 10:18:42 +0000 Received: by mail-wr1-x42b.google.com with SMTP id b6so2537899wrq.0 for ; Tue, 21 Jan 2020 02:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zunibal-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=wihepNtS4IPEV6C3Oe2BRUisaTJ7onv4L9LIIJKQMVc=; b=XJDM11xsJLkvx5EUTlABilmySkfOJCG4eCeOkLlCez3SicS31ujn28+Zw/i7bv8zq/ 00L5N4XqA+rO2aLGb9u1LcvMQg5fRfgH6Ew5jRpTzUllN+EBZ2whCpbGcpOdmkCbRsQ8 HjIJA2ZL1/bIK2Vl+w/rClWJAReoVNb2u3fss4ROKnPlj88HPGAMkoujoDUsCsGE0LM5 KP5H4O+959XtDWaHSa/9ibJmUFvHUVwkyCYgkhgY/dlj2Lb8U15QFwqkcOpyMYGP7Jm5 Mf7qn1uPnPBeNHp3OzSy88sMOVqju3/YvwJZASZLBE/rqHJEaZ/94+7vyU4J9mNtaCsI kkvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=wihepNtS4IPEV6C3Oe2BRUisaTJ7onv4L9LIIJKQMVc=; b=LJ/MSw3du8PjvLQ3UqSV4eSeMw/+NEvguEklSd00rzoxOVFOzrIDCYv9Y6qOGpiMpB fdYW3oPWxe26iEpy2DCxh9/FIelmr+1DSBwNHTVo5Cpi+FISxBH9J7QdbJqqy7ZxeEs0 ZTyciwGuqrEJYbmDjG191aigYIiuQE05XFc9xmZalpM3cCE0aCTPPZR29oQvRzbmE1ry sEaX2j+Jg6kcqQo7EY14worXrqCYO2cc+JSAlThMx2IqGvdD2Pp9IQwUzNkHqWO0GOkF vTmhGaiNGLqbmeL+FNwU0ElqPsiTxcrRrvR318funv7sRPnaQcHQvH2SFuZTe/xChZB+ bFyg== X-Gm-Message-State: APjAAAWv1mg0AuDdVuRRaB77+nEOQHNI9UmfQjxABfu+eQNjL7jTzcVG ZZWx8dXc9tLRGBJXrJ8IFy0GGx2Pw2Y6pA== X-Google-Smtp-Source: APXvYqxi2U4Ujo4AaXun25i8rrXu/GCjzHEKr0eB8BvrhzUwupICkTngvQxwFnlEnRVUmIC/bsw99w== X-Received: by 2002:adf:9144:: with SMTP id j62mr4490200wrj.168.1579601914154; Tue, 21 Jan 2020 02:18:34 -0800 (PST) Received: from [192.168.3.150] ([176.222.91.85]) by smtp.gmail.com with ESMTPSA id s19sm3164017wmj.33.2020.01.21.02.18.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jan 2020 02:18:33 -0800 (PST) Subject: Re: Questions about how to streaming replication (pg 9.2) To: Laurenz Albe , pgsql-general@lists.postgresql.org References: <78be5263a8ec9822402a3b875ff774eac2a5b010.camel@cybertec.at> From: Ekaterina Amez Message-ID: Date: Tue, 21 Jan 2020 11:18:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <78be5263a8ec9822402a3b875ff774eac2a5b010.camel@cybertec.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk El 21/1/20 a las 10:14, Laurenz Albe escribió: > On Mon, 2020-01-20 at 14:59 +0100, Ekaterina Amez wrote: >> PS: Just in case anyone wants to know, this is part of the process of upgrade a server with 9.2 version >> that has no free space in PGDATA and that can't be stopped for much time. After asking here, the strategy >> to upgrade will be: replicate this DB to a path with space to grow, switch clusters (slave becoming master >> and creating a new slave to have just-in-case), and pg_upgrade slave/new master with --link option. > Do not upgrade to 9.6, upgrade to at least v11. v9.6 is target version because this is the last server that remains with unsupported PG version, and the others have been upgraded to 9.6. After having all of them in 9.6, I have to discuss what to do next as at least one of the servers is installed over CentOS 32 bits  (facepalm...) > > Set "wal_keep_segments" high enough on the primary for safety. I'm not sure how to figure this value . Of course I could use a big value and forget, but as the server is running out of space I'd like to adjust it so there is (almost) no waste of space. This is why I began to think about wal archiving, though it seems a bit more complicated. > Run "pg_basebackup" on the standby. > > Create a "recovery.conf" on the standby that has "primary_conninfo" set > and "standby_mode = on". > > Start the standby and wait until it has caught up, then switch over. Yeah, I've been testing this part and it's the only part where I feel I know what I'm doing. > > Yours, > Laurenz Albe > Regards, Ekaterina