Re: FW: Blocking access to the database??

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: FW: Blocking access to the database??
Дата
Msg-id Pine.LNX.4.33.0305291426380.30016-100000@css120.ihs.com
обсуждение исходный текст
Ответ на FW: Blocking access to the database??  ("Carlos Oliva" <carlos@pbsinet.com>)
Список pgsql-general
All the DDL in postgresql except for the truncate command are transactable
(and that one IS transactable in the upcoming 7.4 code right now.)

What that means is you can:

begin;
set transaction isolation level serializable;
alter table bubba rename lname to lfname;
create table...;
insert 10,000,000 rows;
anything else you can think ifl
commit;  OR rollback;

and either all of it goes through (i.e. commit,) or none does (i.e.
rollback).

Yes, one can do a SQL dump while users are modifying data.

If you do:

pg_dump dbname >dbname.sql

you will have a complete and coherent backup of your database as it
existed right at the start of the dump, and will see none of the changes
made since then.  It's all in the docs, here:

http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=backup.html



On Thu, 29 May 2003, Carlos Oliva wrote:

> If I had to reorganize the database, I would prefer to terminate the
> connections.  Any way to do that without having to restart the db
> server?  Could I kill the PID's for the users (Linux RedHat)
>
> In order to modify a user's permissions, must I restart the db server?
>
> Can one do an SQL-dump while users are modifying the data?
>
> -----Original Message-----
> From: Bruno Wolff III [mailto:bruno@wolff.to]
> Sent: Thursday, May 29, 2003 1:28 PM
> To: Carlos
> Cc: 'pgsql-general@postgresql.org'
> Subject: Re: [GENERAL] Blocking access to the database??
>
>
> On Thu, May 29, 2003 at 12:29:16 -0400,
>   Carlos <Carlos@pbsinet.com> wrote:
> > Hi Forum,
> >
> > Is there a way to block access to the database or terminate ongoing
> > connections while I carry-out updates or backups?
> >
> > Thanks in advance for your reply
>
> You could update pg_hba.conf and restart the database server.
>
> Are you sure you want to do that though? You can do consistant backups
> while the database is being updated by other people. And people will see
> a consistant view of the database if you do your updates properly.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Franco Bruno Borghesi
Дата:
Сообщение: Re: postgresql 7.3.3
Следующее
От: "Jay O'Connor"
Дата:
Сообщение: PLPGSQL problem with SELECT INTO