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 1uL9sr-002CJS-KS for pgsql-hackers@arkaria.postgresql.org; Sat, 31 May 2025 00:15:33 +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 1uL9rq-007jL5-6d for pgsql-hackers@arkaria.postgresql.org; Sat, 31 May 2025 00:14:30 +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 1uL9rp-007jKx-RH for pgsql-hackers@lists.postgresql.org; Sat, 31 May 2025 00:14:29 +0000 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uL9rk-000xyx-2r for pgsql-hackers@lists.postgresql.org; Sat, 31 May 2025 00:14:27 +0000 Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-3dda38ce673so44525ab.2 for ; Fri, 30 May 2025 17:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748650463; x=1749255263; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xmAdjT1ikpOlijsh9evcXeBFs5EfixLoSr9fOcxsiPc=; b=Ued/pZly44EvoCQsLOwqh6w3N1NMp6o51z69dcVkK5ApaLOvKkzt6yt97wbpf0bL0T Jjglj5WHofSh995569afdCkUO/jfmI5yjCENi7/wtBWvezwThmxFSNjQU1jqDMLNTkfk tQfhiHilsyVcB9149nblmkDo2MhsGcv9deF2dbpcWLB9QPTg4n1cmL/ZkFU9wnmqOWxC EmfP3YG+0BV/3zwOHr46vMu/6Z+Wl+1QuKyJx3AWsskEAOKCnt1QA/9CpvBx6AzSn0Hk Bryu1O1my2WxiIwTJaRvmSb7iVunTxwMmgzEyFJZaWRKghHHMPyfTQOJdajuZVJtVdAm 3R3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748650463; x=1749255263; h=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=xmAdjT1ikpOlijsh9evcXeBFs5EfixLoSr9fOcxsiPc=; b=TqO0Nbpi46kpmZX6/rePnSqQp/7t77a0US/AaMTJyue66CmdHMemT2BjzC2EBQp0q9 fHmE7EaWEIMdWoIMCdDEdR6gTaAJOUFM3YqxfwSIace81S6mszu5hNjKmjqTHrlFub+Y EnEi2S9xozWIrQVc8w/sLewFso0VLHA+HF3NH/1ucDsrfaIJ01K/Dh/RGvDSPndtaZqa AA+rJR/WyUrUM7hPzUJIXgslQfCwh+gsV08HAAE4bDonTdNpRqSLnChZyG9dwf96MQFo HrPqRcAAscIDGTEUwFTbca7hq67MKevzaooYgXwnMS30euKZm6umXg9InQj+YlD18uvg EXwg== X-Gm-Message-State: AOJu0YxSlCsP8R8lNCpX2ZLki9IGkvHOL+2rXfxygU5mmybeZd4wx7Sg gZ/dRjGIFB2SL3LIL7S8KMU9/HQRrlkvzJ7pj+JpmbYmukitXLIhBBEyvO/87h35hdOZxVaGFwo lOXpf2PKo8oKHaYte5zHJFU/lkBrTCD4= X-Gm-Gg: ASbGncu/g22KhI0q2yAz16kH86Qc80AXIp7ihqhyAoGmGR+BWq1nu3ci0ciVTDUH/xw fjfdMmdh4aucFLOuAN7+Ru34d4n1chRRx9qMFaCI3P+kWWnHqVmsc3EySSXv2ASo4sQEPafhc9O PWHuy0DZB9JZrEgixYFjizCwd4oY9NaO5HvnnJafcY/yD45I/MecP46Jq+oJP3lCs1Vw== X-Google-Smtp-Source: AGHT+IG+xtP7WFDmqg6WgNbYjiD7bnxYfO5ruGF6dvQ2MjXQI3gIqFSPDvGVxlj6hrn4EG2JBOU95M/v510vuiwJBaY= X-Received: by 2002:a05:6e02:1806:b0:3dc:76ad:7990 with SMTP id e9e14a558f8ab-3dda3390c71mr1665885ab.15.1748650462976; Fri, 30 May 2025 17:14:22 -0700 (PDT) MIME-Version: 1.0 References: <21076.1748617331@localhost> In-Reply-To: <21076.1748617331@localhost> From: Greg Sabino Mullane Date: Fri, 30 May 2025 20:13:45 -0400 X-Gm-Features: AX0GCFtd1o129i4mDJ3GuF2BUU08-sACKjmQVIeKlPnfGsVBfZFQGYMh17HSdIQ Message-ID: Subject: Re: POC: Carefully exposing information without authentication To: Antonin Houska Cc: "pgsql-hackers@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000aea16b063663692d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000aea16b063663692d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 30, 2025 at 11:02=E2=80=AFAM Antonin Houska wr= ote: > Why is it important not to fork? Good question. Forking is expensive, and there is also a lot of housekeeping associated with it that is simply not needed here. We want this to be lightweight, and simple. No need to fork if we are just going to do a few strncmp() calls and a send(). However, I'm not highly opposed to fork-first, as I understand that we want to not slow down postmaster. My testing showed a barely measurable impact, but I will defer to whatever decision the elder Postgres gods decide on. > My understanding is that pg_is_ready also tries to start a regular > connection, i.e. forks a new backend. Yep. I consider pg_isready a spiritual cousin to this feature, but it's not something that can really do what this does. Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --000000000000aea16b063663692d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, May 30, 2025 at 11:02=E2=80=AFAM = Antonin Houska <ah@cybertec.at>= wrote:
Why is it important not to fork?

Good question. Forking is expensive, and there i= s also a lot of housekeeping associated with it that is simply not needed h= ere. We want this to be lightweight, and simple. No need to fork if we are = just going to do a few strncmp() calls and a send(). However, I'm not h= ighly opposed to fork-first, as I understand that we want to not slow down = postmaster. My testing showed a barely measurable impact, but I will defer = to whatever decision the elder Postgres gods decide on.
=C2=A0
My understanding is th= at pg_is_ready also tries to start a regular connection, i.e. forks a new b= ackend.

Yep. I consider pg_isready a spirit= ual cousin to this feature, but it's not something that can really do w= hat this does.
=C2=A0
Cheers,
Greg

--
Enterprise Postg= res Software Products & Tech Support

--000000000000aea16b063663692d--