From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | robertmhaas(at)gmail(dot)com, noriyoshi(dot)shinoda(at)hpe(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Proposal to add work_mem option to postgres_fdw module |
Date: | 2018-08-30 10:24:45 |
Message-ID: | 20180830.192445.216279772.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Mon, 27 Aug 2018 19:38:19 -0700, Michael Paquier <michael(at)paquier(dot)xyz> wrote in <20180828023819(dot)GA29157(at)paquier(dot)xyz>
> On Mon, Aug 27, 2018 at 02:34:31PM -0400, Robert Haas wrote:
> > I like the direction of your thinking, but it seems to me that this
> > would cause a problem if you want to set search_path=foo,bar.
>
> proconfig already handles such cases, that's what I was coming at. We
> could reuse most of what it does, no?
IIUC, proconfig is a text array, options is a text, and the
options psql-option is in the format of '-cvar=val -cvar=val...'.
Thus I think we still need something to convert them.
As an experiment, just with the following mod:
contrib/postgres_fdw/option.c
/* Hide debug options, as well as settings we override internally. */
- if (strchr(lopt->dispchar, 'D') ||
+ if ((strchr(lopt->dispchar, 'D') &&
+ strcmp(lopt->keyword, "options") != 0) ||
strcmp(lopt->keyword, "fallback_application_name") == 0 ||
and the following setup:
=# alter server sv1
options (set options '-csearch_path=\\"hoge,hage\\"\\ -cwork_mem=16MB');
actually works. Converting array representation into the
commandline options format shown above internally might make it
look better a bit..
=# alter server sv1
options (set options '{"search_path=\"hoge,hage\"",work_mem=16MB}');
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2018-08-30 10:42:42 | Re: Reopen logfile on SIGHUP |
Previous Message | Alvaro Herrera | 2018-08-30 10:18:13 | Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option) |