Re: Concurrent psql patch

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Fetter <david(at)fetter(dot)org>, Jim Nasby <decibel(at)decibel(dot)org>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Concurrent psql patch
Date: 2007-05-17 21:40:12
Message-ID: 200705172140.l4HLeCY12550@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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.

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

Gregory Stark wrote:
>
> So based on the feedback and suggestions here this is the interface I suggest:
>
> \connect& - to open a new connection keeping the existing one
> \g& - to submit a command asynchronously (like & in the shell)
> \S [Sess#] - to _S_witch to a different _S_ession
> - if no connection # specified list available _S_essions
> \D - _D_isconnect from current session (like ^D in the shell)
>
> This leaves no way to submit an asynchronous command without using \g but I'm
> really not too concerned with that. I don't want to start messing with psql's
> semicolon parsing behaviour and I'm mainly only concerned with this for
> regression tests.
>
> Another thought I had for the future is a \C command to simulate C-c and send
> a query cancel. That would let us have regression tests that query
> cancellation worked. The tests would presumably have to be written using
> pg_sleep() to ensure they ran for long enough but even then there would be no
> way to control exactly when the interrupt arrived.
>
> Attached is an updated patch.
>
> I also found and fixed some missing ResetCancelConn()s. I think I got them all
> and the behaviour seems correct in practice when cancelling various
> combinations of synchronous queries, asynchronous queries, and backslash
> commands. The one thing I wonder about is that I'm a bit concerned I may have
> introduced an assumption about how many resultsets arrive from a single query.
>
> I'll be offline for a few days but I'll be back Monday.
>

[ Attachment, skipping... ]

>
>
> --
> Gregory Stark
> EnterpriseDB http://www.enterprisedb.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joachim Wieland 2007-05-17 21:51:40 Re: mb and ecpg regression tests
Previous Message Bruce Momjian 2007-05-17 21:35:01 Re: Updated bitmap index patch

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-05-17 22:11:15 Re: Dead Space Map version 3 (simplified)
Previous Message Bruce Momjian 2007-05-17 21:35:01 Re: Updated bitmap index patch