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 1gug4T-0007jG-Ci for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Feb 2019 16:10:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gug4S-00035A-8K for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Feb 2019 16:10:36 +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 1gug4R-00034u-T2 for pgsql-hackers@lists.postgresql.org; Fri, 15 Feb 2019 16:10:36 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gug4O-0004Do-Ok for pgsql-hackers@postgresql.org; Fri, 15 Feb 2019 16:10:34 +0000 Received: by mail-wr1-x444.google.com with SMTP id o17so10931407wrw.3 for ; Fri, 15 Feb 2019 08:10:32 -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=YnEwrfn20/S0PwZC/GclBGeY2qvSYdM+WIrWdmCUcSE=; b=TvZ66gSNcn7fvf8Clr/6HOwk2Y9MzuAyvDQyOja7kjw8xd46P/mnd/xDEmCfHQRr6M qomvEDbz58W2tfVm3UnrjSYKPf6n1ElQ5YLlL9/vjrf4R2uPvJCLQbv82Lh07EBcUJrI CPlheacvYkDnDQ7Jz6dKeGg5Nj0aFBn20gLmOm3391sJCKQqLXLGZ/NaDH7Vkhomnm0m DjyygJwrTnwPj64lMZL36I3qK7HSeFLdVWOKg5S6yKPVeZ2IHli/VpW8h/7S4lZo8zr5 przQDAJWK/QgbwuUX5ZrwN6S15wgB/1rXM6kFtUK8VPKYED0CKmRzVdXYFrejUjY7So4 A4Iw== 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=YnEwrfn20/S0PwZC/GclBGeY2qvSYdM+WIrWdmCUcSE=; b=GFHccDDTFDfqsdcz03b20Jgq2nkdt6zzYRZ9ibGuRN/RXtXT0LhVgKnMv7kgNxWb9z cGIVrx2y+1Hxc1bIGM6hwkADb6hl3wRhOTtRAQmLuwi/DpMS7Kh/o6x2mLtX24bbje8S 9IvHfpGm+D8IYCDPI72MfpwRj+/m8rXCs21yTq1yJn/RdsoF4FJQ2hH+kpfGtGySKH63 XbVDXpobl95rCVCKV7W2awEqseM9ZwJVF03e/A7fgJWFHuir9xAzHSxMPJQERsbW9J6v XlDvsdPPmTfXg1GNQBvznheKpXlAWLkVyoNSsVHz8xOBXqhW2ygU48KY14oPAbbZ/uWq vBKA== X-Gm-Message-State: AHQUAuav523zOs5jHXDcZ7ikJdzTTP3eiVsa/FTCdSvuQzH8HH0rjW2T ae63wai8OGTIsm5bWrEQ4x+XWZ5p3Lo3T7P1lss/bfA4T1qOMvY67FeTwiSRVwh99A1cqWiKjEp 1fLcJSDBV0YZaVcq5bdlnzQhppJwQPX9Lgw5mXGoX7vcFc3gCFCEeZTe/MjKIOlUsUyCHSLLVPS BLN8sx98Tr7uw= X-Google-Smtp-Source: AHgI3Ia+A5N2tbTxzQtHEyGhWqtW/SykL/KfTCouz3H6gjDVJexnqP1ghCsNipEqPtLm4zW8Uw8qWA== X-Received: by 2002:adf:f011:: with SMTP id j17mr7473570wro.166.1550247030499; Fri, 15 Feb 2019 08:10:30 -0800 (PST) Received: from [10.137.0.17] (ip-86-49-246-90.net.upcbroadband.cz. [86.49.246.90]) by smtp.gmail.com with ESMTPSA id f10sm3348660wmb.35.2019.02.15.08.10.29 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 08:10:29 -0800 (PST) Subject: Re: explain plans with information about (modified) gucs To: Andres Freund Cc: Alvaro Herrera , Sergei Agalakov , pgsql-hackers@postgresql.org References: <201901142213.gt7vdg65pp4d@alvherre.pgsql> <20190214195501.dplga6fadovwlm6d@alap3.anarazel.de> From: Tomas Vondra Message-ID: <21ebf8ca-d5e4-7c3a-74c5-eaca9d1f1294@2ndquadrant.com> Date: Fri, 15 Feb 2019 17:10:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190214195501.dplga6fadovwlm6d@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/14/19 8:55 PM, Andres Freund wrote: > Hi, > > On 2019-01-15 02:39:49 +0100, Tomas Vondra wrote: >> >> >> On 1/14/19 11:13 PM, Alvaro Herrera wrote: >>> On 2019-Jan-14, Tomas Vondra wrote: >>> >>>> The one slightly annoying issue is that currently all the options are >>>> formatted as text, including e.g. cpu_tuple_cost. That's because the GUC >>>> options may have show hook, so I can't access the value directly (not >>>> sure if there's an option around it). >>> >>> I think the problem is that you'd have to know how to print the value, >>> which can be in one of several different C types. You'd have to grow >>> some more infrastructure in the GUC tables, I think, and that doesn't >>> seem worth the trouble. Printing as text seems enough. >>> >> >> I don't think the number of formats is such a big issue - the range of >> formats is quite limited: PGC_BOOL, PGC_INT, PGC_REAL, PGC_STRING and >> PGC_ENUM. But the show hook simply returns string, and I'm not sure it's >> guaranteed it matches the raw value (afaik the assign/show hooks can do >> all kinds of funny stuff). > > Yea, but the underlying values are quite useless for > humans. E.g. counting shared_buffers, wal_buffers etc in weird units is > not helpful. So you'd need to support the different units for each. > True. So you agree printing the values as text (as the patch currently does) seems enough? I guess I'm fine with that. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services