Internal errors when creating views ...
Internal errors when creating views ...
От:
marten@feki.toppoint.de
Дата:
Actually I've send this error notice to some pgsql newsgroups before, but I get no real answer to this problem. Now I've some further informations for you about this error. The error has nothing to do with column names or anything like this. It's an internal error of PostgreSQL and I've no idea how to solve it. I'm not very happy, that I get such errors with a database and we gave up the idea to use PostgreSQL for our application noew and we'll wait another year. Perhaps you may wonder how large such statements are. They are all statements created by a framework automatically and this framework works under several databases - Oracle, Sybase, DB2, Adabas etc. Now to the internal error: I create a table using the following statement without any problems: create table TDFROBJECT(PHID CHAR(15) NOT NULL,BLOCKED CHAR(15),CACHABLE CHAR(1),COMPANYID CHAR(15),DFPREVIOUSVERSIOID CHAR(15),DFRASCORDER CHAR(1),DFRATTCRTDODATETIM TIMESTAMP,DFRATTMODDODATETIM TIMESTAMP,DFRCONCRTDODATETIM TIMESTAMP,DFRCONMODDODATETIM TIMESTAMP,DFRDOCDATETIME TIMESTAMP,DFRRESOURCELIMIT INT4,DFRRESOURCEUSED INT4,DFRROOTID CHAR(15),DOCLAYOUTID CHAR(15),DOCOWNERID CHAR(15),DOCUMETYPATTRIBUID CHAR(15),ENDDATEANDTIME TIMESTAMP,INTFLGS INT4,PAGES INT2,PARENTDFROBJECTID CHAR(15),PHDOCLAYOUTID CHAR(15),PURGEDDATEANDTIME TIMESTAMP,REFERENCDFROBJECID CHAR(15),REFERENTDELETED CHAR(1),RELEASESTATE CHAR(1),STARTDATEANDTIME TIMESTAMP,VERSIONSTATE CHAR(1),DFRTITLE VARCHAR(80),OBJECTREFERENCE CHAR(15),OBJECTTYPE VARCHAR(30),FILENAME VARCHAR(30),ODMAAUTHOR VARCHAR(30),ODMDOCVERSION VARCHAR(25),ODMSUBJECT VARCHAR(80),ODMTITLETEXT VARCHAR(80),GROUPTYPE VARCHAR(30),SEARCHCRITERIA VARCHAR(30),SEARCHDOMAIN VARCHAR(30)) Then I try to create a view on this table and the following commands works: create view VTDFROBJECT AS SELECT OBJECTREFERENCE,PHID,BLOCKED,CACHABLE,COMPANYID,DFPREVIOUSVERSIOID,DFRASCORDER,DFRATTCRTDODATETIM,DFRATTMODDODATETIM,DFRCONCRTDODATETIM,DFRCONMODDODATETIM,DFRDOCDATETIME,DFRRESOURCELIMIT,DFRRESOURCEUSED,DFRROOTID,DOCLAYOUTID,DOCOWNERID,DOCUMETYPATTRIBUID,ENDDATEANDTIME,INTFLGS,PAGES,PARENTDFROBJECTID,PHDOCLAYOUTID,PURGEDDATEANDTIME,REFERENCDFROBJECID,REFERENTDELETED,RELEASESTATE,STARTDATEANDTIME,VERSIONSTATE FROM TDFROBJECT Now I add another column to the statement and it fails: create view VTDFROBJECT AS SELECT OBJECTREFERENCE,PHID,BLOCKED,CACHABLE,COMPANYID,DFPREVIOUSVERSIOID,DFRASCORDER,DFRATTCRTDODATETIM,DFRATTMODDODATETIM,DFRCONCRTDODATETIM,DFRCONMODDODATETIM,DFRDOCDATETIME,DFRRESOURCELIMIT,DFRRESOURCEUSED,DFRROOTID,DOCLAYOUTID,DOCOWNERID,DOCUMETYPATTRIBUID,ENDDATEANDTIME,INTFLGS,PAGES,PARENTDFROBJECTID,PHDOCLAYOUTID,PURGEDDATEANDTIME,REFERENCDFROBJECID,REFERENTDELETED,RELEASESTATE,STARTDATEANDTIME,VERSIONSTATE,DFRTITLE FROM TDFROBJECT The frontend gets the error message: "DefineQueryRewrite: rule plan string too big" The backend prints the following messages: SIIncNumEntries: table is 70% full, signaling postmaster pmdiew 12 ERROR: DefineQueryRewrite: rule plan string too big ! Software: PostgreSQL 6.5.1 under SuSE 6.1
Re: [INTERFACES] Internal errors when creating views ...
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
marten@feki.toppoint.de writes: > The frontend gets the error message: "DefineQueryRewrite: rule plan > string too big" Which means exactly what it says, I'm afraid. Jan has some ideas about supporting longer rules in 6.6 by compressing the rule definition, and the whole problem should go away when we implement unlimited-size tuples, but for now there is a definite and rather tight limit on the size of rules :-(. And of course, views are just a special case of rules. A partial workaround is to increase the disk block size from 8k to 16k or 32k in config.h. Note this requires a reinstall and initdb! regards, tom lane