From: G. Anthony Reina <reina@nsi.edu>
To: reina@nsi.edu, "pgsql-questions@postgresql.org" <pgsql-sql@postgreSQL.org>
Subject: Reading and writing at the same time
Date: Fri, 23 Oct 1998 11:57:36 -0700
Message-ID: <3630D1A0.BBCD1F46@nsi.edu> (raw)
I know that Postgres has table-level locking so that once a write is
being performed on a table, no other reads or writes can be performed
until that write finishes.
I have a C program that performs several updates and inserts to a table.
I found that I am able, despite any table locking, to use the front-end
psql program at the same time to select data from the same table that is
being written to. So in essence, I am able to have one program that is
writing while at the same time another program reads (without running
into aborted backends).
So with table-level locking, does the postmaster completely abort any
backends that make a request while a write is being done; or, does the
postmaster simply tell the other backends to hold for a few seconds
until the write is completed and then let the new backend process?
-Tony Reina
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: reina@nsi.edu
Subject: Re: Reading and writing at the same time
In-Reply-To: <3630D1A0.BBCD1F46@nsi.edu>
References: <3630D1A0.BBCD1F46@nsi.edu>
* 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