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 1taRDM-001ldk-9Q for pgsql-admin@arkaria.postgresql.org; Wed, 22 Jan 2025 03:15:36 +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 1taRDL-00AdUs-6J for pgsql-admin@arkaria.postgresql.org; Wed, 22 Jan 2025 03:15:35 +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 1taRDK-00AdUk-RP for pgsql-admin@lists.postgresql.org; Wed, 22 Jan 2025 03:15:34 +0000 Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1taRDI-000psa-2H for pgsql-admin@lists.postgresql.org; Wed, 22 Jan 2025 03:15:33 +0000 Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-85c4b4cf73aso1208748241.2 for ; Tue, 21 Jan 2025 19:15:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737515732; x=1738120532; 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=8ldisv5MzQLx68e9ToEs9bVY+6J1bq++8As0ZJktnAA=; b=eKx/iFyzPIkTJ/LlrM6ttGc/3uqWTD0ljmduaQoFfwAPCTc7yvo5+UEXjabyvTWh4P 6sQWAEoQJ69lbJQIU0VA1Wfuxl0F4rWijUs2MHqYCHx9fNZ8m503ggZ9U1XhviQTyVO4 xzZ92f+osCTJlY46/vNp5tB2ydmSFy+Fol4nhK9wTApbaPJB6/BHi8ObaN8kvffU+7cB lkqHH7+LkUpOAEB5CBP+IZBUBmC5UCA91OS7gUslNGiwYS5zy9ptpz3rS7LGr4Pbl12T cXNp309ktbS7JnLcEFg92LOeIXcLcJcdtKExiMhRPiBhGyPGke5sxVJLHdNtgxZOHP20 vm/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737515732; x=1738120532; 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=8ldisv5MzQLx68e9ToEs9bVY+6J1bq++8As0ZJktnAA=; b=h40aEmey4Eyh2VmNbAIBPYjmkAAccnSPII90gibnohN2jWS/i/IIXoDCC83VOfpMgo llsSkPND6ZfIhEox6SdgYhuOqxMRWrmPVKSP33VUOteKYkGMcaIDA3f5gtMCPIMXIczL LE1hK75dMGTCnxOwozu0XHi+d66NNMtJnKrT79TVmNcMss0WjiuEQy+sBv5raJr2fwvD 7/qxuiHQ68Q46VXjc4XAH2MVeik7LrpRU54SjjsFOoD2rYpnQW8ba/iPh6uVh3F4v4O8 rCBV/zXK4A/GFO+0jx4rqeaxS09IRFgbwDZx5ELbX6hFn09w5UKgrhRFH6yWQB9ClEyt tq1Q== X-Gm-Message-State: AOJu0YxJP/WTZgPX6Vn02X8o1fg27/s5Kru8tPPV1Vvkf5kbEN7erQWG qN+zu3WSJJQbLQcBpCgSFLM35SiBVduJ8r3r0+35Nt0h1PMPEbUqhP59sQYbObk9y9QdbRmh+U8 0t8/48z9V/yn9AptLJ4TORibsQiLH X-Gm-Gg: ASbGncu4dh9gRXUFSngmvbcnRr+9r7xR6R3dsUcR7+6flGL90LI24J+slcgTfIsMWUf uwH/VZaIBA2n5US9jhw6rg8J0oczK5D+896OnQd+OSwkPk/yRZ5HTvmYJQsRMXhH76WtbUkWHN0 8zqR7PrQg= X-Google-Smtp-Source: AGHT+IFqdA/fuvdn46NmjlclI00i4nOaTilkPgW15uKaXS+DpRyelTORweSbd8CbDXWZIqq0cZ6SxhSmtZPSX1hoNW0= X-Received: by 2002:a05:6102:c04:b0:4b6:5440:6cbb with SMTP id ada2fe7eead31-4b690ceb116mr16444143137.20.1737515732087; Tue, 21 Jan 2025 19:15:32 -0800 (PST) MIME-Version: 1.0 References: <00c201db6c13$7a1fbb80$6e5f3280$@msym.fr> In-Reply-To: <00c201db6c13$7a1fbb80$6e5f3280$@msym.fr> From: Jeff Janes Date: Tue, 21 Jan 2025 22:15:19 -0500 X-Gm-Features: AbW1kva7QF84ObcGJSf80nzmsStXipjT-lKH7SuJIGPDb5OatcuZyWqpOiD9550 Message-ID: Subject: Re: Commit with wait event on advisory lock! To: msalais@msym.fr Cc: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000000b92f062c42e804" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000000b92f062c42e804 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 21, 2025 at 9:48=E2=80=AFAM wrote: > Hi all, > > > > I have long commits on a production database. To know why this happens I > organized a snapshot system on table pg_stat_activity. > > When I check the result I have this row in it: > > > > postgres=3D# select * from public.fdj_ms_slow_stmts where pid =3D 2285947= \gx > What is the full version()? What is the query used to populate this snapshot table? Are the advisory locks being used as session-level locks or transaction-level locks? Cheers, Jeff --00000000000000b92f062c42e804 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Jan 21, 2025 at 9:48=E2=80=AFAM &= lt;msalais@msym.fr> wrote:
<= div class=3D"gmail_quote gmail_quote_container">

Hi all,

=C2=A0

I have long commits on a production database. To know why this happens= I organized a snapshot system on table pg_stat_activity.

When I check the result = I have this row in it:

=C2=A0

postgres=3D# select * from p= ublic.fdj_ms_slow_stmts where pid =3D 2285947 \gx


What is the full version()?=C2=A0 What = is the query used to populate this snapshot table?=C2=A0 Are the advisory l= ocks being used as session-level locks or transaction-level locks?

Cheers,

Jeff
--00000000000000b92f062c42e804--