Re: Proposal: Snapshot cloning

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Proposal: Snapshot cloning
Дата
Msg-id 1169820567.3368.13.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Proposal: Snapshot cloning  ("Simon Riggs" <simon@2ndquadrant.com>)
Ответы Re: Proposal: Snapshot cloning  ("Simon Riggs" <simon@2ndquadrant.com>)
Re: Proposal: Snapshot cloning  ("Simon Riggs" <simon@2ndquadrant.com>)
Список pgsql-hackers
Ühel kenal päeval, R, 2007-01-26 kell 12:25, kirjutas Simon Riggs:
> On Thu, 2007-01-25 at 22:19 -0500, Jan Wieck wrote:
> 
> > The idea is to clone an existing serializable transactions snapshot 
> > visibility information from one backend to another. The semantics would 
> > be like this:
> > 
> >      backend1: start transaction;
> >      backend1: set transaction isolation level serializable;
> >      backend1: select pg_backend_pid();
> >      backend1: select publish_snapshot(); -- will block
> 
> Great idea. It can also be used by pg_dump to publish its snapshot so
> that we can make VACUUM continue to process effectively while it pg_dump
> is running.

Do you mean we that vacuum would clean up tuples still visible to
pgdump ?

> Two questions:
> - why does it have to block? I don't see any reason - the first process
> can begin doing useful work. The second process might fail or itself be
> blocked by something.

As I see it, it has to block so that it's transaction woud not end so
that the system knows that it can't yet remove tuples in that snapshot.

And it should block util all its consumers have ended their use of the
published snapshot

> - why just serializable snapshots?

There s probably no point to aquire it into read-commited transaction
when the next command will revert to its own snapshot anyway.

-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: [pgsql-patches] pg_dump pretty_print
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Piggybacking vacuum I/O