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 1gWC3n-0007j2-Ax for pgsql-general@arkaria.postgresql.org; Mon, 10 Dec 2018 03:16:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gWC3m-0004PF-2q for pgsql-general@arkaria.postgresql.org; Mon, 10 Dec 2018 03:16:42 +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 1gWC3l-0004P8-J6 for pgsql-general@lists.postgresql.org; Mon, 10 Dec 2018 03:16:41 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gWC3h-0005QT-VW for pgsql-general@lists.postgresql.org; Mon, 10 Dec 2018 03:16:40 +0000 Received: by mail-pg1-x536.google.com with SMTP id z10so4290351pgp.7 for ; Sun, 09 Dec 2018 19:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=w7Js3HQfVhy6/T4JpbdLIZTpIvtHt2lwMjW7Lj/1hVo=; b=VsaDQufbeuPAunr6D/tU9UiwAfQIXzpiNPl/OOQGUXnzy8UcdsCwWBKZLksWAv1e5o v40/ar8b4XRz5hzPCpjxKHx9Xx0M9oU8jWcraobTJahl7x6qKJUqGN5oAdldqqw5+R4x /EAt/wlzMW6i9LSDYyAd9rKDFFGC+D1qVSo57zkWkeLd0qs7Y8wh2aOxwKkY9RdF8cVG v+tvQeULpyZr8qPCs0WeMW2ZCvhHwbnQNUM2D34X3R5EL1Mz4FwvnbUAYyCubropQ5B9 w8k96axeklRFKOLR1FGrUSff5mni4qGdJXWbeiAUqSeOMmzVgEt87msjOY8E/EM0+WT9 HQIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=w7Js3HQfVhy6/T4JpbdLIZTpIvtHt2lwMjW7Lj/1hVo=; b=d9JydSe0zA1TMchJvkyEhlP748CCU9LFqH1w8NLFiKWdhJe4mJlvjZG76orGTbGpRF bFbbUb0hteV2ug19Eb27bh1xOjtG8YUlugNIE2Cg2Rx6kO1+22RUO4VssvuGxwS+8Ojk 91fZqABKV6BfO221K4Up9jOY2AHDZ+F2DTUJcfiIgkZCd1NG8BpgpbP/e+rZxw6QlSta 9RwiB0BmQbTY9G/y8fTlfhg2RHzGcNH+zGDJmyPFsHuibAQcItZr65dDWQJJAlEXQ9n/ gZ6xUcA3rkroy1HHVITVOU6LUxHDGPr4eoIpLf7NnKk0301UOEkBi8dGvTRkGBAdni+9 EjVw== X-Gm-Message-State: AA+aEWZcmvW4duZDtoZUx3865MgBbeE1VHXhfnFfe+VDN9oXJiPGcEBd gToGSRgr0L0bgBgElFd+/7LN24XtDrwpWtC1KIGV5EepVFkX6wyy5P2kVQAB/gDg9tRrPUelPvb QjNKl34951lKyHdxra7Lp3InKy2V05cdkpyAm3iWY6TIBmyT2eb2TdXtqMG1m742iNloLHPnq9m oHSVunhh1KNFp7RtCE8xGa X-Google-Smtp-Source: AFSGD/WksVTkCuZpfdPteUrGe0ZfrvIKuozSGM2ofkN3b0Om9XOyrEtMk6+5Dnm3xiDz5pgzZ1QIzg== X-Received: by 2002:a63:9b11:: with SMTP id r17mr9602252pgd.416.1544411796320; Sun, 09 Dec 2018 19:16:36 -0800 (PST) Received: from osaka.octopusnet (p4645173-ipngn26201marunouchi.tokyo.ocn.ne.jp. [122.29.161.173]) by smtp.gmail.com with ESMTPSA id z62sm14930105pfi.4.2018.12.09.19.16.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Dec 2018 19:16:35 -0800 (PST) Subject: Re: Tables(s) that feed pg_controldata To: Michael Paquier , Ron Cc: pgsql-general@lists.postgresql.org References: <62c43250-70ad-479b-d3ef-9860114eba43@gmail.com> <30d70181-bed1-9c33-f604-30d68d78dc2c@gmail.com> <20181210025029.GB1105@paquier.xyz> From: Ian Barwick Message-ID: Date: Mon, 10 Dec 2018 12:16:32 +0900 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: <20181210025029.GB1105@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/10/2018 11:50 AM, Michael Paquier wrote: > On Sun, Dec 09, 2018 at 08:10:57PM -0600, Ron wrote: >> On 12/09/2018 07:51 PM, Ian Barwick wrote: >>> 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. > > Perhaps. Even with that, writing an extension for 9.2 would require > copy-pasting a lot of code from pg_controldata.c and taking as well the > code which has been introduced for the various control functions. > Dirty, still doable. I've got some code which does just that to read pg_control as far back as 9.3, and it is indeed not pretty ;). Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services