Re: Listen / Notify rewrite

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Listen / Notify rewrite
Дата
Msg-id 407d949e0911130559k3b1674e9sad88db08e3508d88@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Listen / Notify rewrite  (Andrew Chernow <ac@esilo.com>)
Ответы Re: Listen / Notify rewrite
Список pgsql-hackers
On Fri, Nov 13, 2009 at 1:47 PM, Andrew Chernow <ac@esilo.com> wrote:
> This is what I think the people's real problem is, the implementation
> becomes a more complex when including payloads (larger ones even more so).
>  I think its a side-track to discuss queue vs condition variables.  Whether
> a notify is 20 bytes through the network or 8192 bytes doesn't change its
> design or purpose, only its size.
>
> Calling this a creeping feature is quite a leap.

It's true that the real creep is having the payload at all rather than
not having it. But having fixed-size data also makes the
implementation much simpler as well.

One person described stuffing the payload with the primary key of the
record being invalidated. This means the requirements have just gone
from holding at most some small fixed number of records bounded by the
number of tables or other shared data structures to holding a large
number of records bounded only by the number of records in their
tables which is usually much much larger.

Now you're talking about making the payloads variable size, which
means you need to do free space management within shared pages to keep
track of how much space is free and available for reuse.

So we've gone from a simple hash table of fixed size entries
containing an oid or "name" datum where we expect the hash table to
fit in memory and a simple lru can handle old pages that aren't part
of the working set to something that's going to look a lot like a
database table -- it has to handle reusing space in collections of
variable size data and scale up to millions of entries.

And I note someone else in the thread was suggesting it needed ACID
properties which makes space reuse even more complex and will need
something like vacuum to implement it.

--
greg


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: next CommitFest
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: next CommitFest