Re: [PATCH] minor reloption regression tests improvement

Поиск
Список
Период
Сортировка
От Nikolay Shaplov
Тема Re: [PATCH] minor reloption regression tests improvement
Дата
Msg-id 12182567.IpiZAh8j0P@thinkpad-pgpro
обсуждение исходный текст
Ответ на Re: [PATCH] minor reloption regression tests improvement  (Nikolay Shaplov <dhyan@nataraj.su>)
Ответы Re: [PATCH] minor reloption regression tests improvement  (Jacob Champion <jchampion@timescale.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Add index item for MERGE.
Следующее
От: Noah Misch
Дата:
Сообщение: Re: last_archived_wal is not necessary the latest WAL file (was Re: pgsql: Add test case for an archive recovery corner case.)