Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNn7w-0003iq-55 for pgsql-general@arkaria.postgresql.org; Thu, 01 Oct 2020 01:11:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNn7v-0005hi-1O for pgsql-general@arkaria.postgresql.org; Thu, 01 Oct 2020 01:11:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNn7u-0005hb-NF for pgsql-general@lists.postgresql.org; Thu, 01 Oct 2020 01:11:18 +0000 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kNn7s-0003YC-PH for pgsql-general@lists.postgresql.org; Thu, 01 Oct 2020 01:11:18 +0000 Received: by mail-oi1-x234.google.com with SMTP id x14so3825053oic.9 for ; Wed, 30 Sep 2020 18:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=/hvhvIJzcXNF0lxr1joC1NDUXaCy50RRktoEvoh3ggQ=; b=L8XiRgynMmwZN7oS+wrwoYDZmLO4PWKIJ7TWOak52oyCwSgW7vy5QZrfrUECa9RKii LNXoFrznFIO3kwZLpkw9v016Lh7O41baSUso8zZiZoSKD+g8lmttZ//5Yllw4FPKqbNr q9ZcaoC7nT1iPl6JKuXaodF5lbrJkFci7r1O0u6ndjH6NIkrZQ+7P6x1zw1us6J7PQ9+ OVfyuPd0nXV3X0Ym9TGCDX7z4/6jAgI9KGHqxZop7vIot0fmyvBhQT+1sKFHHMGa3x+1 qKDnACzJEMBvbHYTqlK01BLHuuqHnNU+UVAfVPN05CkE8EjT01fLQ+MmWBDwWyyc2GI8 d8dw== 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=/hvhvIJzcXNF0lxr1joC1NDUXaCy50RRktoEvoh3ggQ=; b=rAmqBIZOV1o9mM7pczDSJ4OyOqdrzGOMPJcN4+EAPV2aZ/ndHyHWdVPYE6kyj5OFRQ EV6JQGU2GUDW721fec7e/k4aAJFJmXiz/i5998ztS6/YkaMo003l2Pd8I3WHfsxh+H5O hJk/7kwzTF+8If6hZAbPzJk2jPxvx+XowoNgg5lyB0Q6O8D06wpSno/rl3AYNAfz8gK2 /6q7tx0pDa5X7M3x/5AHomqtByK1ZWX7tDiJwA2OmfgVy6PkypebnQImkeTNlP1Hfmpb WZ7SM6d5p1vgWeeXOv0e+aqECtBUI2zL0PJhX4x6BFehgAyX+YjHoy8h2NrWulLAut/e ntOw== X-Gm-Message-State: AOAM532BCMoFBQKX0DwMkcuDI2fB3u2o5cTFEmzJvZ2tf+T4TiSaxpwM GspIe2O97OH15u+3r0sgFbwH3JBWZSMPDQ== X-Google-Smtp-Source: ABdhPJwsf62CeKr9KVcM41i7j2IpZTMER+Q2OlIJGi36UXXsaWTZPKUIYkEmKZa5B9liBfL5vCzPww== X-Received: by 2002:aca:1108:: with SMTP id 8mr2939877oir.26.1601514674306; Wed, 30 Sep 2020 18:11:14 -0700 (PDT) Received: from [192.168.1.10] (ip174-67-143-111.no.no.cox.net. [174.67.143.111]) by smtp.googlemail.com with ESMTPSA id v76sm730556oif.58.2020.09.30.18.11.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Sep 2020 18:11:13 -0700 (PDT) Subject: Re: Restoring a database problem To: pgsql-general@lists.postgresql.org References: <20201001001100.GC26860@momjian.us> From: Ron Message-ID: <82097994-6772-dfd7-84e0-8f150af25e26@gmail.com> Date: Wed, 30 Sep 2020 20:11:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201001001100.GC26860@momjian.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/30/20 7:11 PM, Bruce Momjian wrote: > On Thu, Oct 1, 2020 at 01:00:21PM +1300, Glen Eustace wrote: >> I have had to do this so rarely and it has almost always been in a bit of a >> panic so may well be missing something really obvious. >> >> What I want to know is how to quiese a database to that I can restore it. >> >> I need to close all existing connections and the prevent people/processes from >> connecting again until the restore has completed. >> >> Currently I have been logging into a bunch of servers and stopping various >> daemons, then on the database server killing processes until the database is >> apparently idle then dropping the database and doing the restore. Then >> restarting the daemons etc. I am sure I am not doing this the right way so >> advice gratefully received. > I would modify pg_hba.conf to block access temporarily. As would I; it's the first thing I thought of... -- Angular momentum makes the world go 'round.