Re: shared Locks
От | Daniel Schuchardt |
---|---|
Тема | Re: shared Locks |
Дата | |
Msg-id | dgoqvt$ifd$1@news.hub.org обсуждение исходный текст |
Ответ на | Re: shared Locks (Martijn van Oosterhout <kleptog@svana.org>) |
Список | 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
В списке pgsql-general по дате отправления: