Re: adding new field

From: "ranbeer makin" <ranbeer(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: adding new field
Date: 2006-06-06 16:14:04
Message-ID: a0eedc000606060914h5b24928eu9c050df30f789fd2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hey,
let me clarify something.....

1. Whenever you run a query, its result or some other thing gets cached. I
want to flush this cache? Also let me know when this cache gets flushed
automatically.

2. After adding a new field in Resdom structure and making necessary changes
in outfuncs.c, createfuncs. etc files, I *sometimes* get garbage value for
the field added. The field is initialiazed to zero in makefuns.c....

3. **IMP*** Is there something in postgres that, only for N number of
fields, of a structure, the memory is allocated, i.e., do I need to modify
this "N" somewhere to reflect the addtion of a new field.

And that *weird* thing is:

1. I run some query, didn't get results.
2. Then, I commented the part which I modified [ i.e., commented that new
field in Resdom structure], again run the same query, got results.
3. Next, I uncommented that part, and ran the same query again. I GOT THE
RESULTS.

That's how my prog is behaving, behaving in a *weird* way. It seems like
some memory probs somewhere. I can't figure it out. Yes, I'm re-compiling
and running initdb whenever I make some modifications in the code.

I'm using release 8.03 and due to some reasons can't shift to some other
release.

Regds,
Ranbeer

On 6/6/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> > On Mon, Jun 05, 2006 at 11:24:09PM +0530, ranbeer makin wrote:
> >> 2. I have added a new field in RESDOM structure, made necessary
> >> modifications in outfuncs.c, copy, read, equalfuncs.c ....but my prog
> is
> >> behaving in a weird way, seems like some memory probs...What other
> >> modifications needs to be done to reflect the addition of this new
> field?
>
> > Did you remember to recompile *everything* affected? (--enable-depend
> > is useful for this). You also have to initdb again.
>
> Also, if you're working on a patch you hope to someday contribute, you
> should be starting from CVS HEAD or some reasonable approximation of it.
> Resdom disappeared more than a year ago:
> http://archives.postgresql.org/pgsql-committers/2005-04/msg00060.php
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-06 16:19:47 Re: AIX check in datetime.h
Previous Message Tom Lane 2006-06-06 16:13:02 Re: AIX check in datetime.h