Re: [PATCH] minor reloption regression tests improvement - Mailing list pgsql-hackers

From Nikolay Shaplov
Subject Re: [PATCH] minor reloption regression tests improvement
Date
Msg-id 12182567.IpiZAh8j0P@thinkpad-pgpro
Whole thread Raw
In response to Re: [PATCH] minor reloption regression tests improvement  (Nikolay Shaplov <dhyan@nataraj.su>)
Responses Re: [PATCH] minor reloption regression tests improvement
List pgsql-hackers
В письме от четверг, 30 июня 2022 г. 06:47:48 MSK пользователь Nikolay Shaplov
написал:

> Hi! I am surely feel this patch is important. I have bigger patch
> https://commitfest.postgresql.org/38/3536/ and this test makes sense as a
> part of big work of options refactoring,
>
> I am also was strongly advised to commit things chopped into smaller parts,
> when possible. This test can be commit separately so I am doing it.

Let me again explain why this test is importaint, so potential reviewers can
easily find this information.

Tests are for developers. You change the code and see that something does not
work anymore, as it worked before.
When you change the code, you should keep both documented and undocumented
behaviour. Because user's code can intentionally  or accidentally use it.

So known undocumented behavior is better to be tested as well as documented
one. If you as developer want to change undocumented behavior, it is better to
do it consciously. This test insures that.

I, personally hit this problem while working with reloption code. Older
version of my new patch changed this behaviour, and I even did not notice
that. So I decided to write this test to ensure, that nobody ever meet same
problem.

And as I said before, I was strongly advised to commit in small parts, when
possible. This test can be commit separately.

--
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Add index item for MERGE.
Next
From: Noah Misch
Date:
Subject: Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.)