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 1tGjE4-000LR0-IV for pgsql-general@arkaria.postgresql.org; Thu, 28 Nov 2024 18:26:52 +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 1tGjD3-000R1H-GF for pgsql-general@arkaria.postgresql.org; Thu, 28 Nov 2024 18:25:50 +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 1tGjD3-000R18-4b for pgsql-general@lists.postgresql.org; Thu, 28 Nov 2024 18:25:50 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tGjD0-0000y0-ID for pgsql-general@lists.postgresql.org; Thu, 28 Nov 2024 18:25:49 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-21262a191a5so9276635ad.0 for ; Thu, 28 Nov 2024 10:25:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifetrenz.com; s=google; t=1732818345; x=1733423145; darn=lists.postgresql.org; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=rjQtQHUyb4BtLXLNTZERw18m51mUeNVQkIA6TyWzrgw=; b=VaU/JR+EWek6zsBHdr07XpyQwJK3LOUjWWvywCP9AJPp4Xp2h65PUxTwWqw4HLUThH Ek158riemmI96MlLLl7RQ1IaCo8/0tkUbcSC/5VLC5gPaRqsUtoks1cfuv1snZLElQKQ xlHs2Qm7uaCRpE3GAdNS0paSTeeyZy/Nt+cFzKYgMVxCKKmA2S5TlWbrVw734yZjQdYo ajJ13tf5ywSrAgNAFkiSsAxbn2ZGH/UuYlc7RAT2ybBSvRgnpw5EreUHo17CBpJfbfzB qHEpiDodZ7C5cBNbLBLIdK7SaGTE5vC7pSNQvYi57gqJwuIQlAFrh/yEuccIikfkVwSn U5oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732818345; x=1733423145; h=to:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rjQtQHUyb4BtLXLNTZERw18m51mUeNVQkIA6TyWzrgw=; b=bfVCrYjDoD7tlEV44q/UIju36Ljh4vkq20rKBMol2xGi26vVHzKQhPXB7th0f2Z3OV w2RGD/G469iAT55mXJ+8oRNTJ1bUOLiw4xUGq9rAmGZSHU53bUWImFUNfvMHwQ/cmvAH 6z05WKEFRGabj87P4YqtKYMrgZk+fsaT9opy8l8WaH3TGdvimGfuO18h6sfS4mw+sdfL aMVpz2HQkbdJPCNBzd3cYYARsmRHKFnq83O7UNRQh/+jI3yXSKRWjb0wrWT2+9I35GXU texre52IMSvvl4RZsQ6F1L2QFdp+cQL3EqLPO3DCJuz1Lfb5I0mnT6ZTuAej74bcbK+B 59ow== X-Gm-Message-State: AOJu0YwCoCuBp7xsvSgMZ2NVABmd8qU1WXunbVU88BAxnlCjtrZ4XBfB kFbAakUt8suXe1lwWMTUN4LOzMhgBKUOXfyYcRMwZgKSiXG1VGPvg6Mz7osDQ4QlOCQnZhWWlVg awzn/RZZnAi1arpYhwFoql0GJ9+d05aTm7vn0i/XvV8qTy57DIduAeu9Tq/ESdzvcs7AdSfITG/ M5 X-Gm-Gg: ASbGncvCA7FM7TiAVVbljPUdVE2u7uZGMCZawKhFvCzuonksehzcvkAu1VsKWXMAxXj NXU9kx2bPHtAKlrMYoysLVIPcb4SmPan3UfobtXsfL19uCa3TdZ57v4d+AmtMhefjtMpvG/ZgzF BhC8FJ8vLPKKrg1euWzr2iNkIFIpq7fYzvjBYgS2H3qAnvd+3uK0gk9v2+fRML6DQRlbXnmsN6V W9/ss86RpJts2EpWgEFoVLvAmzD8OcuBkKP7Y4v+wG/aqRV1Y6dZXufNXWwAQupMwpeeA== X-Google-Smtp-Source: AGHT+IGWBdPry5JWHsnVtkti1ohT939Bjg6A/TYaDHIcJotx6kZ+1DI7W0kxTpMkZ93BLdDCigWetg== X-Received: by 2002:a17:902:ecc8:b0:215:2ecf:92ac with SMTP id d9443c01a7336-2152ecf9650mr31890715ad.30.1732818344524; Thu, 28 Nov 2024 10:25:44 -0800 (PST) Received: from smtpclient.apple ([171.76.83.238]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215219be843sm16511375ad.247.2024.11.28.10.25.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2024 10:25:44 -0800 (PST) From: Sreejith P Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.200.121\)) Subject: Delete Query slowdown Slave database. Message-Id: Date: Thu, 28 Nov 2024 23:55:31 +0530 To: pgsql-general@lists.postgresql.org X-Mailer: Apple Mail (2.3826.200.121) Content-Type: multipart/alternative; boundary="Apple-Mail=_21EC00C4-8464-4F32-9A02-33B8B8087BFA" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_21EC00C4-8464-4F32-9A02-33B8B8087BFA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" Hello, My doubt here is, in a master - slave (streaming replication) set up, when = I run a long running delete query for deleting 80 million records, . All qu= eries in slave started running 2- 5 mins all of a sudden. When I check SQL = analyse, most of the queries, planner used to choose seq scan, instead of s= eq scan.=20 What could be the possibility? How delete query running in Master affect secondary(Slave) DB. Is it related to shared memory ? NB: Problem solved after restarting slave servers.=20 Thanks Sreejith --=20 =A0 *Solutions for Care Anywhere* *dWise HealthCare IT Solutions Pvt.=20 Ltd.* | www.lifetrenz.com *Disclaimer*: The=20 information and attachments contained in this email are intended=20 for=20 exclusive use of the addressee(s) and may contain confidential or=20 privileged information. If you are not the intended recipient, please=20 notify the sender immediately and destroy all copies of this message and =20 any attachments. The views expressed in this email are, unless=20 otherwise=20 stated, those of the author and not those of dWise HealthCare IT Solutions= =20 or its management. --Apple-Mail=_21EC00C4-8464-4F32-9A02-33B8B8087BFA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="US-ASCII" Hello,

My d= oubt here is, in a master - slave (streaming replication) set up, when I ru= n a long running delete query for deleting 80 million records, . All querie= s in slave started running 2- 5 mins all of a sudden. When I check SQL a= nalyse, most of the queries, planner used to choose seq scan, instead o= f seq scan. 

What could be the possibi= lity?

How delete query running in Master affect se= condary(Slave) DB.

Is it related to shared memory = ?


NB: Problem solved after restarti= ng slave servers. 



<= div>Thanks
Sreejith


 

Solutions for= Care Anywhere


dWise HealthCare IT Solutions Pvt. Ltd. | www.l= ifetrenz.com
Discla= imer: The information and attachments contained in this email are intended=20 for exclusive use of the addressee(s) and may contain confidential or=20 privileged information. If you are not the intended recipient, please=20 notify the sender immediately and destroy all copies of this message and any attachments. The views expressed in this email are, unless=20 otherwise stated, those of the author and not those of dWise HealthCare IT = Solutions or its management.
--Apple-Mail=_21EC00C4-8464-4F32-9A02-33B8B8087BFA--