public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michał Albrycht <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Why plpython functions increase transaction counter much more then plpgsql functions?
Date: Fri, 8 Nov 2024 18:44:40 +0100
Message-ID: <CACsoHGCsXBYbv__t2xDVxth1EroBTsO=SnfJror4HCy-XtN4Lg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CACsoHGCWgBJ4BKLtC=Q305WBEM+K2fj3BmzvEVYEGRg896QOYg@mail.gmail.com>
	<[email protected]>

>
> A quick look at PLy_spi_execute_query shows that it runs each command
> in a subtransaction.  It pretty much has to, because the coding rules
> for a Python method don't permit it to just longjmp out of the Python
> interpreter, so it has to set up a subtransaction so it can catch any
> error.  In this example, each subtransaction will consume an XID.
>
> That makes sense. Thank you very much.
Regards,

Michał Albrycht


view thread (4+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Why plpython functions increase transaction counter much more then plpgsql functions?
  In-Reply-To: <CACsoHGCsXBYbv__t2xDVxth1EroBTsO=SnfJror4HCy-XtN4Lg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox