pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: William West <wwest@csc.com>
To: pgsql-interfaces@postgresql.org
Subject: Interaction between Cursor and Transaction storage?
Date: Sat, 22 Mar 2003 16:40:39 -0500
Message-ID: <OFE27EB348.9CD7675C-ON85256CF1.006C5BAF@com> (raw)

Could someone please clarify how Cursor storage
and uncommitted Transaction storage interact with
each other?

We are using the ECPG interface to 7.2.1 on
RedHat Linux 7.2, to whatever extent that affects
the answer to this set of questions.
....
OUR APPLICATIONS

[RW-APP: Read-Write Application]

There is an always-running Application Process with a
fe-be session performing inserts and updates

[RO-APP: Read-Only Application]

There is another infrequently started Application
Process that every once in awhile makes another
fe-be session. This Application scans through the
DB by opening Cursors on various parts of the DB,
fetching from the Cursors, closing the Cursors, then
closing its fe-be session and exiting.
.....
It is our understanding that Transactions will see to
it that RO-APP Cursor opens will see only whatever
RW-APP most recently  committed prior to the time
RO-APP opens its Cursor, because uncommitted
RW-APP Transactions are held in session-specific
storage pending RW-APP performing a commit or
a rollback.

The design of RO-APP expects and allows for this.
......
Our questions come from the fact that it is unclear to
us just exactly how open Cursor storage interacts
with uncommitted Transaction storage?

QUESTION 1:

Should RO-APP be doing anything other than closing
the Cursors, to tell the Engine to just 'cleanup' when
RO-APP is about to close its fe-be session and exit?

QUESTION 2:

Will an attempt by the RW-APP to do a commit or rollback
while the RO-APP is fetching through an open Cursor cause
RW-APP to wait until RO-APP closes the Cursor?

QUESTION 3:

Will an attempt by the RO-APP to open a Cursor while
the RW-APP is performing a commit or rollback cause
RO-APP to wait until RW-APP finishes its commit/
rollback?
....
Thanks for reading such a long question.




view thread (3+ messages)  latest in thread

Message-ID: <OFE27EB348.9CD7675C-ON85256CF1.006C5BAF@com>
Permalink:  ../OFE27EB348.9CD7675C-ON85256CF1.006C5BAF@com/
Also on:    postgresql.org/message-id/OFE27EB348.9CD7675C-ON85256CF1.006C5BAF@com

 · 

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: pgsql-interfaces@postgresql.org
  Cc: wwest@csc.com
  Subject: Re: Interaction between Cursor and Transaction storage?
  In-Reply-To: <OFE27EB348.9CD7675C-ON85256CF1.006C5BAF@com>

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

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