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 1qlDyd-001ovK-E1 for pgsql-general@arkaria.postgresql.org; Tue, 26 Sep 2023 19:44:11 +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 1qlDyc-00EbJ9-2f for pgsql-general@arkaria.postgresql.org; Tue, 26 Sep 2023 19:44:10 +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 1qlDyb-00EbIu-Ms for pgsql-general@lists.postgresql.org; Tue, 26 Sep 2023 19:44:09 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlDyZ-006nLs-Ak for pgsql-general@lists.postgresql.org; Tue, 26 Sep 2023 19:44:08 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-573e67cc6eeso6303827a12.2 for ; Tue, 26 Sep 2023 12:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695757446; x=1696362246; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8EzYogAA9QucrDDCi90UV1WOIplHAcb/BDVmN/OW0bU=; b=JGQ0RlqidEWUHSBwepI0jI7q7UmoAvWlSi3fVuIaydaVChDIiDham2HQUsmIECCk/W +I8VAX/qpOEyf34XwUDws1gFzG6LUsw8q9hzQ0aa0UhmPCrsp8O+Okgz9LE4JFi1+DAC KpNYorZMrxHt9lRzCbzOpltm1KreiNIRy/kFVdqY83OzhqBSWgrNhGS8DvW8EtwBR4zZ zD+DdiS0eSy5NsiL3k1ICINknUaegiZtxgoaQV+bm/vJ3JFuG8jGDfn6cTRp75N+U8yo esrxSlbRVhao2/caDWbWqkBR/cpKDGUpJqz2qQN5mH/aij/PBLrUgQjyjA1dz891O7Wy q0pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695757446; x=1696362246; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8EzYogAA9QucrDDCi90UV1WOIplHAcb/BDVmN/OW0bU=; b=ZuSw+O0xSoyAxNVK7X41AOqrme+i6j6UT4yO2o4ruBk2Soq9m1/ANOtwXUmyTW+BHx noYUimUMQzi6Xz7ASfVYAzL5JavqCyn0Unn8SwK9vISla4Aq+rDYu9Urto1tFBh7GF0X sDh5VNWsVm/M6u75zC0dUF2+t4McG4TkHFAE233rExGhyHtidg51AJmucNP3kPOwPcHO sh8k+Cz377MM1zdiBV41BvRl7Um+yFfeELCvfjIr60W+jM57iUvGatEXLdr/W9svdK6M RSId/Sp4H7R2yWKM6PUtI9J0MgZFhtJUVGt+kYtdADkX5d8u+4DSRCwhNm4EQGJzxT/t SHyA== X-Gm-Message-State: AOJu0YyBG6ZJsTGyLlV9lQ6jTFn+/bVEEcRzWvPCGD+VkTYXd9FC8xnH FS2YUNRFZFuu37S9Zp1oF7SWE4DjlYw3i4D8lE8= X-Google-Smtp-Source: AGHT+IGxnDOTXDXu23DFk1+fwj8laPdTfI362mZNvuFOxdMgksE1m3R6qTNUkZ9shYnwBtmD2xCSdaKWJd7Z+WbQVFA= X-Received: by 2002:a17:90b:1bc2:b0:274:99e7:217e with SMTP id oa2-20020a17090b1bc200b0027499e7217emr8334190pjb.16.1695757446292; Tue, 26 Sep 2023 12:44:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Maciek Sakrejda Date: Tue, 26 Sep 2023 12:43:54 -0700 Message-ID: Subject: Re: log_statement vs log_min_duration_statement To: Atul Kumar Cc: pgsql-general Content-Type: multipart/alternative; boundary="0000000000003628690606484c19" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003628690606484c19 Content-Type: text/plain; charset="UTF-8" On Tue, Sep 26, 2023, 12:34 Atul Kumar wrote: > What am I missing here to understand, because as per my understanding > log_statement and log_min_duration_statement are correlated, postgres > should log according to log_statement parameter. > The two settings are independent. One logs *all* statements in the specified category, and the other *all* statements that execute longer than the specified threshold. I don't believe there is a built-in way of getting the behavior you're looking for. --0000000000003628690606484c19 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Sep 26, 2023, 12:34 Atul Kumar <akumar14871@gmail.com> wrote:
What am I missing here to understa= nd, because as per my understanding log_statement and log_min_duration_stat= ement are correlated, postgres should log according to log_statement parame= ter.

The two settings are independent. One logs *all* statements in the sp= ecified category, and the other *all* statements that execute longer than t= he specified threshold. I don't believe there is a built-in way of gett= ing the behavior you're looking for.

<= div dir=3D"auto">
--0000000000003628690606484c19--