Re: Index Page Split logging

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Index Page Split logging
Дата
Msg-id 20080102125403.GD8566@svana.org
обсуждение исходный текст
Ответ на Re: Index Page Split logging  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Ответы Re: Index Page Split logging  (Simon Riggs <simon@2ndquadrant.com>)
Re: Index Page Split logging  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Список pgsql-hackers
On Wed, Jan 02, 2008 at 04:46:11PM +0530, Gokulakannan Somasundaram wrote:
> > All indexes are done by user-defined functions, even b-trees. People can
> > make their own b-tree indexes by defining an operator class. Note that
> > "user-defined" is this case means anything called via the fmgr
> > interface.
>
> Again, i think i have one more wrong understanding. My understanding is,
> We are discussing about user-defined functions because, they might be
> actually be mutable functions, but the user might have classified as
> immutable.

This is where it gets a bit beyond by depth, so someone may have to
correct me. The point is that during the recovery the system is not yet
fully running and not everything works yet. For example, what happens
if the system crashed halfway through updating a page in pg_proc and
that page needs to be recovered from WAL. Yet to insert into the index
you need to be able to read pg_am, pg_amproc, pg_proc at least,
probably more.

The point being, you can't rely on anything except WAL during recovery.

> In our standard b-tree(with no user-defined operator classes), there
> shouldn't be any problem with replaying right?

Even inserting into our "standard b-tree" involves looking up the
operator class and associated functions and using the fmgr interface.
There is no difference in the system between the builtin operator
classes and "user defined" ones.

> Again shouldn't we say b-tree with user-defined op-classes as gist-btree? If
> not what is the difference between both?

gist-btree is a nice example but IIRC it takes more diskspace and can't
handle uniqueness.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

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

Предыдущее
От: "Gokulakannan Somasundaram"
Дата:
Сообщение: Re: Index Page Split logging
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Index Page Split logging