Re: Regression tests for preload extension

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Regression tests for preload extension
Date: 2012-04-25 21:01:12
Message-ID: 2378.1335387672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> I wrote a little extension to store a few small strings in shared
> memory. It seems to be working fine, and now I would like to write
> some regression tests; but it's not immediately obvious to me how I
> can do that. The approach used by, for example, citext doesn't
> work, because I don't see how to set shared_preload_libraries for
> the server startup. The existing contrib extensions which preload
> either seem to do something ad hoc or skip regression tests
> entirely, so I suspect that is my choice; but I figured I should
> ask.

Hm. pg_regress.c goes to some trouble to allow you to set session-level
options by setting PGOPTIONS in its environment, but that won't work
for options that have to be given to the postmaster. Maybe we should
invent a pg_regress switch that allows additional switches to be given
to the temp postmaster. Of course, this is never gonna work for
"make installcheck".

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-04-25 21:09:04 Re: Request to add options to tools/git_changelog
Previous Message Peter Eisentraut 2012-04-25 21:00:12 Re: Patch: add timing of buffer I/O requests