Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

From: Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, lubennikovaav(at)gmail(dot)com, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Aleksander Alekseev <aleksander(at)timescale(dot)com>
Subject: Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.
Date: 2022-09-07 13:44:16
Message-ID: 30c76d19-3c45-b714-d815-15fce519c749@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

I would make two cosmetic changes.

1. I suggest replace description of function bt_report_duplicate() from
```
/*
* Prepare and print an error message for unique constrain violation in
* a btree index under WARNING level. Also set a flag to report ERROR
* at the end of the check.
*/
```
to
```
/*
* Prepare an error message for unique constrain violation in
* a btree index and report ERROR.
*/
```

2. I think will be better to change test 004_verify_nbtree_unique.pl -
replace
```
use Test::More tests => 6;
```
to
```
use Test::More;
...
done_testing();
```
(same as in the other three tests).

--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com

Attachment Content-Type Size
v15-0001-Add-option-for-amcheck-and-pg_amcheck-to-check-u.patch text/plain 43.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-09-07 13:55:51 Re: Reducing the chunk header sizes on all memory context types
Previous Message Robert Haas 2022-09-07 13:39:05 Re: pg_auth_members.grantor is bunk