Skip site navigation (1) Skip section navigation (2)

[PATCH] Extending pg_class info + more flexible TOAST chunk size

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Extending pg_class info + more flexible TOAST chunk size
Date: 2008-10-12 13:32:46
Message-ID: 48F1FC7E.1060406@sun.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Bacause MAX_TOAST_CHUNK_SIZE is related on page layout version I need have toast 
chunk size more flexible.

Attached patch add three new columns into pg_class

relblocksize - which is always BLCKSZ. I put it there for fullness, but i could 
be use in future development to specify different BLCKSZ per relation.

relsegsize - currently it is always RELSEG_FILE. I performed basic adjustment in 
smgr.c and md.c. Now only smgropen contains reference to RELSEG_FILE. The 
problem how to do it fully dynamic is how to pass information rel_rd->relsegsize 
down into smgropen. One idea is to extend relfilenode, but I'm not sure about it.

relmaxitemsize - it is set to TOAST_MAX_CHUNK_SIZE. Other relation has this 
value set to zero for now. toast functions are fully aware about this setting 
and use it. This column will be convert to int2vector during pg_upgrade 
development (I need to track information for each page version).

Additional work could be add CRATE TABLE ... WITH chunksize=xxxx

Patch requires increase control file version and catalog version.

	thanks for your comments
			Zdenek

-- 
Zdenek Kotala              Sun Microsystems
Prague, Czech Republic     http://sun.com/postgresql


Attachment: pg_class.patch.gz
Description: application/x-gzip (6.0 KB)

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2008-10-12 13:46:11
Subject: Re: SELECT TOP %d PERCENT, or SELECT ... LIMIT %d PERCENT ?
Previous:From: Grzegorz JaskiewiczDate: 2008-10-12 13:07:14
Subject: Re: SELECT TOP %d PERCENT, or SELECT ... LIMIT %d PERCENT ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group