VACUUM ANALYZE and tuple size

Поиск
Список
Период
Сортировка
От Mikhail Terekhov
Тема VACUUM ANALYZE and tuple size
Дата
Msg-id 377D0850.5EB41EE7@emc.com
обсуждение исходный текст
Ответ на First 6.5 RPMs  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
Hi,

I've encountered a strange behavior of the VACUUM ANALYZE command.
It seems that this command works only if the size of a text field
does not exceed approximately 4050 bytes! So the real limit on 
tuple size is a half of the max tuple size. I've checked this effect
on Postgres 6.4.2 (Sparc Solaris 2.5.1) and Postgres 6.5 (SUSE 6.1 
Linux, kernel 2.2.5). Is this a bug or known feature?
The python script used to reproduce this problem and results for 
v6.4.2 and v6.5 are follows.

Regards,
Mikhail

===================================================================
#! /usr/bin/env python

import sys, pg

con = pg.connect('test', '', 5432, None, None)

try:   con.query("CREATE TABLE tmp (t text)")
except:   pass

for i in range(100) :   s = 'X'*(4050 +i)   print "size= %d" % len(s)   con.query("DROP TABLE tmp")   con.query("CREATE
TABLEtmp (t text)")   con.query("INSERT INTO tmp (t) VALUES ('%s')" % s)   try:       con.query("VACUUM ANALYZE tmp")
exceptpg.error,msg:       print msg       sys.exit()
 

print "OK"
===================================================================

SunOS luc1 5.5.1 Generic_105428-01 sun4u sparc SUNW,Ultra-5_10
python vacuum_chk.py
size= 4050
size= 4051
size= 4052
size= 4053
size= 4054
size= 4055
size= 4056
size= 4057
ERROR:  Tuple is too big: size 8184

===================================================================

Linux luc2 2.2.5 #4 Tue Apr 13 16:51:36 MEST 1999 i686 unknown
vacuum_chk.py
size= 4050
size= 4051
size= 4052
size= 4053
size= 4054
size= 4055
size= 4056
size= 4057
size= 4058
size= 4059
size= 4060
size= 4061
size= 4062
size= 4063
size= 4064
size= 4065
ERROR:  Tuple is too big: size 8188

===================================================================


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: [HACKERS] Re: First 6.5 RPMs
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: sgml tool