From: | Dado Feigenblatt <dado(at)wildbrain(dot)com> |
---|---|
To: | psql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: locking and web interfaces |
Date: | 2001-10-24 01:58:57 |
Message-ID: | 3BD62061.2010003@wildbrain.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Aasmund Midttun Godal wrote:
>1. Could you perhaps edit individual rows instead of the whole table.
>
I'm not planning on locking tables, just rows.
>2. If you use persistant connections ala Apache::DBI you may not get back to the same child you talked to when you were locking so somebody doing something else would get the locked connection.
>
That is true. Subsequente accesses don't necessarily use the same
connection.
But the lock would still be in place for the same conection, uh?
Does anybody know of a Apache/Python (mod_python?) that would allow me
to do that?
I mean create a permanent connection and reserve it for exclusive use?
Does this kind of thing exist or is even allowed?
>3. You could make som sort of named connection jumping through hoops - hook up to a client via a named pipe which again is connected to the database server, and storing a cookie or similar to connect to that particular named pipe - Highly unrecommended.
>
I'm not going there.
>4. You could create a virtual locking table which says what table is locked by who, before allowing a new virtual lock, any client would check with that table.
>
I thought about it, but I have never seen anything about implementing
it. Are there any examples?
>5. Any kind of locking is often undesirable. remember postgresql supports mvcc!!
>
Why? I thought locking was the only way to go in multi-user environments.
Forgive my ignorance. What is mvcc?
Thanks
>Regards,
>
>Aasmund
>
>On Tue, 23 Oct 2001 10:08:23 -0700, Dado Feigenblatt <dado(at)wildbrain(dot)com> wrote:
>
>>Hi, I'm fairly new to this subject.
>>
>>How does locking work when accessing the database via web interfaces?
>>Usually applications work in a browsing mode. When you click the edit
>>button, the same data is presented in a form which can be submited for
>>update.
>>Is that necessary? If we don't consider the security problems of being
>>in 'edit mode' all the time, do we need to keep switching between modes?
>>And what I really want to know is that being web interfaces stateless,
>>whatever builtin locking you implement it will drop as soon as the web
>>server is done.
>>Would persistent connections fix this? Do people use this mode switching
>>to implement their own locks?
>>
>>Any pointers to literature on this?
>>
>>Thanks.
>>
>>PS: Should I send this to SQL? Whats the policy on cross-posting?
>>
>>--
>>Dado Feigenblatt Wild Brain, Inc.
>>Technical Director (415) 216-2053
>>dado(at)wildbrain(dot)com San Francisco, CA.
>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 4: Don't 'kill -9' the postmaster
>>
>
>Aasmund Midttun Godal
>
>aasmund(at)godal(dot)com - http://www.godal.com/
>+47 40 45 20 46
>
>
--
Dado Feigenblatt Wild Brain, Inc.
Technical Director (415) 216-2053
dado(at)wildbrain(dot)com San Francisco, CA.
From | Date | Subject | |
---|---|---|---|
Next Message | Keary Suska | 2001-10-24 02:02:56 | Re: openssl & postgresql |
Previous Message | guard | 2001-10-24 01:04:59 | "distributed databases " what time finish?? |