Re: STOP all user access except for admin for a few minutes?
От | |
---|---|
Тема | Re: STOP all user access except for admin for a few minutes? |
Дата | |
Msg-id | 000f01c73fd5$7a2dbbf0$0a00a8c0@animal обсуждение исходный текст |
Ответ на | Re: [GENERAL] Autovacuum Improvements (Darcy Buskermolen <darcy@ok-connect.com>) |
Ответы |
Re: STOP all user access except for admin for a few minutes?
|
Список | pgsql-hackers |
Ha ha... thx Tino Yes, I think this is way to go, strange how my mind climbs the wrong tree sometimes :) I actually need to aquire a transaction across several dB's, check if the conditions are right, and then modify some tables, write and remove some triggers. Transactions in postgres are 2 sophisticated, I dont think they will hold the locks at the level I need them. But I was thinking (climbing out of the wrong tree;)... I can just aquire exclusive locks on the tables, and hey presto, users are on hold while the software checks the dB's. Effectively creating a very rough transaction, with the lock scope needed? ... ie it will keep users out long enough to align several dB's... I'm hoping? From: "Tino Wildenhain" <tino@wildenhain.de> >> ================ maybe I'm in the wrong tree================ > > Yes I'm thinking that too: > >> Is it possible to make quick structural changes to postgres, with user >> activety? > > of course. > >> Maybe start a transaction that changes structure... wonder if that will >> stop or hold user activity??? > > Usually not - all your DDL is done in a transaction just like any other > access users would make. So it only fails (but as a whole) if you want > to modify locked tables and such. But you would not end up w/ a partly > changed database in any case. Just make sure you do everything in > a transaction. No need to suspend user accounts for that. > > > Regards > Tino > > >
В списке pgsql-hackers по дате отправления: