Re: Disallowing multiple queries per PQexec()

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Surafel Temesgen <surafel3000(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Disallowing multiple queries per PQexec()
Date: 2017-06-15 03:22:02
Message-ID: CAFj8pRD8upPEcbHvRdWtw7vZU7fGRdhtaefyCobAHwhr2wXgPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-06-14 19:56 GMT+02:00 Andres Freund <andres(at)anarazel(dot)de>:

> On 2017-06-12 10:32:57 -0400, Tom Lane wrote:
> > "Daniel Verite" <daniel(at)manitou-mail(dot)org> writes:
> > > PGC_POSTMASTER implies that it's an instance-wide setting.
> > > Is is intentional? I can understand that it's more secure for this not
> to
> > > be changeable in an existing session, but it's also much less usable
> if you
> > > can't set it per-database and per-user.
> > > Maybe it should be PGC_SUSET ?
> >
> > Bearing in mind that I'm not really for this at all...
>
> FWIW, I agree that this isn't something we should do. For one the GUC
> would really have to be GUC_REPORT, which'll cost everyone, and will
> break things like pgbouncer. I also don't think it's a good solution to
> the problem at hand - there *are* cases where application
> *intentionally* use PQexec() with multiple statements, namely when
> aggregate latency is an issue. Since it's an application writer's choice
> whether to use it, it seems to make not that much sense to have a
> serverside guc - it can't really be sensible set. If you want to do
> something here, you should probably work on convincing ORM etc. writers
> to use PQexecParams().
>

sometimes you are without possibility to check a control what application
does. The tools on server side is one possibility.

Regards

Pavel

>
> Greetings,
>
> Andres Freund
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mithun Cy 2017-06-15 04:35:24 Re: Proposal : For Auto-Prewarm.
Previous Message Tatsuo Ishii 2017-06-15 03:09:48 Re: improve release-note for pg_current_logfile()