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 1v6xfD-00CbHJ-VV for pgsql-general@arkaria.postgresql.org; Thu, 09 Oct 2025 20:55:04 +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 1v6xfA-008ZRq-3Q for pgsql-general@arkaria.postgresql.org; Thu, 09 Oct 2025 20:55:01 +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.94.2) (envelope-from ) id 1v6xf9-008ZRi-Oo for pgsql-general@lists.postgresql.org; Thu, 09 Oct 2025 20:55:00 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v6xf7-000vNQ-33 for pgsql-general@lists.postgresql.org; Thu, 09 Oct 2025 20:54:59 +0000 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-269af38418aso17551545ad.1 for ; Thu, 09 Oct 2025 13:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760043298; x=1760648098; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=xBLmonxg0kkqC/6TsTgWmFXqFnm2fiaLa/5zcboIzSE=; b=l4sRlwztl04zdg9X6guOidtKCMraZftyeSuui+16U1oVJ4AVcVUUNJ/qf7qOKuCm1C wJMHRq5/ErK02E6fW87T5ztYYu+D6XxK9x/Fr39iLrwSjKrMm4Tcv2OEl5Y99QC5AWss mGmp+tEAtr9fPaGNtrpoiUedJZinae+87SMFL+tBNyseM/Yhr8kaRqk1UfSM+w5Cj2sR NcCfCawgPjHT0rSRm3wpXSgY3AGRdWYhKfBZP4nSlFUfTT1TsoNuPkJmGQSbu77y5uyJ Ox/LxbLF8NwPwElwHPbTvhrCqq9AqK5uOAZACKQdez6ui7mdWIrnspodkFUOF1ILbSP5 elXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760043298; x=1760648098; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xBLmonxg0kkqC/6TsTgWmFXqFnm2fiaLa/5zcboIzSE=; b=aAxgj0E58Mi8Rky19GNujbEp+1XOwSX9xutoBZ01UN0VNajtqnwAailf8fOl6ADknj HIQvf95Pv93JIYc56mHLmaoHfYZR7PaP+N+jddXQl27xxCAguv7Q60xTJx6t0WhddPsP pU9VAP50GSBj7ch/7V2WxH1aKKQ5hxFTsWv3eWaLn2hsAbz/zxg72dAL0/0L4uJrhatR z6qTM5/KlL8hDw814hksUFbLFglQjbo9DK3Oz5wHBuHt94Ij8qnilgXlZI3qRaIIkNDk kWcCpz0ZOvVc0hUU/x1pDH5uY8Zr/P0MKTarLuQv0z3a2B37vQEcVEvHgdv58/pXzot2 5Zkg== X-Gm-Message-State: AOJu0YxfaA2TuEIAAjS9Lnfe/8dDUhuK3sc7yr8lDU3dAh1CK/TclEzL dhcGP0onpTTXLFnwTDMXcyKCauqRLmB6TkTRD/E4oG5MXGJqXFjDdJJzFtN2es78 X-Gm-Gg: ASbGnct1hmSL7h4+gKci1pQ4H3qgOvIC/VGIFftmLRZDJ0vr+8DPT+q6h5O+/IctUYT UwJcMXnapnLdVxtMCv/GeYGuLv03P3XKXD8Yv41U1SkNlU1PK/tPE7E4TVWP+XEFCReV+iFBw6e fC3c+/N5UxUOB8W04dakoVLX5SFcgDUh7YWEInplzuJeV/VZoBFlBSrKT6djUPLgDe5yCkMo0o2 eVyJF3UVdsYR9u4rBc/UhqsMsPtmRWa9az3Bn7bbJ+YoGZTPE2EBGZIY+ZFEQ944ErR81CSfR3d CHfzhEMEHNh+dEbqmHfHZ88D9/dBdPsd2ODPM5uoRnQ5vAuBvjNyNICBmCWshkufSi8jQZtKc1G v4NF5BtZG5xTfP0ng8ZX639m85yoKMhbRCoiMBOY0FkQkvdCsAeqytwbKZk9gjIdS4R6LAspKtN ofyI0ZNWztimDWAnm1HA== X-Google-Smtp-Source: AGHT+IGpb89anPphr4FbsXnQAbxdf++hD+8aFUudWj2pzJrm6wUntjiT/3EyVC0fQ8dV00Tgq5bRPA== X-Received: by 2002:a17:902:e54f:b0:28d:18d3:46bd with SMTP id d9443c01a7336-2902740089cmr129854645ad.43.1760043297646; Thu, 09 Oct 2025 13:54:57 -0700 (PDT) Received: from ?IPV6:2601:681:4c01:7310:3236:6cb4:b40c:36f? ([2601:681:4c01:7310:3236:6cb4:b40c:36f]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29034e4510bsm37262655ad.56.2025.10.09.13.54.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Oct 2025 13:54:57 -0700 (PDT) Message-ID: <0c57f712-24c7-4f50-8d5f-7a1f42bff711@gmail.com> Date: Thu, 9 Oct 2025 14:54:56 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: High latency and profiling To: pgsql-general@lists.postgresql.org References: <938cf470050825d031f624b57f6ca46949304691.camel@cybertec.at> Content-Language: en-CA From: Rob Sargent In-Reply-To: <938cf470050825d031f624b57f6ca46949304691.camel@cybertec.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/9/25 13:21, Laurenz Albe wrote: > On Thu, 2025-10-09 at 19:25 +0200, Roberto Nunnari wrote: >> I was notified about high latency on one of our PostgreSQL clusters. >> This latency is observed from the application and has been increasing. >> There is no indication about the exact database as the application uses >> several DBs, but the largest and most used is 'mydb'. >> >> Developers report that their software is already optimized and database >> size is not a problem. They suggest the issue might be inside PostgreSQL >> itself. > That may be true, but it need not be true. The developers' statement > sounds a bit overconfident. Thankfully I checked before sending very similar remarks as Laurenz's below.  I find OP's pair of sentences (borderline) self-contradictory. >> For that, you have to identify the statements that run longer than they >> should. Then examine them with EXPLAIN (ANALYZE, BUFFERS), figure out what >> makes them slow and improve them. >> >> Yours, >> Laurenz Albe >> >> >>