Re: Implementing RESET CONNECTION ...

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oliver Jowett <oliver(at)opencloud(dot)com>, Kris Jurka <books(at)ejurka(dot)com>, eg(at)cybertec(dot)at, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Implementing RESET CONNECTION ...
Date: 2005-01-07 05:30:22
Message-ID: 200501070530.j075UMD29471@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hans-Jrgen Schnig wrote:
> I completely agree with Karel. I think it is a bad idea to change the
> protocol for such a minor feature - i tend to call it overkill.
> I want to add one point to this discussion: There is not just JDBC -
> other connection pools or clients might want different behaviour (which
> can from my point of view only lead to a complete reset).
>
> If the JDBC driver prefers different behaviour (maybe for prepared
> statements) we should discuss further options for RESET.
> Now there is: RESET CONNECTION (cleaning entire connection), RESET ALL
> (cleaning GUCS only) and RESET some_guc.
> Maybe we want RESET LISTENER, RESET PREPARED, RESET CURSORS.
> Personally I think this is not a good idea.

I think autocommit is a good example for comparison. One big problem
was that some users had autocommit in their server configs on startup
and that caused scripts to fail. I don't imagine anyone would add RESET
CONNECTION in their startup script.

However, I can imagine someone doing RESET CONNECTION from JDBC and the
interface should continue working. Should we add something like SET
CONNECTION that would set the reset values for RESET CONNECTION? JDBC
could then use SET CONNECTION and then any RESET CONNECTION would reset
back to that point. RESET has a similar capability where when you RESET
you reset to the connection defaults, not to the defaults from
postgresql.conf.

Also, let me mention PHP uses connection pooling and wants to use RESET
CONNECTION too.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2005-01-07 06:44:06 Re: PostgreSQL 8.0.0 Release Scheduale
Previous Message Michael Glaesemann 2005-01-07 05:21:21 Re: CSV arm check failure

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-01-07 05:31:04 Re: patch to add krb_server_hostname to postgresql.conf
Previous Message Bruce Momjian 2005-01-07 05:17:41 Re: [HACKERS] Bgwriter behavior