Re: Patch to fix search_path defencies with pg_bench - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: Patch to fix search_path defencies with pg_bench
Date
Msg-id 20090507165850.GG3305@yugib.highrise.ca
Whole thread Raw
In response to Re: Patch to fix search_path defencies with pg_bench  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Patch to fix search_path defencies with pg_bench  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Patch to fix search_path defencies with pg_bench  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-hackers
* Tom Lane <tgl@sss.pgh.pa.us> [090507 12:53]:
> Aidan Van Dyk <aidan@highrise.ca> writes:
> > ... couldn't we just
> > make "new" pgbench refer to tables as <schema>.<table> where <schema> is
> > "public"?
> 
> I'd prefer not to do that because it changes the amount of parsing work
> demanded by the benchmark.  Maybe not by enough to matter ... or maybe
> it does.  Adjusting the length of the identifiers is a small enough
> change that I'm prepared to believe it doesn't invalidate comparisons,
> but changing the set of catalog lookups that occur is another question.

True enough... What about making the prefix be configurable, so by
default, it could be "pgbench_", it could be set to "" (to force it to
use old pgbench names) or set to "something." to get it to use a
different schema (noting that the comparisons to older ones not doing
catalog lookups are void).

But by dropping the search_path, you're necessarily changing the catalog
comparisons and lookups anyways, because your now taking a "random"
search path to follow (which could have multiple entries in it) instead
of one guaranteed to be a single, useable entry.

-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Patch to fix search_path defencies with pg_bench
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Patch to fix search_path defencies with pg_bench