Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Jim C. Nasby
On Thu, May 17, 2007 at 12:30:45PM -0700, Joshua D. Drake wrote: It seems that it may be useful to allow something like: DROP INDEX NOWAIT. The idea being, that the terminal will come back, the index will be dropped in the background. If it doesn't drop, it rollback like normal and

Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Neil Conway
On Fri, 2007-18-05 at 11:47 -0500, Jim C. Nasby wrote: Assuming the concurrent psql stuff gets in, do you still see a use for this? I think concurrent psql (and/or async libpq) is the right way to handle this sort of requirement. DROP INDEX NOWAIT is hacky, and would be difficult (impossible?)

Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: Yes. As cool as concurrent psql is... the majority of our users don't use it. They use PgAdminIII. So? IIRC pgAdmin can open up multiple connections already. This should be client agnostic imo. Just to be perfectly clear: the odds of making a

Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Joshua D. Drake
Jim C. Nasby wrote: On Thu, May 17, 2007 at 12:30:45PM -0700, Joshua D. Drake wrote: It seems that it may be useful to allow something like: DROP INDEX NOWAIT. The idea being, that the terminal will come back, the index will be dropped in the background. If it doesn't drop, it rollback like

Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Joshua D. Drake
Tom Lane wrote: Joshua D. Drake [EMAIL PROTECTED] writes: Yes. As cool as concurrent psql is... the majority of our users don't use it. They use PgAdminIII. So? IIRC pgAdmin can open up multiple connections already. This should be client agnostic imo. Just to be perfectly clear: the odds

Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Alvaro Herrera
Neil Conway wrote: On Fri, 2007-18-05 at 11:47 -0500, Jim C. Nasby wrote: Assuming the concurrent psql stuff gets in, do you still see a use for this? I think concurrent psql (and/or async libpq) is the right way to handle this sort of requirement. DROP INDEX NOWAIT is hacky, and would be

Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Neil Conway
On Fri, 2007-18-05 at 13:29 -0400, Alvaro Herrera wrote: I think what Joshua really wants is an equivalent of this That's not what his original email asked for, at any rate. start: BEGIN; LOCK TABLE foo IN ACCESS EXCLUSIVE MODE NOWAIT; -- if fail, rollback and go to start

Re: [HACKERS] Async commands (like drop index)

2007-05-18 Thread Jim C. Nasby
On Fri, May 18, 2007 at 01:39:56PM -0400, Neil Conway wrote: On Fri, 2007-18-05 at 13:29 -0400, Alvaro Herrera wrote: I think what Joshua really wants is an equivalent of this That's not what his original email asked for, at any rate. start: BEGIN; LOCK TABLE foo IN ACCESS

[HACKERS] Async commands (like drop index)

2007-05-17 Thread Joshua D. Drake
Hello, It seems that it may be useful to allow something like: DROP INDEX NOWAIT. The idea being, that the terminal will come back, the index will be dropped in the background. If it doesn't drop, it rollback like normal and logs. I bring this up now, as an idea. We can argue about it