Thread: tsearch2 memory alloc checks

tsearch2 memory alloc checks

From
"Nigel J. Andrews"
Date:
This should apply cleanly to cvs tip.

I've not changed any malloc/calloc to palloc. It looks to me that these memory
areas are for the lifetime of the backend and in the interests of not breaking
something that's not broken I left alone.

Note for anyone reading this and wanting it for tsearch-v2-stable (i.e. for 7.3
backend) this patch probably will not apply cleanly to that source. It should
be simple enough to see what's going on and apply the changes by hand if need
be.


--
Nigel J. Andrews

Attachment

Re: tsearch2 memory alloc checks

From
Bruce Momjian
Date:
This has been saved for the 7.5 release:

    http:/momjian.postgresql.org/cgi-bin/pgpatches2

---------------------------------------------------------------------------

Nigel J. Andrews wrote:
>
> This should apply cleanly to cvs tip.
>
> I've not changed any malloc/calloc to palloc. It looks to me that these memory
> areas are for the lifetime of the backend and in the interests of not breaking
> something that's not broken I left alone.
>
> Note for anyone reading this and wanting it for tsearch-v2-stable (i.e. for 7.3
> backend) this patch probably will not apply cleanly to that source. It should
> be simple enough to see what's going on and apply the changes by hand if need
> be.
>
>
> --
> Nigel J. Andrews

Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: tsearch2 memory alloc checks

From
"Nigel J. Andrews"
Date:
On Sat, 27 Sep 2003, Bruce Momjian wrote:
>
> This has been saved for the 7.5 release:
>
>     http:/momjian.postgresql.org/cgi-bin/pgpatches2

Are you sure Bruce? I'd say this is bug fixing.

Although it doesn't fix the underlying cause of the fault it does cover the
specific fault generated and reported by someone. Athough that was running in
a 7.3 server I believe, this addresses the same fault in the 7.4 contrib.


>
> ---------------------------------------------------------------------------
>
> Nigel J. Andrews wrote:
> >
> > This should apply cleanly to cvs tip.
> >
> > I've not changed any malloc/calloc to palloc. It looks to me that these memory
> > areas are for the lifetime of the backend and in the interests of not breaking
> > something that's not broken I left alone.
> >
> > Note for anyone reading this and wanting it for tsearch-v2-stable (i.e. for 7.3
> > backend) this patch probably will not apply cleanly to that source. It should
> > be simple enough to see what's going on and apply the changes by hand if need
> > be.


Re: tsearch2 memory alloc checks

From
Bruce Momjian
Date:
Nigel J. Andrews wrote:
> On Sat, 27 Sep 2003, Bruce Momjian wrote:
> >
> > This has been saved for the 7.5 release:
> >
> >     http:/momjian.postgresql.org/cgi-bin/pgpatches2
>
> Are you sure Bruce? I'd say this is bug fixing.
>
> Although it doesn't fix the underlying cause of the fault it does cover the
> specific fault generated and reported by someone. Athough that was running in
> a 7.3 server I believe, this addresses the same fault in the 7.4 contrib.

Oh, OK. I wasn't clear on that.  I will move it to the 7.4 queue:

---------------------------------------------------------------------------

Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------



--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: tsearch2 memory alloc checks

From
Bruce Momjian
Date:
Patch applied.  Thanks.

---------------------------------------------------------------------------



Nigel J. Andrews wrote:
>
> This should apply cleanly to cvs tip.
>
> I've not changed any malloc/calloc to palloc. It looks to me that these memory
> areas are for the lifetime of the backend and in the interests of not breaking
> something that's not broken I left alone.
>
> Note for anyone reading this and wanting it for tsearch-v2-stable (i.e. for 7.3
> backend) this patch probably will not apply cleanly to that source. It should
> be simple enough to see what's going on and apply the changes by hand if need
> be.
>
>
> --
> Nigel J. Andrews

Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073