Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] freefuncs.c is never called from anywhere!?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] freefuncs.c is never called from anywhere!?
Date: 2000-01-30 03:49:19
Message-ID: 13786.949204159@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> I was rather bemused to discover just now that the node-freeing
>> functions in nodes/freefuncs.c are never called from anywhere;
>> in fact, the module hasn't got a single exported entry point!

> Are you sure about this?  I thought these things were called from
> macros.

nm --defined --extern shows that freefuncs.o exports no symbols.
Therefore it's impossible for any outside code to refer to it.
(Hmm, I wonder if any other modules are equally dead?)

> I would perhaps move it to a _deadcode directory and see
> what happens.  Or should we enable it?

I certainly don't want to bit-bucket it --- I was just very surprised
that it's not currently being used.

After further consideration I realized that if RelationClearRelation
uses freeObject() to flush rules, then a DROP on a view will exercise
the code.  So it's not quite as hard to test as I was thinking before.
I'm leaning towards the "go for it" answer at the moment...

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-01-30 04:18:38
Subject: Re: ImmediateSharedRelationCacheInvalidate considered harmful
Previous:From: Bruce MomjianDate: 2000-01-30 03:18:09
Subject: Re: [HACKERS] freefuncs.c is never called from anywhere!?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group