Re: psql - add SHOW_ALL_RESULTS option - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: psql - add SHOW_ALL_RESULTS option
Date
Msg-id 6954328d-96f2-77f7-735f-7ce493a40949@enterprisedb.com
Whole thread Raw
In response to Re: psql - add SHOW_ALL_RESULTS option  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: psql - add SHOW_ALL_RESULTS option
List pgsql-hackers
On 22.07.21 16:58, Fabien COELHO wrote:
>>> Ok. I noticed. The patch got significantly broken by the watch pager 
>>> commit. I also have to enhance the added tests (per Peter request).
>>
>> I wrote a test to check psql query cancel support.  I checked that it 
>> fails against the patch that was reverted.  Maybe this is useful.
> 
> Here is the updated version (v8? I'm not sure what the right count is), 
> which works for me and for "make check", including some tests added for 
> uncovered paths.

I was looking at adding test coverage for the issue complained about in 
[0].  That message said that the autocommit logic was broken, but 
actually the issue was with the ON_ERROR_ROLLBACK logic.  However, it 
turned out that neither feature had any test coverage, and they are 
easily testable using the pg_regress setup, so I wrote tests for both 
and another little thing I found nearby.

It turns out that your v8 patch still has the issue complained about in 
[0].  The issue is that after COMMIT AND CHAIN, the internal savepoint 
is gone, but the patched psql still thinks it should be there and tries 
to release it, which leads to errors.


[0]: https://www.postgresql.org/message-id/2671235.1618154047@sss.pgh.pa.us

Attachment

pgsql-hackers by date:

Previous
From: Jean-Christophe Arnu
Date:
Subject: Re: Empty string in lexeme for tsvector
Next
From: Aleksander Alekseev
Date:
Subject: Re: rand48 replacement