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 1jumPK-0005dx-Ey for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jul 2020 00:33:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jumPI-0004vm-EP for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jul 2020 00:33:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jumPI-0004vf-7B for pgsql-hackers@lists.postgresql.org; Mon, 13 Jul 2020 00:33:20 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jumPB-0005FL-CC for pgsql-hackers@postgresql.org; Mon, 13 Jul 2020 00:33:18 +0000 Received: by mail-qt1-x844.google.com with SMTP id a32so8802368qtb.5 for ; Sun, 12 Jul 2020 17:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=vbzMEUOYY5mCEroPOItaU87MZzZHUgr6DDpiTInNQgY=; b=P9g9rcHAb9tRoMGJsQKHvGOBxBawYcoU99Pvp6iNoJeelenNCVlj77e2UlRO0bdbmG bdG8Y15gtoJPTe+cCA9eTFku3yy4OpJRPaCRjidHp+NB2GB+9r/RId//kRHzjDB+t+xB hOrqiw+45tj7Pds9GGQXZ7lzOGoOKaVUGfgAJgPPEBOeXUb9FQTXqyIFpKG90OEL+unQ NytewUo4zmaK3Bt1JkJRXuG0UepKSuNXjJS01aHzuNvYHIZjg6P8MufLaitpdf1vlEnn 56HH/Flduz7QFVY3C+a4C7Q5KiZkBoT1s7Tz1BVj8ahFUnXgk3uSEsKGmIfYLeMo3Z9w ewdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vbzMEUOYY5mCEroPOItaU87MZzZHUgr6DDpiTInNQgY=; b=ouLYcYASb83aKUZkEV+krG0Q4WrX8/9JJPZbUQUTm1IvnE5X0zhCzXYqt9OxR6wDnY 0arpY98MB1pIMys3XiEkZkLIo986vRvSATDND6QhI3n4XQtkUf51lDTIyJfOT9XGmKhK vfTiXCzFUIrozA8EUEsobdz3XmO3iz2ZznhA82RZg3S6Cp8pD5tLE8hDxd3EgBcJAyls 5V+kW0LYMNhqJ1ItXSYVOrJqyyJtj3nYzv4P/3ABKOUsZbTJyDSEnCLvOSB5G//vu/n1 gmVcSzuH1GehM1skE631OkmHZDKjaGnIBtaKhCLU5is7D1HRO6/59YwffXdX565IqpM3 XPGg== X-Gm-Message-State: AOAM532ZlPzRkPR48HvMy4qVteoQG0kVf4yGa3+SVrg9eahXUjJZMXfZ 4LhNBj3eVUvFQI7NG6aKbePmDQ== X-Google-Smtp-Source: ABdhPJwqx9z+fLoOuelmkHDup+YYZxT0SitS/gqfW+La+v0SFmcX21z9vz6haR3UUZC4NVeD4iZgwg== X-Received: by 2002:aed:2ba1:: with SMTP id e30mr85810080qtd.357.1594600392402; Sun, 12 Jul 2020 17:33:12 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id r5sm17764911qtc.20.2020.07.12.17.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2020 17:33:11 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 35D9E2A18A9; Sun, 12 Jul 2020 20:33:10 -0400 (-04) Date: Sun, 12 Jul 2020 20:33:10 -0400 From: Alvaro Herrera To: Tomas Vondra Cc: Masahiko Sawada , Alexander Korotkov , Michael Paquier , Tom Lane , Andres Freund , Mark Dilger , pgsql-hackers Subject: Re: WIP: BRIN multi-range indexes Message-ID: <20200713003310.GA22495@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200713001419.te5aozy7o76ff2vk@development> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jul-13, Tomas Vondra wrote: > On Sun, Jul 12, 2020 at 07:58:54PM -0400, Alvaro Herrera wrote: > > Maybe we can try to handle this with some other function that interprets > > the bytea in 'value' and returns a user-readable text. I think it'd > > have to be a superuser-only function, because otherwise you could easily > > cause a crash by passing a value of a different opclass. But since this > > seems a developer-only thing, that restriction seems fine to me. > > Ummm, I disagree a superuser check is sufficient protection from a > segfault or similar issues. My POV there is that it's the user's responsibility to call the right function; and if they fail to do so, it's their fault. I agree it's not ideal, but frankly these pageinspect things are not critical to get 100% user-friendly. > If we really want to print something nicer, I'd say it needs to be a > special function in the BRIN opclass. If that can be done, then +1. We just need to ensure that the function knows and can verify the type of index that the value comes from. I guess we can pass the index OID so that it can extract the opclass from catalogs to verify. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services