public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: MVCC and all that...
Date: Wed, 10 Sep 2025 11:55:28 -0400
Message-ID: <CANzqJaAJ3NN5yv2FY+UBUm4vvz5y46yz=wK6LZaBtOsJ76KusA@mail.gmail.com> (raw)
In-Reply-To: <CALL-XeM=0oH=2ECawmyCOv2umKF1nyqr97CuQXiPfO39uhCucQ@mail.gmail.com>
References: <CAMLfE0MAVH5YORs0OKmD=fFWH9EtuNsnhViti=+hkp3Kbz-Gfw@mail.gmail.com>
	<CAHyXU0yrwoEYia0mZhpjQLMdd-WXpWFM+Au1jXQpk3MtBvdogw@mail.gmail.com>
	<CAMLfE0MWqALMJ99dpFniZ1xknCgHj4ETPWro+Ry9awPUG1OKMw@mail.gmail.com>
	<CAHyXU0y2gZfH_ZomazQB7H0KkuyV3QofvuvZcSYXEhpotG=hMA@mail.gmail.com>
	<CALL-XeM=0oH=2ECawmyCOv2umKF1nyqr97CuQXiPfO39uhCucQ@mail.gmail.com>

On Tue, Sep 9, 2025 at 8:41 PM Justin <[email protected]> wrote:
[snip]

> Multiple transactions per connection.  I am asking WHY is that a feature.
> when one can have multiple sessions, what is the difference?  running
> multiple transactions in single or multiple sessions means moving  part of
> transaction logic into the application space. What do we gain here.....
>

If I interpret "Multiple transactions per connection" correctly, they're a
great way to emulate WITH HOLD cursors.

For example:
1. In channel #1, open a Read Only cursor.  (Yes, this was long ago.)
2. Fetch a row.
3. Switch to channel #2, begin R/W txn, modify the table, commit.
4. Switch back to channel #1
5. Go to step 2.

Not being an application developer anymore, I've never needed to use WITH
HOLD cursors or wish for multiple channels in PG.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (21+ messages)  latest in thread

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]
  Subject: Re: MVCC and all that...
  In-Reply-To: <CANzqJaAJ3NN5yv2FY+UBUm4vvz5y46yz=wK6LZaBtOsJ76KusA@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