Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s82lV-009CAa-Nb for pgsql-hackers@arkaria.postgresql.org; Fri, 17 May 2024 18:57:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s82lV-00GX0v-FL for pgsql-hackers@arkaria.postgresql.org; Fri, 17 May 2024 18:57:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s82lV-00GX0n-5O for pgsql-hackers@lists.postgresql.org; Fri, 17 May 2024 18:57:13 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s82lN-000l2q-6i for pgsql-hackers@postgresql.org; Fri, 17 May 2024 18:57:12 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-572a93890d1so5739729a12.3 for ; Fri, 17 May 2024 11:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715972225; x=1716577025; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PYLLjRCpGTipqvN5UDIxpfT+D9kHMLMPlodr/PWxenU=; b=Yn5Rcg60/vXsIZs8f4Gt7pPERhDBwwQHJGjYn+U7/5pIhgmpzkwWDVN80q/twYlCGp jkJ0W6Ag9j1L6/ztWAt4/sK7blWcW4R2pepAEHMGZMQRdSBL4pF3P7k4xoQyTba/4Znm OHNNNIxVXJxJpTSnAjQvMCKjJSabLA03VqiYDtEPh7VXoLFLUDnkObrI3ZyDTxezfsu6 HRs+pAeOqc0eeAwFHS6qpnutLVE2Uy966wAkL1LM3y+SJMdN4kUSAk/tpdcuqNdxOsGw JDZXBPHkmefoa694UFTx7CZiPvuzCw8B6QmKsGpreXUIp3PZ0CXVuud1urwhrgCURWAs a3oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715972225; x=1716577025; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PYLLjRCpGTipqvN5UDIxpfT+D9kHMLMPlodr/PWxenU=; b=Dc23Zmxnt8iys0j6wvZ0RKi74diWPBEoiJqCXajTpNFoglgMlpNhkDQoydwevpf7rN JvvaoMcl52mcP7+eZuw0RbI8C76Z2cm7MYaQV1TEHs/YIM7JLbE21bRvuo911xqNCrJ0 aCywKJMKh6sE2LDmklapf2Z8QlCz6LJ9gr1F2LnrcemOYMMglj8IppMENtuZAKyoZAgz BVKt7R0pQFq3dViZwH/7cKRlRKpbMiAw3kS2wymmr5dviKLMSBQwIL5oiwEXYg+F8/Oz j6QsvhB8Mazz7v/Mi5wNTzLTqP5IiiRi6aQwevTtjKKxs6UYtaLfcNG5NFPUXMAx25s8 LCzw== X-Forwarded-Encrypted: i=1; AJvYcCUwV/gDq1itDJsDLMPNjmgDzjpnU4i7QcQzRkqYDZL3sd8+yPZ2Oj6r9cEHBJkCNbRN9Cv44sr5VjtE1j1YDD3RlRxPrDVP+rumZcZW X-Gm-Message-State: AOJu0Yz2WwF1rkMgxev6puUdYVmrKkL6UFr59OuMKvkoIcGL4YBvSrf8 wfHeLIN9STEysEqwIoVzd9OG49esj0IRlDPs3XuvVBSuJjfdA3J4jvBnlMKXwxmz3DJ2zgUjRc0 C3LK/ZwQBZ7GZWKoIk9WXtH8RmTg= X-Google-Smtp-Source: AGHT+IFI9GrDaNdQPm3uWCwZaI6Ateim0MYc79/RjJ0T2LyE8BWcQcLJAaC3aX3E1hgMUbHgcvRgrMTLxlmHTK7IDoI= X-Received: by 2002:a17:906:684a:b0:a59:a64d:c5b9 with SMTP id a640c23a62f3a-a5a2d67635fmr2124513366b.76.1715972224973; Fri, 17 May 2024 11:57:04 -0700 (PDT) MIME-Version: 1.0 References: <20220512034010.4oqa76pasrulkw32@alap3.anarazel.de> <20220512234207.pwwp6q33f72byet2@alap3.anarazel.de> <0892cd00635c8bcd458de6d43d31cf61953da1b2.camel@j-davis.com> <727b0f3b48aec2a4f968bf11c6fa8ca6382b6cca.camel@j-davis.com> <22e756affaad88b77a52d67cb532ed2a544f2e36.camel@j-davis.com> In-Reply-To: <22e756affaad88b77a52d67cb532ed2a544f2e36.camel@j-davis.com> From: Robert Haas Date: Fri, 17 May 2024 14:56:53 -0400 Message-ID: Subject: Re: Comments on Custom RMGRs To: Jeff Davis Cc: Danil Anisimow , Andres Freund , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 29, 2024 at 1:09=E2=80=AFPM Jeff Davis wrot= e: > I am fine with this. > > You've moved the discussion forward in two ways: > > 1. Changes to pg_stat_statements to actually use the API; and > 2. The hook is called at multiple points. > > Those at least partially address the concerns raised by Andres and > Robert. But given that there was pushback from multiple people on the > feature, I'd like to hear from at least one of them. It's very late in > the cycle so I'm not sure we'll get more feedback in time, though. In my seemingly-neverending pass through the July CommitFest, I reached this patch. My comment is: it's possible that rmgr_003.v3.patch is enough to be useful, but does anyone in the world think they know that for a fact? I mean, pgss_001.v1.patch purports to demonstrate that it can be used, but that's based on rmgr_003.v2.patch, not the v3 patch, and the emails seem to indicate that it may not actually work. I also think, looking at it, that it looks much more like a POC than something we'd consider ready for commit. It also seems very unclear that we'd want pg_stat_statements to behave this way, and indeed "this way" isn't really spelled out anywhere. I think it would be nice if we had an example that uses the proposed hook that we could actually commit. Maybe that's asking too much, though. I think the minimum thing we need is a compelling rationale for why this particular hook design is going to be good enough. That could be demonstrated by means of (1) a well-commented example that accomplishes some understandable goal and/or (2) a detailed description of how a non-core table AM or index AM is expected to be able to make use of this. Bonus points if the person providing that rationale can say credibly that they've actually implemented this and it works great with 100TB of production data. The problem here is not only that we don't want to commit a hook that does nothing useful. We also don't want to commit a hook that works wonderfully for someone but we have no idea why. If we do that, then we don't know whether it's OK to modify the hook in the future as the code evolves, or more to the point, which kinds of modifications will be acceptable. And also, the next person who wants to use it is likely to have to figure out all on their own how to do so, instead of being able to refer to comments or documentation or the commit message or at least a mailing list post. My basic position is not that this patch is a bad idea, but that it isn't really finished. The idea is probably a pretty good one, but whether this is a reasonable implementation of the idea doesn't seem clear, at least not to me. --=20 Robert Haas EDB: http://www.enterprisedb.com