Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2015-03-19 Thread Bruce Momjian
On Mon, Oct 6, 2014 at 03:49:37PM +0200, Feike Steenbergen wrote: > On 6 October 2014 14:09, Michael Paquier wrote: > > That's a good catch and it should be a separate patch. This could even be > > considered for a back-patch down to 9.2. Thoughts? > > If I isolate "DROP INDEX concurrently", thi

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-07 Thread Jim Nasby
On 10/7/14, 2:11 AM, Feike Steenbergen wrote: On 7 October 2014 01:41, Jim Nasby wrote: >The options I see... > >1) If there's a definitive way to tell from backend source code what >commands disallow transactions then we can just use that information to >generate the list of commands psql shou

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-07 Thread Feike Steenbergen
On 7 October 2014 09:55, Marko Tiikkaja wrote: > It's not clear to me that this is fixing a problem, to be honest. If you're > running autocommit=off, you have an expectation that you can roll back > commands at will. It's fine if I can't roll back a VACUUM, for example, > since I would practica

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-07 Thread Marko Tiikkaja
On 10/7/14, 9:11 AM, Feike Steenbergen wrote: Perhaps I am the only one using autocommit-off mode You most definitely aren't. and we shouldn't put effort into fixing this? It's not clear to me that this is fixing a problem, to be honest. If you're running autocommit=off, you have an expec

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-07 Thread Feike Steenbergen
Apologies for the previous message, I didn't send the full version. On 6 October 2014 16:01, Tom Lane wrote: > What class of bug would that prevent exactly? ERROR: [...] cannot run inside a transaction block when: - running psql in AUTOCOMMIT off - not having started a transaction yet Current

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-06 Thread Jim Nasby
On 10/6/14, 9:59 AM, Feike Steenbergen wrote: It would test that when setting AUTOCOMMIT to off that you will not run into: ERROR: [...] cannot run inside a transaction block when issuing one of these PreventTransactionChain commands. In src/bin/psql/common.c Yes, but what happens when a new

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-06 Thread Feike Steenbergen
It would test that when setting AUTOCOMMIT to off that you will not run into: ERROR: [...] cannot run inside a transaction block when issuing one of these PreventTransactionChain commands. In src/bin/psql/common.c -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make ch

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-06 Thread Tom Lane
Feike Steenbergen writes: > I would like to propose to add a regression test for all statements > that call PreventTransactionChain in autocommit-off mode. What class of bug would that prevent exactly? It seems to me like something that would normally get forgotten when we add any new such state

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-06 Thread Feike Steenbergen
On 6 October 2014 14:09, Michael Paquier wrote: > That's a good catch and it should be a separate patch. This could even be > considered for a back-patch down to 9.2. Thoughts? If I isolate "DROP INDEX concurrently", this patch would do the trick. 20141006_drop_index_concurrently.patch Descript

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2014-10-06 Thread Michael Paquier
On Mon, Oct 6, 2014 at 7:36 PM, Feike Steenbergen < feikesteenber...@gmail.com> wrote: > I would like to propose to add a regression test for all statements > that call PreventTransactionChain in autocommit-off mode. I propose to > add these tests to src/test/regress/sql/psql.sql as this is a > ps