Re: [Patch] ALTER SYSTEM READ ONLY - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: [Patch] ALTER SYSTEM READ ONLY
Date
Msg-id F2BBD601-6D60-40A3-BD81-EBC88964BD55@enterprisedb.com
Whole thread Raw
In response to Re: [Patch] ALTER SYSTEM READ ONLY  (Amul Sul <sulamul@gmail.com>)
Responses Re: [Patch] ALTER SYSTEM READ ONLY  (Amul Sul <sulamul@gmail.com>)
List pgsql-hackers

> On Sep 22, 2021, at 6:14 AM, Amul Sul <sulamul@gmail.com> wrote:
>
>> Attached patch v34-0010 adds a test of cursors opened FOR UPDATE interacting with a system that is set read-only by
adifferent session.  The expected output is worth reviewing to see how this plays out.  I don't see anything in there
whichis obviously wrong, but some of it is a bit clunky.  For example, by the time the client sees an error "FATAL:
WALis now prohibited", the system may already have switched back to read-write.  Also, it is a bit strange to get one
ofthese errors on an attempted ROLLBACK.  Once again, not wrong as such, but clunky. 
>>
>
> Can't we do the same in the TAP test? If the intention is only to test
> session termination when the system changes to WAL are prohibited then
> that I have added in the latest version, but that test does not
> reinitiate the same connection again, I think that is not possible
> there too.

Perhaps you can point me to a TAP test that does this in a concise fashion.  When I tried writing a TAP test for this,
itwas much longer than the equivalent isolation test spec. 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-hackers by date:

Previous
From: Amul Sul
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY
Next
From: Amul Sul
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY