diff options
| author | Álvaro Herrera <alvherre@kurilemu.de> | 2025-10-28 19:13:32 +0100 |
|---|---|---|
| committer | Álvaro Herrera <alvherre@kurilemu.de> | 2025-10-28 19:13:32 +0100 |
| commit | d5845aa8adb25fda30cb2ad44aa2c5b0a59baa27 (patch) | |
| tree | 55425719a7dc06748ce0aa0af276221692f2ea11 /src/backend/commands/analyze.c | |
| parent | 4da12e9e2e3c011a3fc8354ca451d6a82c017fa3 (diff) | |
Don't error out when dropping constraint if relchecks is already zero
I have never seen this be a problem in practice, but it came up when
purposely corrupting catalog contents to study the fix for a nearby bug:
we'd try to decrement relchecks, but since it's zero we error out and
fail to drop the constraint. The fix is to downgrade the error to
warning, skip decrementing the counter, and otherwise proceed normally.
Given lack of field complaints, no backpatch.
Author: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/202508291058.q2zscdcs64fj@alvherre.pgsql
Diffstat (limited to 'src/backend/commands/analyze.c')
0 files changed, 0 insertions, 0 deletions
