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 1gWB2J-0004fy-J0 for pgsql-general@arkaria.postgresql.org; Mon, 10 Dec 2018 02:11:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gWB2I-0003v5-4v for pgsql-general@arkaria.postgresql.org; Mon, 10 Dec 2018 02:11:06 +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 1gWB2H-0003sJ-OK for pgsql-general@lists.postgresql.org; Mon, 10 Dec 2018 02:11:05 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gWB2E-0003a0-P7 for pgsql-general@lists.postgresql.org; Mon, 10 Dec 2018 02:11:05 +0000 Received: by mail-oi1-x243.google.com with SMTP id m6so7753555oig.11 for ; Sun, 09 Dec 2018 18:11:02 -0800 (PST) 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=rEXN6mfWim6kRv52zsWvBWfqRxNydTqRzs9zhk4ilvQ=; b=mqAOmCnrs1QIrYKxPlI+BKbKA9ZxjQXIRxMMjdWgSSrNRIGtjsuYjEanpIz0PnFmHC sql6PlZJ2O9OAvS5oXZcaEImAuBCuTUTFP7rRz7UhHPnvk4AaD1X954FkjMewNE2/YAz Eop9q9euxmXVwBOj19MdXa80abGV/z2rtsx3s0m/9UdZ80WcwkfX1VG3t0Jx+zgvu0nx 4zHAY+gt3P78+b2FUXNuuJhpO9vCRq0kBPOBLzbGRpwrC2QgbPLwYazXgvv71wWHHe22 1+x86M008blFj7rekHmncpzSCiNqpBHl4rKos5XCaPHuiIkILxZsxl46KXb0NXbbriOc +aeQ== 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=rEXN6mfWim6kRv52zsWvBWfqRxNydTqRzs9zhk4ilvQ=; b=FYIki9qMzwZToCBgDkKfvqrK/h6h/7BhOECYNfxAZV22fOAOeuOMpDTW7SsdgdVzXV PQ9bLZ7uaJzxqZdTPAIUAarpRsnYeNSAZvY4/hMaWlIfn91DYklimRaGtOpohML1Rlqk w/SrbqlOnhIXsYzO18D+t2Wnayb/jDai6qskBxLUMekoNmwfOndiXAGBDGmZC/nOSzYi D9+maY47vyAU+9kMX6AhV6W487WOUb2Mbm0Odp334H/Yvf+2gHvIMp20idq24epcZZgb jmqHNgrOZqYNg9Da6lmguy7hnsw2w3JZ/S/A/sNyz5n6HY2Ud5qUrIQSXp56sQ9fdayG awaw== X-Gm-Message-State: AA+aEWYNu7H8AF2p1G7KscEBsUzlmY07QwO2rvCLl3mwy3x+UciBQmbR HSATGg14UiOmZeXMjz7ygjefetPv X-Google-Smtp-Source: AFSGD/WBiFtW2j5ru8QDAAscJbZ4QW3TEahiaGMjSUDaOOLj9LsxNQO6d1fVNua5M//Ab7YOXwh3Mw== X-Received: by 2002:aca:4489:: with SMTP id r131mr6740508oia.296.1544407859303; Sun, 09 Dec 2018 18:10:59 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id 21sm5093354oie.24.2018.12.09.18.10.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Dec 2018 18:10:58 -0800 (PST) Subject: Re: Tables(s) that feed pg_controldata To: pgsql-general@lists.postgresql.org References: <62c43250-70ad-479b-d3ef-9860114eba43@gmail.com> From: Ron Message-ID: <30d70181-bed1-9c33-f604-30d68d78dc2c@gmail.com> Date: Sun, 9 Dec 2018 20:10:57 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: 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 On 12/09/2018 07:51 PM, Ian Barwick wrote: > On 12/09/2018 01:25 AM, Ron wrote: > > > > In v9.2 (yes, I know it's EOL; there's nothing I can do about it), what > tables > > do I query to get these values, and can I also get them from the streamed > > replication host? > > > > - Database cluster state > > - Latest checkpoint location > > - Time of latest checkpoint > > The pg_control file is written directly by PostgreSQL, it does not derive > from > any tables. > > From 9.6 there are a bunch of functions which will report values contained in > pg_controldata: > > https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-CONTROLDATA > > but you're out of luck for 9.2. The only option to query the desired > values via > SQL would be to write an extension which reads pg_controldata > (possibly as a backport of the above-mentioned functions). Thanks.  grep(1) and cut(1) make an adequate work-around. -- Angular momentum makes the world go 'round.