Re: [HACKERS] Error "vacuum pg_proc"

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
Date: 1999-12-27 05:05:55
Message-ID: 199912270505.AAA00630@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> One thing this does bring up is that the maximum safe tuple length is
> >> dependent on the index or table type. The toaster's API had better
> >> be designed accordingly...
>
> > In talking to Jan, the index code will make use of the toast entries
> > automatically. He said the heap_insert will do any toasting, and after
> > that the tuple already has any toast pointers, and that gets inserted
> > into the index.
>
> If that's his plan, then it's broken by design. Toasting a complete
> tuple cannot be the basis for toasting index entries related to the
> tuple, because (a) the index entries will typically use only some of the
> fields appearing in the tuple; (b) index entries have different length
> limits than tuples do; (c) indexes might be created after the original

Yes, I see your point. This could be quite complicated. He is
targeting BLKSZ and indexes are BLKSZ/3. He could toast any single
attribute of size >= BLKSZ/3, but as you mentioned multi-column
indexes would be a problem. I wonder if he could create the TOAST
entries and modify the heap tuple during index creation?

Wow, this clearly is going to be messy. Maybe he is going to have to
have a separate TOAST table for the index. If he got fancy, he could
use the heap TOAST table as needed, and have a secondary index TOAST for
cases the tuple needs further TOASTS for indexes.

It shows we haven't thought through all this yet.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry 1999-12-27 06:34:49 Re: question about MS Access connect to Postgresql 6.5.2-1
Previous Message Tom Lane 1999-12-27 04:19:23 Re: [HACKERS] Error "vacuum pg_proc"