Re: shared Locks

From: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: shared Locks
Date: 2005-09-20 11:15:13
Message-ID: dgoqvt$ifd$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout schrieb:

>
>>Yes you'r right here. Because we use Cursor Fetch, every statement
>>starts a transaction. So your right I tested it and this forces a table
>>lock. Hm... i will look how to do this in another way.
>>
>>
>
>Just COMMIT when you're done. This does kill the cursor though...
>
>If you put a timeout in your app so that it commits that transaction
>after, say, 30 seconds idle then your ALTER commands will only wait for
>a while. Although, your ALTER will in turn block the following users...
>
>Is your biggest problem that people tend to leave connections open
>overnight or something? I simple timeout would work fine if there you
>only want to make changes when there are just a few active users.
>
>
Y i will try it this way. There are some other problems : Some
connections catch CNC-Center and other mashine data all over the time.
So its not that easy at all. But i will try it with a commit on idle.
And Reconnect on that 24h connections. (They sleep most of the time so
it would be a better technic to terminate the connection and reconnect
all 5 mins. It will save resources too)

Daniel

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Rylander 2005-09-20 12:00:55 Re: Implementing a change log
Previous Message Gábor Farkas 2005-09-20 10:40:58 how to read the transaction logs?