Re: BUG #15734: Walsender process crashing when executing SHOW ALL; - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #15734: Walsender process crashing when executing SHOW ALL;
Date
Msg-id 20190411030712.GH2728@paquier.xyz
Whole thread Raw
In response to Re: BUG #15734: Walsender process crashing when executing SHOW ALL;  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: BUG #15734: Walsender process crashing when executing SHOW ALL;  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
On Wed, Apr 10, 2019 at 11:01:21AM -0400, Alvaro Herrera wrote:
> I think we should have a few tests issuing SHOW ALL in a replication
> connection with various levels of privilege; it's annoying that this bug
> took two years to find.  With that, special-purpose buildfarm members
> would tell us if we've made some mistake in transaction handling or
> whatever.

What do you think about the set attached?  I prefer that we use
psql(on_error_die => 1) so as in the case of a crash or an error the
test dies hard and fast. In consequence, I have granted
pg_read_all_settings to the replication user to ensure that no errors
happen, still the syscache lookup is done.  We could have negative
tests but I don't think that's worth the addition as we already have
tests for pg_read_all_settings in src/test/regress/.  If I remove the
patched patch from walsender.c, the test fails immediately.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Suspicious strcmp() in src/backend/parser/parse_expr.c
Next
From: Thomas Munro
Date:
Subject: Re: Suspicious strcmp() in src/backend/parser/parse_expr.c