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 1voLOr-001knZ-1s for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Feb 2026 12:57:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1voLOq-003mEu-1R for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Feb 2026 12:57:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1voLOq-003mEm-0J for pgsql-hackers@lists.postgresql.org; Fri, 06 Feb 2026 12:57:27 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1voLOn-00000000qFs-3Lo9 for pgsql-hackers@lists.postgresql.org; Fri, 06 Feb 2026 12:57:26 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-4359228b7c6so488046f8f.2 for ; Fri, 06 Feb 2026 04:57:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1770382642; x=1770987442; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:reply-to :references:in-reply-to:message-id:date:cc:subject:to:from:from:to :cc:subject:date:message-id:reply-to; bh=/tU3+1IE6FLGDibsnh2AW4T5YHrMc3qNDDyOXrpdAmU=; b=aNYdsjqyeDudqwn8fF5UDCgvGdliUxldM3SJefZFaiXRmcL2ty6JFJpMLmTamicuBV j9ZHD/E4zK4ATTLDqlLnes8DiIi0EOC5BIWUGg4iMZ0epADHTt9yn2s9mOGkUhub5kNq GXm6P+A/tT6VPjYj8M/Ms2x2mxwawIpJFzBDscrJPSY1tLb4O42C6yLgtY7qdqjYLVr6 a1fNShHxQa3SNfLRyRCFnepGEY+r/1715knH13SgPucoTn+3DpLpnrI3NmEGhjwkJdH3 oNq9hyR0mQDf6+GWVj7OjaMfkj8/d2d544LbQhupFIMbIHW04PMzxbeV2TmZC/DGxv0P K+5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770382642; x=1770987442; h=content-transfer-encoding:mime-version:user-agent:reply-to :references:in-reply-to:message-id:date:cc:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/tU3+1IE6FLGDibsnh2AW4T5YHrMc3qNDDyOXrpdAmU=; b=gRiVHWVxOEHx3jLdGkc6hUV/Uk/yfxP4BKV4MsD2JxE2zs50rMXn9tjxKCMQoVV0os 4x4LB0X96LeWsTYhyWS4fTjP+9Bc1xjlbU9ZOw/WJMnFVE+fC0bFfKlvbTPdTxSG2Ozs XRlrj9NR+HUNUK6n5SnitD2iL9Q2NLV5ObdD9CeTgPt8XZylMGMMV6w3aUncz+WyHg8h CKn0YJtaFDt1Pv2j0aU8FfOLqLQC+5h8rTHdD+nudR5EljOsBKTt4SbXq3DLay4SfgPg xYzWqcuSD/eVcvD6ahw+e2udzW88VFLS54yxUC/2GSVz5AX4ArIE4kCzsyB7QlEdQDD6 JC2Q== X-Forwarded-Encrypted: i=1; AJvYcCWV2a1PJInOzVPF1bEbDip/iNn5YWFTfRA5yZTWfKAWfP3snEbM2vyxhSojkrj4KGf1ao/LVt90Yys/hPyN@lists.postgresql.org X-Gm-Message-State: AOJu0YwWbvte/k8pGc3JnvMhZrJroV4iR9w3fpYUsijwTtAFvMaYc2Ru eS/ztuq99bsmLHSmWQksrHkPrQur38CqGr/jOA6GgnOVeWGvvNAJN+vXjkXmqIyCpM0= X-Gm-Gg: AZuq6aLFIgMVFovY/CiYAbSx0pat1GsvhbFddAMPXHfQHpLASfk2FS6sK9Zhbiufl/Z jZj6bY6K966qDZU/vZYOFJYf7NhLfA4qxEtmhbKV6rVToabrHrB2Y3//DEKpZkgXJUxXcUv/RH2 ERoDAGror9gSdTLajtDJNGD4EjZVDf3wJlDsmcJQt3uNsBi4lUJdOX8SuzS4PfMb9hJ9HvS22+0 +HPAFY+UmvEQACVB2n1GSsPYlCR+Cawf7RcFsUO4kSVWuXlc/ZNgi0rzAZvYkrbkONtahvCNrwH CFhPVYmeIw0ZNaA/kQIu6pRWJ5hs0fLSzKlRudhDMdckDz/X467PsbaGoEA0Uc986jC1CWVLthT /U9i4O2LhtDo+NVeMRCJt/F2wfXVLc1Cw4LkcU6f0u5iKYKga1XoTSf02TsU0OSeWrB7eLlZopy DoRMoTc2cFSh1FTBEjvYW987hmTyrz51PWNsFPNmy3pfxYzBPh+A== X-Received: by 2002:a5d:64c6:0:b0:431:104:6db7 with SMTP id ffacd0b85a97d-4362933fb33mr4420261f8f.26.1770382642501; Fri, 06 Feb 2026 04:57:22 -0800 (PST) Received: from ?IPv6:::ffff:192.168.0.101? ([62.197.243.85]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-436297460a5sm5257097f8f.32.2026.02.06.04.57.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 04:57:22 -0800 (PST) From: "Pavlo Golub" To: "Christoph Berg" Subject: Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements Cc: "Sami Imseih" , "Bertrand Drouvot" , "pgsql-hackers@lists.postgresql.org" Date: Fri, 06 Feb 2026 12:57:24 +0000 Message-Id: In-Reply-To: References: Reply-To: "Pavlo Golub" User-Agent: eM_Client/10.4.4209.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > >Is this extra complexity worth one saved GetCurrentTimestamp()? I'm not sure really. But I really need a new column in one way or=20 another, so I can agree to whatever decision we'll make. > > >src/backend/access/transam/xact.c is calling GetCurrentTimestamp a >lot already, so I don't really buy the argument it should be avoided >at all cost in pg_stat_statements. Just storing the statement end time >would make this use case much nicer. +1 Maybe just move GetCurrentTimestamp outside of spin lock is engouh=20 already? > > >Christoph