Обсуждение: Testing patches

Поиск
Список
Период
Сортировка

Testing patches

От
Nailah Ogeer
Дата:
I have made some changes to the buffer manager of postgresql-7.1.3 in
/storage/buffer and relcache.c in utils/cache. The
code makes fine but when i try to run initdb, it crashes. I have localized
the problem to template1.bki and the error seems to be occurring at the
INSERT statements. It is not liking them at all. Can anyone give me any
tips as to where I should be looking to try to fix this problem

thanks
nailah




Re: Testing patches

От
Alvaro Herrera
Дата:
On Fri, May 23, 2003 at 04:11:50PM -0400, Nailah Ogeer wrote:
> I have made some changes to the buffer manager of postgresql-7.1.3 in
> /storage/buffer and relcache.c in utils/cache.

The codebase has changed very much since 7.1.3 days.  Have you tried
adapting your patches to the 7.4 version (in CVS only) or the 7.3
released versions?

> The code makes fine but when i try to run initdb, it crashes. I have
> localized the problem to template1.bki and the error seems to be
> occurring at the INSERT statements. It is not liking them at all. Can
> anyone give me any tips as to where I should be looking to try to fix
> this problem

I've suffered from this pain before.  The only thing that I have been
able to do is run the initdb script by hand until the point of the
crash, and then run the exact commands in postgres.bki using a
standalone backend under a debugger.  Believe me, it's not a
particularly nice task.  But I haven't found another way.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Un poeta es un mundo encerrado en un hombre" (Victor Hugo)


Re: Testing patches

От
Tom Lane
Дата:
Nailah Ogeer <ogeer@cs.queensu.ca> writes:
> I have made some changes to the buffer manager of postgresql-7.1.3 in
> /storage/buffer and relcache.c in utils/cache. The
> code makes fine but when i try to run initdb, it crashes. I have localized
> the problem to template1.bki and the error seems to be occurring at the
> INSERT statements. It is not liking them at all. Can anyone give me any
> tips as to where I should be looking to try to fix this problem

Fooling with bufmgr and relcache wouldn't be my recommendation for what
to do in your first venture into backend programming ;-).  Have you
collected a stack trace to show where the crash is happening?
        regards, tom lane


Re: Testing patches

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> I've suffered from this pain before.  The only thing that I have been
> able to do is run the initdb script by hand until the point of the
> crash, and then run the exact commands in postgres.bki using a
> standalone backend under a debugger.  Believe me, it's not a
> particularly nice task.  But I haven't found another way.

The initdb environment isn't particularly debugger-friendly.  It'd seem
to me that bufmgr/relcache changes shouldn't impact the on-disk data
layout, and therefore could be tested and debugged in an already-created
installation.
        regards, tom lane