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.96) (envelope-from ) id 1vgVwR-00EazO-2a for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 22:35:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgVvQ-001ewA-2L for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 22:34:45 +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.96) (envelope-from ) id 1vgVvQ-001ew2-1B for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 22:34:44 +0000 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgVvO-000hz9-2L for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 22:34:44 +0000 Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-88a37cb5afdso34081976d6.0 for ; Thu, 15 Jan 2026 14:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fittl.com; s=google; t=1768516481; x=1769121281; darn=lists.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=Pf6DVH4RoWT2jh5XKE270LD3O98XUbBdqn9v83/cTig=; b=WwJNokJ10eoQX7KEpJTpEkequtVq9Ry8fCRV7nEc+8xICBYyxajv7qZRpYcckhBbw3 fyK8B13Tx1n2vaBgpJuzlyqRx5W0HGmqtxriXOMcjTSwvbMCoUNk8Cchn3ejfPu9dZRz upHI/dFxZbtJthgpPHlo1IjfPDT301jUVHMwE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768516481; x=1769121281; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Pf6DVH4RoWT2jh5XKE270LD3O98XUbBdqn9v83/cTig=; b=BtDrgsNVRh9F7Av2NVOHZcxp9ugUhZBfTHgEWr+pqnQKmkWPzKcBH06Fn/V+Ad4Z6w QnfTZrOLWJwrEVT1PcSoe2qgaCtpymQ+h32n1mdpDZbIs1tmE4w6LFCnNZiqZc93RQ+x bMViRkuqt7ef7mI0FKg9o15OGBq7SyDibnkJ1Y206eAeJDG9/CroD4fySyBycqYxmizz gHi9FQW8phlcfucfD2rSRXW3ddK8H0j18gF0JXK4zASNx9oq7w3YrAZktVwns1Q5QoLy AZGkBDpR3Dq2Fq4XoLBtgzCzwQk4xitcF1k6ADwdxmm59iOhoZAuL3Ead9zCjT4YcoFF ALOQ== X-Forwarded-Encrypted: i=1; AJvYcCUR7hjKhFFxoAgk8gkzITm8St2OlZLWFvkUWlQgIuZ/gtsxe94KJ/ey59wJqOSipHfMOkNtcQJpvrW3iWZh@lists.postgresql.org X-Gm-Message-State: AOJu0YzlZk2zSsDUKMBC/ia/2M7sUBXaVNH4aPJb1rNkIHpgwJxJz3os J8EdnGfQo0f5JO3z0MJxFLVbA8hwFpa0EejKOwcXmHyvWWmFZFvSge0y7c3o5oKNSXu0xB1K5RN /ywzyGPJM6E2som+GLrrKzQ9oAz1PN9Xf7wnOGc+0 X-Gm-Gg: AY/fxX4G8Bi43HlstgC/NTjLkf+p/854gQQBt/v6sVQVOvxaYgzMbvOwZlqPQlcgFDB Z0iUsqbC2PDSCjztVr25V91Mo/gWeREJ0lCU7lEITF+NS2p024gzpq2z6CHIMTme8QElmiN8Vfo 7NIt0Mbw6wII68exI2DVYXyHufS/u5p3XqK5eERT0j+tWdeUJcAzih50L+P1e7qO6f97cWxjItv W+R/VXr1XiMvaG96x7LrlCohLU5IhuLUUOj5LrxIiaB8y+qdZSX5xuu40dI8vYbTrAvRfL11KAV bT/1kjVZFIW79OmYVCaRgoxAVC8P/mthBu4UGH5+oJdLPce9Zmo8WaSyF5T+8VufkRA2S/U= X-Received: by 2002:ad4:5cc3:0:b0:880:4c2b:1c29 with SMTP id 6a1803df08f44-8942d7d0f91mr15766076d6.31.1768516480837; Thu, 15 Jan 2026 14:34:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Lukas Fittl Date: Thu, 15 Jan 2026 14:34:04 -0800 X-Gm-Features: AZwV_QjsGm0VCG3AedDpANm9UdhuOSeViYC2IgbBFEfsontkadoEX_1yfEWC7pg Message-ID: Subject: Re: Stack-based tracking of per-node WAL/buffer usage To: Peter Smith Cc: 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 Thu, Jan 15, 2026 at 2:06=E2=80=AFPM Peter Smith = wrote: > I happened to be reading the code in this recent push [1] and saw this > new macro: > > +#define INSTR_TIME_LT(x,y) \ > + ((x).ticks > (y).ticks) > > Is that macro name OK? It seemed backwards to me. Shouldn't it be > called INSTR_TIME_GT because it is checking that x is "Greater Than" > y? Oh yeah, good catch. I think I must have thought of "larger than" instead of "less than". I think adjusting that to INSTR_TIME_GT makes sense, and is consistent with how "lt" and "gt" is used elsewhere in the source. Thanks, Lukas -- Lukas Fittl