Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.3/8.6.3) with SMTP id BAA08899 for postgres-dist; Wed, 10 Nov 1993 01:39:23 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199311100939.BAA08899@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from efd.lth.se (root@kobra.efd.lth.se [130.235.48.18]) by nobozo.CS.Berkeley.EDU (8.6.3/8.6.3) with ESMTP id BAA08890 for <postgres@postgres.berkeley.edu>; Wed, 10 Nov 1993 01:39:19 -0800
Received: from efd.lth.se [130.235.51.10] (baal.efd.lth.se) by kobra.efd.lth.se
	with smtp (perl jhmail 0.20)   id 2cdf880f_7421_1 ;
	Tue, 9 Nov 1993 13:07:43 MET
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Message-Id: <m2cdf880f_7421_1@kobra.efd.lth.se>
Date: Tue, 09 Nov 1993 13:13:04 MET
From: Joergen Haegg <jh@efd.lth.se>
To: postgres@postgres.Berkeley.EDU
Subject: locking in postgres 4.1
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Wed, 10 Nov 93 01:39:21 -0800
Resent-XMts: smtp




This may be a FAQ but can anyone explain this to me?

What should I do to make sure not to corrupt data when several processes
updates the same class?

I tried to use begin/end. Problem is that I get the old data when the
lock releases. And no indication of this at 'end'.

I try to do like this:

Process A:
spog > begin
BEGIN successful

Process B:
spog > begin
BEGIN successful

Process A:
spog > retrieve (testa2.all)
 23           49         =20
 323          849        =20
 444          8383       =20
 444          8383       =20
spog > replace testa2(nn=3D11111) where testa2.u =3D "323"
REPLACE successful

Process B:
spog > retrieve (testa2.all)
 23           49         =20
 444          8383       =20
 444          8383       =20
 323          11111
spog > retrieve (testa2.all)
NOTICE:Nov  9 13:08:35:Timeout -- possible deadlock
WARN:Nov  9 13:08:35:WaitOnLock: error on wakeup - Aborting this transacti=
on

???
Why this?

I would want process B to hang until process A executes 'end', and
then the data should be updated when B reads it.

Why can't I do this?

--------
Joergen Haegg				jh@efd.lth.se
System manager @ efd			Phone: international +46 46 107492
Lund Institute of Technology		Snailmail: DDG, Maildelivery 7, BOX 118
Fax: +46 46 104013			S-221 00 LUND, Sweden

"I wish there was a knob on the TV to turn up the intelligence.
There's a knob called `brightness', but it doesn't work."
		-- Gallagher
