Search Postgresql Archives

Re: shared Locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux