From: Gregory Stark <stark@enterprisedb.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Postgres <pgsql-hackers@postgresql.org>
Subject: Re: get_relation_stats_hook()
Date: Mon, 22 Sep 2008 18:41:48 +0100
Message-ID: <87fxnsoz6r.fsf@oxford.xeocode.com> (raw)
References: <1218062303.4549.302.camel@ebony.2ndQuadrant>
Hm, I assume we want to be able to turn on and off plugins in a running
session? I think the "free_using_plugin" flag:
! if (get_relation_stats_hook)
! vardata->statsTuple = (*get_relation_stats_hook)
! (rte->relid,
! var->varattno);
!
! if (vardata->statsTuple)
! vardata->free_using_plugin = true;
! else
! vardata->statsTuple = SearchSysCache(STATRELATT,
is insufficient to handle this. vardata->free_using_plugin could be true but
by the time the variable is released the plugin pointer could have been
cleared. Or worse, set to a different plugin.
The easiest way to fix this seems like also the best way, instead of storing a
boolean store the pointer to the release function.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-patches@postgresql.org
Cc: stark@enterprisedb.com, simon@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: get_relation_stats_hook()
In-Reply-To: <87fxnsoz6r.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox