Re: experimental pg_qcache patch
От | Karel Zak |
---|---|
Тема | Re: experimental pg_qcache patch |
Дата | |
Msg-id | 20020414223932.A13461@zf.jcu.cz обсуждение исходный текст |
Ответ на | Re: experimental pg_qcache patch (Karel Zak <zakkr@zf.jcu.cz>) |
Ответы |
Re: experimental pg_qcache patch
|
Список | pgsql-hackers |
On Sun, Apr 14, 2002 at 10:13:17PM +0200, Karel Zak wrote: > > (2) Sometimes executing a PREPARE gives this warning: > > > > nconway=> prepare q1 as select * from pg_class; > > WARNING: AllocSetFree: detected write past chunk end in TransactionCommandContext 0x83087ac > > PREPARE > > > > Does anyone know what problem this indicates? > > The memory managment is diffrent between 7.0 and 7.2. There is > needful port cache shared-memory managment. I will look at it. Hmm, I probably found it be first look to patch file. The WARNING message is from leak detection. I'm sure that you seethis message if you use SHARE cache type. - PREPARE_KEY_PREFIX_SIZE is 4 not 3 - in the PrepareKey() is needful fix: + if (store == PREPARE_STORE_SHARE) { /* shared between same DB */ + *flag |= QCF_SHARE_NOTREMOVEABLE; + key = (char *) palloc(strlen(name) + PREPARE_KEY_PREFIX_SIZE + + strlen(DatabaseName) +1); ^^^^^^^ must be 3 + sprintf(key, "%s_%s_", DatabaseName, PREPARE_KEY_PREFIX); ^^^^^^ the space for '_' is not allocated :-( It's my bug probably, I good knew why we need leak detection :-) Karel PS. Sorry that I don't send a patch, but now I haven't my computer there. -- Karel Zak <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
В списке pgsql-hackers по дате отправления: