Re: bytea_output vs make installcheck

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Neha Khatri <nehakhatri5(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bytea_output vs make installcheck
Date: 2017-03-09 23:57:01
Message-ID: CAKFQuwawsN6wK91uU2M=DWekVhsfzbjkn7zJVjF5qVWC5b=7rw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 9, 2017 at 4:45 PM, Neha Khatri <nehakhatri5(at)gmail(dot)com> wrote:

> On Fri, Mar 10, 2017 at 6:14 AM, Peter Eisentraut <peter(dot)eisentraut(at)2
> ndquadrant.com> wrote:
>
>> On 2/14/17 16:50, Jeff Janes wrote:
>> > make installcheck currently fails against a server running
>> > with bytea_output = escape.
>> >
>> > Making it succeed is fairly easy, and I think it is worth doing.
>> >
>> > Attached are two options for doing that. One overrides bytea_output
>> > locally where-ever needed, and the other overrides it for the entire
>> > 'regression' database.
>>
>> I would use option 2 here (ALTER DATABASE) and be done with it. Some
>> people didn't like using ALTER DATABASE, but it's consistent with
>> existing use. If someone wants to change that, that can be independent
>> of this issue.
>
>
> Sorry about the naive question, but if someone has set the GUC
> bytea_output = 'escape', then the intention seem to be to obtain the output
> in 'escape' format for bytea.
> With this, if an installcheck is done, that might also have been done with
> the expectation that the output will be in 'escape' format. In that case,
> how much is it justified to hard code the format for regression database?
> However, I agree that there are not many bytea outputs in the current
> regression suite
>
>
​At a high level (which is all I know here) ​If we leave behind tests that
at least exercise bytea_output='escape'​ mode to ensure it is functioning
properly then I'd have no problem having the testing of other features
dependent upon bytea_output, but that are coded to compare against the
now-default output format, set that runtime configurable mode to that which
they require. If the choice of output mode is simply a byproduct we should
be free to set it to whatever we need for the currently executing test.

If a simple way of doing this involves fixing the default to what the suite
expects and one-off changing it when testing escape mode stuff that seems
like a reasonable position to take. Having to set bytea_output when it
isn't the item under test seems like its just going to add noise.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2017-03-09 23:59:23 Re: contrib modules and relkind check
Previous Message Andres Freund 2017-03-09 23:52:42 Re: amcheck (B-Tree integrity checking tool)