Re: What locking mechanism is used for database backup and restore and Master-Slave Replication?

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема Re: What locking mechanism is used for database backup and restore and Master-Slave Replication?
Дата
Msg-id 2f4958ff1001210520s155fef76vb4c3e9b04bd5871c@mail.gmail.com
обсуждение исходный текст
Ответ на What locking mechanism is used for database backup and restore and Master-Slave Replication?  (John Mitchell <mitchelljj98@gmail.com>)
Ответы Re: What locking mechanism is used for database backup and restore and Master-Slave Replication?  (John Mitchell <mitchelljj98@gmail.com>)
Список pgsql-general
On Thu, Jan 21, 2010 at 1:12 PM, John Mitchell <mitchelljj98@gmail.com> wrote:
> Hi,
>
> In reading the documentation it states that the SQL dump backup does not
> block other operations on the database while it is working.
yes, pg_dump opens serializable transaction thus guarantees data to be
the exact snapshot (as opposed to the default isolation level, which
is called 'read commited' not without reason).
>
> I presume that while a restore is occurring that no reads or updates are
> allowed against the restored database.
nope, what restoring does, is just running all the commands in the
pg_dump (whether it is binary or textual). So as soon as the database
is created, it is treated just as any connection, thus allows you to
connect and use it.


> What locking mechanism is used for Master-Slave Replication?

master slave that's introduced in what's to be 9.0 (aka 8.5), uses WAL
shipping. So it doesn't require any extra locking.



--
GJ

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

Предыдущее
От: John Mitchell
Дата:
Сообщение: What locking mechanism is used for database backup and restore and Master-Slave Replication?
Следующее
От: John Mitchell
Дата:
Сообщение: Re: What locking mechanism is used for database backup and restore and Master-Slave Replication?