Re: Testing patches

Lists: pgsql-hackers
From: Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)ca>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Testing patches
Date: 2003-05-23 20:11:50
Message-ID: Pine.SOL.4.33.0305231604080.15232-100000@innovate
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)ca>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Testing patches
Date: 2003-05-26 04:19:18
Message-ID: 20030526041918.GA13907@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)ca>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Testing patches
Date: 2003-05-26 06:22:54
Message-ID: 25873.1053930174@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)ca>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Testing patches
Date: 2003-05-26 06:28:02
Message-ID: 25903.1053930482@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)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