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 1vidOX-00BooZ-2P for pgsql-general@arkaria.postgresql.org; Wed, 21 Jan 2026 18:57:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vidOV-008hb4-30 for pgsql-general@arkaria.postgresql.org; Wed, 21 Jan 2026 18:57:32 +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 1vidOV-008hau-1o for pgsql-general@lists.postgresql.org; Wed, 21 Jan 2026 18:57:31 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vidOT-001dg0-0S for pgsql-general@lists.postgresql.org; Wed, 21 Jan 2026 18:57:30 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4801d7c72a5so1518705e9.0 for ; Wed, 21 Jan 2026 10:57:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1769021848; x=1769626648; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=6mWl0PFpZU6ituI3e32gPrj8CeqQMFhWqIFxPQ9a0Ao=; b=rDASQwaNAiyRH2E11c1AGZSvDD60xJI5elsoEiFsgWS0Ss0j4tzoGvfFuSSLJIjmgL sk+77d7USUJeKYR+WMuMCloI+ZiHUtxEwua8pcu+XWu21gMvlJbNfdq5Bfkn3W6l9eLV IncNZ/H+ZN6rg0R2ADXaO1VA3FLbEzm7d04gOb7xPAkcRVALBY7fv0t3K1KfauT0pK/t EMVpF5LQGdSA4bMUICG0B1rF/XleWOMKg9GIB6h3BmUYpnxZc4visReRyxJxm7J/dCWh zh2dcqHlP7vcd+JGAwpHWHsvX6JSh8v2oJCia7xr7JM4XWZ8mKG0GDOYKjSItFIE8P8E XcvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769021848; x=1769626648; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6mWl0PFpZU6ituI3e32gPrj8CeqQMFhWqIFxPQ9a0Ao=; b=EeVOmWPjv5yRgC5n6td9HlU+cXTek/J8YXNxAim6ktPPKyysLUlQxJT2D/oQyy+1dm cfRsGJu6vDKwmVadb53SnYldFlpIJ/zYFZrlmuO0Qz0ZdeK036d4t73oAOATmcr1XMKj ZlugliCnYFKTzuQeif1FypiDdI7Z3VQ142PHeMcpPop3BU87IWWBoHLTbor+pI4bxaa+ AJZ/i9cFxbrgF5x4UyhSRRgEvlVUCv0YUWSvAipxCk2fgguqLNNxDS1RxIGRZ2+3OLLO y9XyRqUZclZtduUl17jbk5yJwDYwRG81GL/85HwxpY5tVuagk07F9qr4XY7uLr34IZP4 MzzA== X-Gm-Message-State: AOJu0YxWH45LjftXtjrbhmTVQi6duyvLdocGHM9OZxESoK6KgBcSwQYS Mj7kxCkCjWl81aY+7Mfn38f2ajV8vaxL38+aZlaCeUFT6MhRNfK+w7krZX4TzgE1CPA= X-Gm-Gg: AZuq6aI2DIEnHiqIjAZE3KtObNQ2I9gnycRRhAykHRycAJGqKoLjWC/nh3/vpoEQUVi vBRNPbHyEOshyIsy3HYZ+tzsEqegKcphFMg5JYBUXj2lHHk6Fjc5bg/WpgjWw8YsxlUzpuADpCb Ph6rq3ADeurHPGtUz9TtFmUKGqyq3JkpWEIQqtz/tEeM+oR7PPKJabA+9znxUaOHLoLrfFnOx5M moBMtO2vgsQx2U2K5cX4wT9l+YS4cKUBQGrJp2cHlUHIVdsMXOn26AvzM1XgEgfKO9WnjkR2GSu xarg1VOAGBxnPUhvPsYetqxQ63u7R/rNWNYV5xfWSKey4nTvEJHreDvUZ4lZmz5MqKlZqvB+9A+ pxDQn2fAUxkCkYpNapieHGQgMm7ghWYGAjfzRLD7rycDiisYMTEqd7GbWIWlCfCM1J95CihG6o0 eBldLFGbq2yOGzeRaqfdV8XABOqYxpIhHNuDrpxdli1w== X-Received: by 2002:a05:600c:46ce:b0:477:7b16:5f9f with SMTP id 5b1f17b1804b1-4801eb0efe0mr279694985e9.31.1769021848315; Wed, 21 Jan 2026 10:57:28 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:eba0:57d0:fe9a:970a:8aa6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-480424b64a8sm31416615e9.3.2026.01.21.10.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 10:57:27 -0800 (PST) Message-ID: <0dba883ce1ae2faa2ef061605d2147d148b7f52c.camel@cybertec.at> Subject: Re: pgBadger and postgres_fdw From: Laurenz Albe To: Colin 't Hart , Adrian Klaver Cc: PostgreSQL General Date: Wed, 21 Jan 2026 19:57:26 +0100 In-Reply-To: References: <31af308b-1689-44e8-ab88-f6a72722b38b@aklaver.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2026-01-21 at 17:12 +0100, Colin 't Hart wrote: > My question is how to identify which connections / queries from postgres_= fdw are > generating the `fetch 100 from c2` queries, which, in turn, may quite pos= sibly > lead to a feature request for having these named uniquely. I would inverstigate that on the remote database. If the user that postgres_fdw uses to connect is remote_user, you could ALTER ROLE remote_user SET log_min_duretion_statement =3D 0; Then any statements executed through postgres_fdw would be logged. If you have %x in log_line_prefix, you can find the DECLARE statement that = declared the cursor that takes so long to fetch. Not very comfortale, but it should= work. Yours, Laurenz Albe