Re: [PATCH] Allow UNLISTEN during recovery

From: Mi Tar <mmitar(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Shay Rojansky <roji(at)roji(dot)org>
Subject: Re: [PATCH] Allow UNLISTEN during recovery
Date: 2019-01-09 07:40:57
Message-ID: 154701965766.11631.2240747476287499810.pgcf@coridan.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: not tested
Spec compliant: not tested
Documentation: tested, failed

Hi!

I read through the discussion. I agree with the idea here. I think if DISCARD ALL is allowed during hot standby mode, and it includes UNLISTEN *, only UNLISTEN * should also be allowed. It seems this patch fixes this, but I could not test it (I do not know how to force this state). I would go further though, and I would also allow UNLISTEN a. Because also DISCARD allows discarding only part of resources.

So patch looks good to me, but documentation changes are missing from it. UNLISTEN should be removed from the list of commands not allowed and moved to the list of those which are allowed [1]. Moreover, src/test/regress/sql/hs_standby_allowed.sql and src/test/regress/sql/hs_standby_disallowed.sql tests should be updated based on these changes in the patch. What is surprising to me is that make check-world does not fail with this change, but there is an explicit check for UNLISTEN *. So does this mean those tests are not run or does it mean that this patch does not fix the problem?

[1] https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-USERS

Mitar

The new status of this patch is: Waiting on Author

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mi Tar 2019-01-09 08:08:10 Re: MERGE SQL statement for PG12
Previous Message Michael Paquier 2019-01-09 07:38:26 Re: commitfest: When are you assigned patches to review?