[PATCH] minor reloption regression tests improvement

From: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] minor reloption regression tests improvement
Date: 2022-02-11 09:51:22
Message-ID: 4563991.km65PDbjlG@thinkpad-pgpro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I'd like to suggest a patch for reloption regression tests.

This patch tests case, that can be rarely met in actual life: when reloptions
have some illegal option set (as a result of malfunction or extension
downgrade or something), and user tries to remove this option by using RESET.
Current postgres behaviour is to actually remove this option.


UPDATE pg_class SET reloptions = '{illegal_option=4}'
WHERE oid = 'reloptions_test'::regclass;

ALTER TABLE reloptions_test RESET (illegal_option);

Why this should be tested:
1. It is what postgres actually do now.
2. This behaviour is reasonable. DB User can fix problem without updating
pg_class, having rights to change his own table.
3. Better to get test alarm, if this behavior is accidentally changed.

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

Attachment Content-Type Size
reloption_regression_improvement.diff text/x-patch 1.7 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2022-02-11 10:02:45 Assertion failure in WaitForWALToBecomeAvailable state machine
Previous Message Christoph Berg 2022-02-11 09:48:11 Re: pgsql: Add TAP test to automate the equivalent of check_guc