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 1tZVj4-00ANbn-TH for pgsql-general@arkaria.postgresql.org; Sun, 19 Jan 2025 13:52:31 +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 1tZVi4-007TI6-Ji for pgsql-general@arkaria.postgresql.org; Sun, 19 Jan 2025 13:51:29 +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 1tZVi4-007THu-4j for pgsql-general@lists.postgresql.org; Sun, 19 Jan 2025 13:51:28 +0000 Received: from st43p00im-zteg10063401.me.com ([17.58.63.175]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tZVi2-000OG1-0G for pgsql-general@lists.postgresql.org; Sun, 19 Jan 2025 13:51:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2bz.de; s=sig1; bh=JU+W/WmDRTZRqf2fFK1B+bd1oUT8DGnjvmcCmXliavk=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To:x-icloud-hme; b=iGDV+QdhK3zsdt7xWMAwn1tj2ENHxu7Ah1AAFXt4odHxOtXzk4DjxyhAjZd5tzjEs 6S0w7mHpDNTQdZwehaK8/aqpYsa1ddVIEKT7xrNJ8t23YOc+T5b6emGVHgPoZAf/qt iaHvxMwXQE7G2MFxtpyHIFMSrAZm1S3gFByy9U8etOleOOJWP5lPIKYvtM5/PmOdLV ItrzFo07nkl1ITukKfBTX0JHzyfB5vf2MauPDTgug0nInWp+353QHtN8Q4D1YrRQpD RBlrjEvM0/v+bU8lkYcnJTGv2jD5WGJaYIX1nurGA8jO4drilWT+Utu74O8jpgyTCD pRRBmMvNdeVSw== Received: from smtpclient.apple (st43p00im-dlb-asmtp-mailmevip.me.com [17.42.251.41]) by st43p00im-zteg10063401.me.com (Postfix) with ESMTPSA id C0D88A802F1; Sun, 19 Jan 2025 13:51:23 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: pg_repack and locks From: Boris Zentner In-Reply-To: <000001db6a70$ebb65c80$c3231580$@yahoo.fr> Date: Sun, 19 Jan 2025 14:50:51 +0100 Cc: depesz@depesz.com, pgsql-general@lists.postgresql.org Message-Id: <23762638-50B3-4406-8757-6EACE2F97FAA@2bz.de> References: <000001db6a70$ebb65c80$c3231580$@yahoo.fr> To: nicolas75_fr@yahoo.fr X-Mailer: iPhone Mail (22D5055b) X-Proofpoint-ORIG-GUID: dIgC3_YsIev8hv6sslkWOAIUvyJr3PNR X-Proofpoint-GUID: dIgC3_YsIev8hv6sslkWOAIUvyJr3PNR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-19_01,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=697 adultscore=0 phishscore=0 mlxscore=0 spamscore=0 bulkscore=0 suspectscore=0 clxscore=1030 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2501190105 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi there, I think you can use -T 3600 -D If you don't want to kill the backends.=20 -- Boris > Am 19.01.2025 um 13:52 schrieb nicolas75_fr@yahoo.fr: >=20 > =EF=BB=BFHi >=20 > Thanks for the help but this will not help, killing other process is not s= afe > The good way will be that pg_repack tools include a timeout so, that after= expiration delay, he will stop waiting and discard the repack action >=20 > But thanks again for your proposition. > Regards, > Nicolas >=20 > -----Message d'origine----- > De : depesz@depesz.com > Envoy=C3=A9 : lundi 13 janvier 2025 16:42 > =C3=80 : nicolas > Cc : pgsql-general@lists.postgresql.org > Objet : Re: pg_repack and locks >=20 >> On Mon, Jan 13, 2025 at 12:40:06PM +0000, nicolas wrote: >> Hello everyone, >>=20 >> We are using postgresql v12 and added the pg_repack package >>=20 >> Since I cannot stop other process, I use the =E2=80=9C--no-kill-backend=E2= =80=9D and >> Pg_repack will wait indefinitly until pg_repack get the lock >>=20 >> I get sometimes a problem of lock: >>=20 >> sometimes, I get indefinitly this message : =E2=80=9CNOTICE: Waiting for 1= transactions to finish. First PID: xxxx=E2=80=9D >>=20 >> this is a real problem because the database is usd all the time. >> If I kill the process, a trigger on source table will still exist and te= mporary tables and type still exists in the repack schema. The tables are no= t empty if data has been modified in the source table during the repack. >>=20 >> If I drop table repack tables, I will loose all data modifications >> done on source table how can I properly cleanup the database ? >=20 > Allow it to kill offending backends after some time? For example -T 7200? >=20 > Best regards, >=20 > depesz >=20 >=20 >=20 >=20