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 1tej2W-00FHE2-RO for pgsql-general@arkaria.postgresql.org; Sun, 02 Feb 2025 23:06:09 +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 1tej2V-008rQP-NY for pgsql-general@arkaria.postgresql.org; Sun, 02 Feb 2025 23:06:07 +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 1tej2V-008rQ3-Ch for pgsql-general@lists.postgresql.org; Sun, 02 Feb 2025 23:06:07 +0000 Received: from mail-il1-x142.google.com ([2607:f8b0:4864:20::142]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tej2S-002w3k-1x for pgsql-general@lists.postgresql.org; Sun, 02 Feb 2025 23:06:07 +0000 Received: by mail-il1-x142.google.com with SMTP id e9e14a558f8ab-3cfcf8b7455so30121295ab.3 for ; Sun, 02 Feb 2025 15:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738537562; x=1739142362; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=fditaHtuKqwp4axAa0z+u8aFV31Nba66uBeA9JCQUHY=; b=YrnwsF6vGAt8g6TroAsg8sRwbRVxIfnAk4Kb8EbsyFYTpmkm3fst2DZLoB1nd+icjq CIHK+4noM2ZXdLj4w3o5EZHpxIrlHwZ4QAIok5x+UZOSanJIJW0LapXGemwLfme8LTEk jZM4gHeurCyN6E+KYA5QC+Z0lcyjZHSGJ4xMKfl37cbXY9FCNaL4Aj/9m+x8b9xlGJ24 FOCgkjE14jb2ohccwuoMuehsnpGmBlA89MfQbURBrW2zcI+QHgLGZR1HFa0A+SXhcmUr uAItpqWZCTtC3tmbWBFZ63de4KzDnVAHJ4nwQ3gnn4n0XgQQGYQw6TvrmIzk8F0/Ney+ suMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738537562; x=1739142362; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fditaHtuKqwp4axAa0z+u8aFV31Nba66uBeA9JCQUHY=; b=fIyLDF5sXoKT1BRLGv38Ge2dXuxZWRInaQDA6sg8znClmdC7s0y/0oKfVUoBjF31wt 0gSDMyeLq/m9AnEJwpUKnYXb+0p11/LBFTFEK6BGJH8pGoctGsNv6M8KwF3MGoMa9mUc siSXS2sEknVYBNClRyfkxOqqRNC6b3DPpG21JA8MVHNfrc95QPCKF+NBwTgXf2A/7ZFz qmRQekqDInU3VuyV4ZsxRbvH+P1YTI27IE5F8OGDsNoSompqeVHsnieO0NN7rVOMrlyJ FqN9Uf20GpcJuWMcVNM1JAhxvhv3q3mHvIZB0ax4LH2Bb0P62aAWkVNZhEXbqfnYbrGw gN5A== X-Gm-Message-State: AOJu0Yw3Ruh5P2X+FVRr8hGC+RImcPjswsLLkAIRvQBRf4TmvfORvLT+ FWrC84AHT56S5aFkOQ7YWxA9UtuegaTHFLcwh64e34vUuJ847Nx2xt/HwtzoLQ9tjW5N8W8cTdD m/ligaR1INOMJwkM9/dphMtICNiCHnZgxqao= X-Gm-Gg: ASbGnctr47Qp15VZLJGSbPsDCv9Q5OXKnPFYLWvbeWD+5dMNj+ra/ncWlQByclbRvvt EBhfeRLrZ3FwatYEz8WjLNYABLFc67YwX/dQYzU83McDyx1Q0eWC7UTEotlDYqJYjnKIyJl5+tQ == X-Google-Smtp-Source: AGHT+IEXsMoCuUTAwXmxC1TtSgqC8n+AjvE7Xz0P1aFrBpTl+3vk7KkUFypOu1LhDTlit428MbXHJLshanUl11D9GP8= X-Received: by 2002:a05:6e02:1d82:b0:3d0:147a:b5da with SMTP id e9e14a558f8ab-3d0147ab721mr107285275ab.5.1738537562190; Sun, 02 Feb 2025 15:06:02 -0800 (PST) MIME-Version: 1.0 From: Marcelo Fernandes Date: Mon, 3 Feb 2025 12:05:51 +1300 X-Gm-Features: AWEUYZlLFOtB1s1qvRy_VgSNyHlpsXIyIk1vtD7FBX7c-Dd0oPhKagj5ntojyGE Message-ID: Subject: Logging queries executed by SPI_execute To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi there, I have been trying to debug what queries an extension is firing. After reading the code for the extension, I noticed that all the statements are fired via the SPI interface, most specifically, using the SPI_execute* family of functions. However, the problem is that these statements don't seem to feature in the logfile. It has become a bit of a "dead end" for me to fully analyse what queries are fired in the end. My postgresql.conf is fairly simple, but I have added "log_statement = 'all'" and thus was expecting to see information for these statements too. Is there anything I am missing? Some configuration or perhaps another way to find out about these statements? It may not be relevant, but the extension I am having a look at is pg_repack if anyone is interested. I am trying to get a deeper understanding of what the function repack_apply does. Thanks, Marcelo.