race condition in pgplsql call handler?

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: race condition in pgplsql call handler?
Date: 2007-05-11 08:23:05
Message-ID: 464427E9.6030101@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm looking into PG/PLSql code and following code in
plpgsql_call_handler looks strange:

/* Find or compile the function */
func = plpgsql_compile(fcinfo, false);

/* Mark the function as busy, so it can't be deleted from under
us */
func->use_count++;

I don't have deep knowledge about this part of code. But what happen if
in parallel execution "func" will be deleted between these two lines?

Zdenek

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-05-11 10:01:38 Re: Logging checkpoints and other slowdown causes
Previous Message Magnus Hagander 2007-05-11 08:15:09 Re: [pgsql-es-ayuda] Error SSL en Postgresql