From: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add lookup table for replication slot invalidation causes |
Date: | 2024-02-20 16:53:03 |
Message-ID: | CAGECzQTntcv47CbNL2zfvGj3w2G=nZXBaJRS021BtDbm_tLa4Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 20 Feb 2024 at 12:11, Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> Thoughts?
Seems like a good improvement overall. But I'd prefer the definition
of the lookup table to use this syntax:
const char *const SlotInvalidationCauses[] = {
[RS_INVAL_NONE] = "none",
[RS_INVAL_WAL_REMOVED] = "wal_removed",
[RS_INVAL_HORIZON] = "rows_removed",
[RS_INVAL_WAL_LEVEL] = "wal_level_sufficient",
};
Regarding the actual patch:
- Assert(conflict_reason);
Probably we should keep this Assert. As well as the Assert(0)
+ for (cause = RS_INVAL_NONE; cause <= RS_INVAL_MAX_CAUSES; cause++)
Strictly speaking this is a slight change in behaviour, since now
"none" is also parsed. That seems fine to me though.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-02-20 17:00:07 | Re: Integer undeflow in fprintf in dsa.c |
Previous Message | Melanie Plageman | 2024-02-20 16:15:39 | Re: Streaming read-ready sequential scan code |