Re: [HACKERS] row reuse while UPDATE and vacuum analyze problem

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: [HACKERS] row reuse while UPDATE and vacuum analyze problem
Дата
Msg-id 3.0.5.32.19990728222940.00b222e0@mail.rhyme.com.au
обсуждение исходный текст
Ответ на Re: [HACKERS] row reuse while UPDATE and vacuum analyze problem  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
At 09:00 28/07/99 -0300, you wrote:
>On Wed, 28 Jul 1999, Oleg Bartunov wrote:
>
>Actually, there is a tought...if I understand the concept of MVCC, how is
>reusing a row going to work?  My understanding is that I can "physically"
>have to copies of a row in a table, one newer then the other.  So, if
>someone is running a SELECT while I'm doing an UPDATE, their SELECT will
>take the older version of hte row (the row at the time their SELECT
>started)...depending on how busy that table is, there will have to be some
>sort of mechanism for determining how 'stale' a row is, no?
>
>ie. on a *very* large table, with multiple SELECT/UPDATEs happening?
>

I presume that's part of MVCC - if PGSQL has a 'transaction id', then you
only need to keep copies of rows back to the earliest started active tx. In
fact, you only really need to keep versions to satisfy all currenct active
tx's (ie. you don't need *all* intermediate versions). You must also keep a
copy of a row prior to the current writer's update (until they commit).

There was talk a while back about doing a 'background vacuum' - did the
talk go anywhere, because reusing space is probably the only way to solve
the infinite growth problem.

----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: +61-03-5367 7422            |                 _________  \
Fax: +61-03-5367 7430            |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Arbitrary tuple size
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: [HACKERS] row reuse while UPDATE and vacuum analyze problem