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

Re: get_relation_stats_hook()

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Postgres <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: get_relation_stats_hook()
Date: 2008-09-22 17:41:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
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
  Ask me about EnterpriseDB's 24x7 Postgres support!

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2008-09-22 17:43:16
Subject: FSM, now without WAL-logging
Previous:From: David E. WheelerDate: 2008-09-22 17:13:09
Subject: Re: Where to Host Project

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-09-22 18:19:02
Subject: Re: get_relation_stats_hook()
Previous:From: Ryan BradetichDate: 2008-09-22 05:30:34
Subject: Re: [PgFoundry] Unsigned Data Types [1 of 2]

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