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 1sElF6-003SOO-L5 for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 07:39:34 +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 1sElF6-0068Rv-Ms for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 07:39:32 +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 1sElF6-0068Rk-8e for pgsql-general@lists.postgresql.org; Wed, 05 Jun 2024 07:39:32 +0000 Received: from mail-ua1-x932.google.com ([2607:f8b0:4864:20::932]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sElEz-0005Kc-T3 for pgsql-general@lists.postgresql.org; Wed, 05 Jun 2024 07:39:31 +0000 Received: by mail-ua1-x932.google.com with SMTP id a1e0cc1a2514c-80ac7d0905eso1688851241.0 for ; Wed, 05 Jun 2024 00:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717573164; x=1718177964; 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=ySMrTzYNTrCf1CLxzc7yrbvSk2h739+rpNFD1gpoE+g=; b=GpvOqxX1EZEt9OJU6fJCzpRN5pWTH4OBwrQrLqC2xtFJvod5Bfj9QdvCw9YQWpCaEr 1PkOeOyeb8DGnLz4degqaz0j0rHFC9wGdn0ONhSdv1fjSrgamm2HiaQdaccGiM0GdxRp RdLxu/Vkm8E0mfPJdhk8hcy+NPq1cd/CznpeHGvI98WhfQs5X+EdynbgOqLQKtZ9xjIi 79FSlM1LEmXZiJK+3nNc2X8AYDn795Cj/o9vUccTuV8nHwCSeKXJqQyptY6Fm/CJpbBQ yhMFxpKBaN/ztC/11V8AAXFHuOF7j6p73Y2wDS9gwjWGJ8iTFHqVLxYjscx5iZYvOCmO YACg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717573164; x=1718177964; 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=ySMrTzYNTrCf1CLxzc7yrbvSk2h739+rpNFD1gpoE+g=; b=RIlQp8RYbVyvOKGEOEcxZFrbiP+K6fSQ98dxLArVcTNR/2L9caDCv5iPl1LEV3Avua 6GYbF6Y4tvSsnnFpZIWzeb8iRfrd1TI4iMuznmd8+1EoT//rmbEUEULZPP/9+npHfcY0 o5PCdom01xcZPzCRZMgUJWRwNdnmshf9YlBjAKlGfzpSJxaKEK+oUePWCAtZoDagkN3b 1m+kSrBkQ7RFNRV9wCID9AkXGBjbLupnUsyvuDH6fdIv3mK3sCo0IUFwwT2D8Vug7ubv qSuJ9I7fKzQNj8IEtfPT7f5O0CGxsPGEKgKvN9b5y32QCgbIWZQgZnKe4AdKKPRguWnM LiZQ== X-Forwarded-Encrypted: i=1; AJvYcCWStuVeHp3rp+HM6a6j3wpTGTXQb43xAHz0p2BkPBrmmMj9PEPeu+v1Hgin2ul9KScm5C85liUXpCkkHCHjLFdRIKVFv4QWAujm2NGGWpxVOGTS X-Gm-Message-State: AOJu0YwmB2499k06aUX3hWh6CnQN8X9lKAnZYPk7iwSbw3WL5g0sfHJj vmsV1CTqzbaXOogL7uA+xpTbau4o72neggd6C5rqjzd24lOtIJfZHt9TobC9YsKQX/spPPFTKJD 6NysYkddgLwWumJqLJhjv21TY1V0= X-Google-Smtp-Source: AGHT+IHe+80BDswZMYGEfosVzmbD9FWxma8bbQGDgSC2v9qpNfrFa5o6muYsOPngxqr7KT8QJe19Eg0hdVPKVP+ggag= X-Received: by 2002:a05:6102:2856:b0:47f:251c:61df with SMTP id ada2fe7eead31-48c0492f13amr2208705137.27.1717573163728; Wed, 05 Jun 2024 00:39:23 -0700 (PDT) MIME-Version: 1.0 References: <891bcfec74f7358ef0212caf6565a35153dd2941.camel@cybertec.at> <56ad97911d83f721dd872e8ee68cd77d50d3eef6.camel@cybertec.at> In-Reply-To: From: sud Date: Wed, 5 Jun 2024 13:09:12 +0530 Message-ID: Subject: Re: Long running query causing XID limit breach To: Simon Elbaz , Laurenz Albe Cc: yudhi s , pgsql-general Content-Type: multipart/alternative; boundary="0000000000004cc5ca061a1faa8a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004cc5ca061a1faa8a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 5 Jun, 2024, 12:39 pm Simon Elbaz, wrote: > Hi, > > I am following this very interesting thread. > > From the documentation > https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-ID= LE-IN-TRANSACTION-SESSION-TIMEOUT, > the 0 value will disable the timeout (not -1). > > > > On Wed, Jun 5, 2024 at 8:25=E2=80=AFAM sud wrote: > >> Hello Laurenz, >> >> Thank you so much.This information was really helpful for us >> understanding the working of these parameters. >> >> One follow up question i have , as we are setting one of the >> standby/replica with value idle_in_transaction_session_timeout=3D-1 whic= h can >> cause the WAL's to be heavily backlogged in a scenario where we have a >> query running for very long time on that instance. So in that case will >> there be chances of instance restart and if that can be avoided anyway? >> >> And the plan is to set these system parameters with different values in >> writer/read replica , so in that case if we apply the "alter system" >> command on the primary , won't the WAL going to apply those same command= s >> forcibly on reader instance making those same as the writer instance >> configuration( but we want the reader replica configuration to be differ= ent >> from writer)? >> >> Appreciate your guidance. >> >> > My apologies. I was meant to say setting up "max_standby_streaming_delay" To -1. Which means unlimited lag. > --0000000000004cc5ca061a1faa8a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, 5 Jun, 2024, 12:39 pm Simon Elbaz, <elbazsimon9@= gmail.com> wrote:
Hi,

I am following this very interes= ting thread.

From the documentation https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-I= DLE-IN-TRANSACTION-SESSION-TIMEOUT, the 0 value will disable the timeou= t (not -1).



On Wed, Jun 5, 2024 at 8:25= =E2=80=AFAM sud <suds1434@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Hell= o Laurenz,

Thank you so much.This information was = really helpful=C2=A0for us understanding=C2=A0the working of these paramete= rs.

One follow up question i have , as we are sett= ing one of the standby/replica with value idle_in_transaction_session_timeo= ut=3D-1 which can cause=C2=A0the WAL's to be heavily backlogged in a sc= enario=C2=A0where we have a query running for very long time on that instan= ce. So in that case will there be chances of instance restart and if that c= an be avoided anyway?

And the plan is to set these= system=C2=A0parameters=C2=A0with different values in writer/read replica ,= so in that case if we apply the "alter system" command on the pr= imary , won't the WAL=C2=A0going to apply those same commands forcibly = on reader instance making those same as the writer instance configuration( = but we want the=C2=A0reader replica configuration to be different from writ= er)?=C2=A0

Appreciate=C2=A0your guidance.
=C2=A0
<= /div>
My apologies. I was meant to say setting up "= ;max_standby_streaming_delay" To -1. Which means unlimited lag.=C2=A0<= /div>
--0000000000004cc5ca061a1faa8a--