Re: RESET SESSION v2

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: PGSQL-Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: RESET SESSION v2
Date: 2007-04-03 14:22:40
Message-ID: 200704031422.l33EMeU22470@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

Marko Kreen wrote:
> New commands:
>
> CLOSE ALL -- close all cursors
> DEALLOCATE ALL -- close all prepared stmts
> RESET PLANS -- drop all plans
> RESET TEMP | TEMPORARY -- drop all temp tables
>
> RESET SESSION -- drop/close/free everything
>
> So in the end RESET SESSION is eqivalent to following commands:
>
> SET SESSION AUTHORIZATION DEFAULT;
> RESET ALL;
> DEALLOCATE ALL;
> CLOSE ALL;
> UNLISTEN *;
> RESET PLANS;
> RESET TEMP;
>
> Changes in v2:
>
> * RESET TEMPS -> RESET TEMP | TEMPORARY
> * RESET SESSION does not ABORT anymore, instead fails if in transaction.
> * DEALLOCATE ALL, CLOSE ALL and RESET SESSION change CommandComplete string
> to "DEALLOCATE ALL", "CLOSE CURSOR ALL" and "RESET SESSION" respectively.
> * Regression tests.
> * Some docs.
> * The ParamStatuses for changed options are already sent by ResetAllOptions(),
> so this already works.
>
> Questions:
>
> * DEALLOCATE PREPARE ALL gives bison conflicts. Is that even needed?
>
> * Are the CommandComplete changes needed? As there is possible to
> hide DEALLOCATE ALL inside function? OTOH, I like the idea
> of more descriptive CommandComplete string. I'd like it to
> include even actual item name for ordinary DECLARE/CLOSE,
> PREPARE/DEALLOCATE and SET/RESET in the future.
>
> * ResetPlanCache() is implemented as PlanCacheCallback((Datum)0, InvalidOid);
> That seems to leave plans for utility commands untouched. Is it problem?
> Should it walk plan list itself?
>
>
> --
> marko

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-04-03 15:06:59 Re: [Fwd: Deferred Transactions, Transaction Guaranteeand COMMITwithout waiting]
Previous Message Bruce Momjian 2007-04-03 14:20:44 Re: [HACKERS] Arrays of Complex Types