Re: [HACKERS] Arbitrary tuple size

From: wieck(at)debis(dot)com (Jan Wieck)
To: vadim(at)krs(dot)ru (Vadim Mikheev)
Cc: maillist(at)candle(dot)pha(dot)pa(dot)us, t-ishii(at)sra(dot)co(dot)jp, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Arbitrary tuple size
Date: 1999-07-09 09:19:53
Message-ID: m112Woz-0003kiC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Vadim wrote:

>
> Bruce Momjian wrote:
> >
> > > Bruce Momjian wrote:
> > > >
> > > > If we get wide tuples, we could just throw all large objects into one
> > > > table, and have an on it. We can then vacuum it to compact space, etc.
> > >
> > > Storing 2Gb LO in table is not good thing.
> > >
> > > Vadim
> > >
> >
> > Ah, but we have segemented tables now. It will auto-split at 1 gig.
>
> Well, now consider update of 2Gb row!
> I worry not due to non-overwriting but about writing
> 2Gb log record to WAL - we'll not be able to do it, sure.
>
> Isn't it why Informix restrict tuple len to 32k only?
> And the same is what Oracle does.
> Both of them have ability to use > 1 page for single row,
> but they have this restriction anyway.
>
> I don't like _arbitrary_ tuple size.
> I vote for some limit. 32K or 64K, at max.

To have some limit seems reasonable for me (I've also read
the other comments). When dealing with regular tuples, first
off the query to insert or update them will get read into
memory. Next the querytree with the Const vars is built,
rewritten, planned. Then the tuple is built in memory and
maybe somewhere else copied (fulltext index trigger). So the
amount of memory will be allocated many times!

There is some natural limit on the tuple size depending on
the available swapspace. Not everyone has multiple GB
swapspace setup. Making it a well known hard limit that
doesn't hurt even if 20 backends do things simultaneously is
better.

I vote for a limit too. 64K should be enough.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gene Sokolov 1999-07-09 10:41:10 Hashing passwords (was Updated TODO list)
Previous Message Jan Wieck 1999-07-09 08:27:49 Re: [HACKERS] Arbitrary tuple size