Re: [PATCH] minor reloption regression tests improvement

From: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org, Jacob Champion <jchampion(at)timescale(dot)com>
Subject: Re: [PATCH] minor reloption regression tests improvement
Date: 2022-06-30 04:04:25
Message-ID: 12182567.IpiZAh8j0P@thinkpad-pgpro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2022-06-30 05:03:10 Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.)
Previous Message Fujii Masao 2022-06-30 03:56:38 Add index item for MERGE.