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 1ip82L-0005JW-3y for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2020 09:54:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ip82H-00018u-FO for pgsql-general@arkaria.postgresql.org; Wed, 08 Jan 2020 09:53:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ip82H-00018m-0i for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2020 09:53:57 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ip82D-0003yS-S2 for pgsql-general@lists.postgresql.org; Wed, 08 Jan 2020 09:53:56 +0000 Received: by mail-wr1-x441.google.com with SMTP id g17so2677251wro.2 for ; Wed, 08 Jan 2020 01:53:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=v+57PHFAn6R0+LOlCLmBuLsQfkAvpuvp6l5vEeQ4n84=; b=xP9JQjkXfTs+ocUacyLhsyICYRUISlaZhI2PbesFo5noiiZsRhKBUEqFQmGBWCkCmU C+8wjfzHv5bJVeODKaDOBSpRp6WmyDwAbFv0GaSHN1aDhKOG9pT4yAH2OWylDf91Gexk fKtogUYUxmcg0oCOLktwhmW/rzW1VziSZpCSDZvOMH/HSqbWt48UHIHQ9TkIglwfUv6N GzcxXIrfrJh73BOsfNsZdpzavUV+zcQERy9J7ieg0HTiclOUE+T5zSqAj6jdI3272Aiv v9wHgcpvY74I6YMxD468gIk4k3PEmoKKifzkQyB0+p0MLovPpvHJ3bsk6Ip7MJzMgh4K 9uQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=v+57PHFAn6R0+LOlCLmBuLsQfkAvpuvp6l5vEeQ4n84=; b=TYnmSBxWNLijHWCdF0j2blJTxLXqHqceB0b1aFWub5EWkNaD6SYNOD7V4WyM59lgjP gEVxd17wKaWUHzec0+fjRHyH5SxuVkWUXjCMPNM75F1pf0TIZp4KhdZIwokC7ExA2YnM mabsx1HXfy0D7fDd7JirtHNpH4WnjGpR6HkK63tmd75TGqoq9/r53oUtYoMzb/zEZweR 40NtVnuco//m65AApuW38ayNnDsZVQQWDcZRxcv8Osu75IRYn7PAZ/yS5XH1h6W5rqkj PDruE8aOXH0etmfaJZGRhFTTDHc28XeuAzJ+1/BIFDrHAtPuJMahzf5KsoI9PpUrXPml e/Uw== X-Gm-Message-State: APjAAAXmQ7LJzsX4+ixtQRByHxl2QOOebd72D3+fYYjTRRQwwGJbHtPb FmhD8t+NxDiDVYxxd+1RQDSCuH/X2zo= X-Google-Smtp-Source: APXvYqwGv7j4lNnEQ2m1/MslBMj2AsxpZJftXhRCvMxsbgwxsaqUDVrePEZ56qqeNl74hkTiwk1ymA== X-Received: by 2002:adf:8150:: with SMTP id 74mr3684104wrm.114.1578477231839; Wed, 08 Jan 2020 01:53:51 -0800 (PST) Received: from localhost.localdomain ([212.186.219.234]) by smtp.gmail.com with ESMTPSA id y22sm3070479wma.35.2020.01.08.01.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 01:53:51 -0800 (PST) Message-ID: Subject: Re: How to shorten a chain of logically replicated servers From: Laurenz Albe To: Mike Lissner Cc: pgsql-general@lists.postgresql.org Date: Wed, 08 Jan 2020 10:53:50 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 2020-01-07 at 23:17 -0800, Mike Lissner wrote: > > You'd have to suspend all data modification on A in that interval. > > I know how to stop the DB completely, but I can't think of any obvious > ways to make sure that it doesn't get any data modification for a > period of time. Is there a trick here? This is feeling a bit hopeless. The simplest solution would be to stop the applications that use PostgreSQL. You could block client connections using a "pg_hba.conf" entry (and kill the established connections). Another option can be to set "default_transaction_read_only = on", but that will only work if the clients don't override it explicitly. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com