Re: Adding new variables into GUC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Θάνος Παπαπέτρου <thanos(at)di(dot)uoa(dot)gr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adding new variables into GUC
Date: 2011-02-10 16:41:50
Message-ID: 17161.1297356110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?ISO-8859-7?B?yNzt7/Ig0OHw4fDd9PHv9Q==?= <thanos(at)di(dot)uoa(dot)gr> writes:
> I am an MSc student in the department of Informatics and
> Telecommunications of the University of Athens and as part of my
> thesis I am examining a new path/plan cost model for DB optimizers. I
> have successfully changed the optimizer of PostgreSQL in order to
> implement this model, but I have stumbled upon a very little detail:
> until now I use some hardcoded values in my code which I would like to
> make accessible through GUC. After much googling the only relative
> pages I have found are about configuring existing PostgreSQL variables
> and src/backend/utils/misc/README does not mention anything about
> adding new vars. Can anybody please provide some help?

You basically need the variable, the entry in the appropriate array in
guc.c, and some documentation (at least if you'd like anyone else to
ever use the code). Try looking at some past patches that added GUCs
similar to yours.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-02-10 16:45:20 Re: Why we don't want hints Was: Slow count(*) again...
Previous Message Tom Lane 2011-02-10 16:33:31 Re: Extensions versus pg_upgrade