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 1sc78V-0041lR-Am for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 17:41:15 +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 1sc78S-00FihR-6N for pgsql-general@arkaria.postgresql.org; Thu, 08 Aug 2024 17:41:12 +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 1sc78R-00FihJ-PP for pgsql-general@lists.postgresql.org; Thu, 08 Aug 2024 17:41:11 +0000 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sc78N-003k6B-DS for pgsql-general@postgresql.org; Thu, 08 Aug 2024 17:41:10 +0000 Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-e0e6cbec8caso1161563276.1 for ; Thu, 08 Aug 2024 10:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723138866; x=1723743666; darn=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=DOL8rIcNxP36nNg0rgJpzhs0Tb79jLaH1MNeH1NuJGw=; b=UVAWEhYGxP6tqoKmdR6Qpv0ZUef2NZK0kGVIzjsfje1wcc9tOB1HXkt0WtKo1Q5hEM He9MUGVsGJ3CIxxEgXIJLLtpAtC7/SBiQPaJORxRUQBFeP5Gnvd13llMenwRUzyhVCCk e+dRLtlfLbAkjlbm+Lev182En3zzNKCHbNBYYzBbhLTxASxBJhGu6uecant2aDXngYVA GP8XTi9SQTrsnQ3gIOXo1rgD5ClxcjceB7aa8Qw7YkkBgLn9ewBe15wo7l9rs6E4pAoa q5VZwjkdYryV9qQDg1cKEw7j/wqY8BrscrWKLfp8f3EPsGGelRf8nf4Hvm2vNS1SW5Vl /HWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723138866; x=1723743666; 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=DOL8rIcNxP36nNg0rgJpzhs0Tb79jLaH1MNeH1NuJGw=; b=ab8e9efdVOsWuo5z3wVpnm0ozanW4S3Ly0fwhLFyTiP/V1euf1gfIW0j5z0poThb8C SEmvper3VR1tqopBv/FFc8/Kc5B3WaQgSmIPxDA3NmbA3A6hK78NHCRktLqFOVaghCXW lb349jitLqfApg8bnNbEErAE8iX6I9iBXf2QOEKFhMODnry+Az7zcTFT1Swq44bAFOay O3+Qo56De603VJ19Y1zPNTMNdcoG9c48sB8UrIMefMcmaD2uNMnOawNwNuAZ05JBchFe Pit85zAnx7Ld3w93dvnKsQyKjuDyh8GdORQYUXCi1zRnlkfcnu8YVmDodaP65cGgUqfB ojxg== X-Gm-Message-State: AOJu0YzNuzx4pjIDxGwR8wZlLnItonXCTdjSXoB8tQmPqNni/kKZmTKb f8ECmd16In1A1RagT9abLUlnbngbcEm4S7+LXWNw/o5J9UdRpuC/DLVI1synU7r0I43ZHsSiJIR woMvUIKBpTslzyUgCbojRsrAwFxk= X-Google-Smtp-Source: AGHT+IE1bIFDWbdHnSN/ntXeI8s3y4uvTSDmOXM/wsVVG9ebdWEs9dNvnO2zFwE+ea3rZG95YitOAmKbDY+apR8C28g= X-Received: by 2002:a05:6902:110e:b0:e0e:4892:6dfb with SMTP id 3f1490d57ef6-e0e9dc35f3bmr3443549276.54.1723138866375; Thu, 08 Aug 2024 10:41:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pavel Stehule Date: Thu, 8 Aug 2024 19:40:29 +0200 Message-ID: Subject: Re: Debugging set up for Postgres? To: James Creasy Cc: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="000000000000077643061f2f8845" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000077643061f2f8845 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi =C4=8Dt 8. 8. 2024 v 19:16 odes=C3=ADlatel James Creasy napsal: > Hi all, > > We've spent about 12 hours trying to set up a working debugger for psql > functions without success, trying both PGAdmin 4 v8.3 and DBeaver. > > The online searches turn up multiple instructions for Postgres 12 or > older, however we are using 16. Our extensions include PostGIS and > supporting extensions like SFCGAL. > > We can get the PGAdmin debugger to stop at a breakpoint, but as soon as i= t > exits a function, PGAdmin crashes ("error when executing continue") and h= as > to be restarted. > > We also tried direct debugging, but the inputs to our functions are often > json objects, and there isn't a way to paste such an object into the Valu= e > field. > > My question is: is there a way to effectively step debug psql functions i= n > Postgres 16 and how? > Do you think plpgsql functions? There should not be any change if I know - you need to use PLdebugger extension, and then you can use plpgsql debugger. Maybe you use more extensions that use plpgsql debug API in one moment - plprofiler, or plpgsql_check. This is not supported (plpgsql_check is exception, but it should be loaded last). Regards Pavel > > Thanks for reading, > > James > --000000000000077643061f2f8845 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

=C4=8Dt 8. 8. 2024 v=C2=A019:16 odes=C3=ADlat= el James Creasy <james@buildtrue.i= o> napsal:
Hi all,

We've spent about 12 hour= s trying to set up a working debugger for psql functions without success, t= rying both PGAdmin 4 v8.3 and DBeaver.=C2=A0

The o= nline searches turn up multiple instructions for Postgres 12 or older, howe= ver we are using 16. Our extensions include PostGIS and supporting extensio= ns like SFCGAL.=C2=A0

We can get the PGAdmin debug= ger to stop at a breakpoint, but as soon as it exits a function, PGAdmin cr= ashes ("error when executing continue") and has to be restarted.= =C2=A0

We also tried direct debugging, but the inp= uts to our functions are often json objects, and there isn't a way to p= aste such an object into the Value field.

My quest= ion is: is there a way to effectively step debug psql functions in Postgres= 16 and how?=C2=A0

Do you think= plpgsql functions?

There should not be any change= if I know - you need to use PLdebugger extension, and then you can use plp= gsql debugger.

Maybe you use more extensions that = use plpgsql debug API in one moment - plprofiler, or plpgsql_check. This is= not supported (plpgsql_check is exception, but it should be loaded last).<= /div>

Regards

Pavel

=C2=A0

Thanks for reading,

James
--000000000000077643061f2f8845--