Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Chao Li
> On Dec 18, 2025, at 15:43, Peter Eisentraut wrote: > > On 18.12.25 01:22, Chao Li wrote: >>> On Dec 17, 2025, at 22:51, Peter Eisentraut wrote: >>> On 15.12.25 10:16, Chao Li wrote: The motivation for this patch comes from my own experience. While working on [1]. I added an enum-

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Peter Eisentraut
On 18.12.25 01:22, Chao Li wrote: On Dec 17, 2025, at 22:51, Peter Eisentraut wrote: On 15.12.25 10:16, Chao Li wrote: The motivation for this patch comes from my own experience. While working on [1]. I added an enum-typed GUC and made a copy-and-paste mistake, assigning the same numeric valu

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Chao Li
> On Dec 18, 2025, at 05:32, Zsolt Parragi wrote: > > Hello > >> . While working on [1]. I added an enum-typed GUC > > I wanted to check the original issue, but the linked patch adds a > boolean GUC (logical_replication_fallback_to_full_identity), I did not > see enum mentioned anywhere in t

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Chao Li
> On Dec 17, 2025, at 23:19, Andres Freund wrote: > > Hi, > > On 2025-12-15 17:16:56 +0800, Chao Li wrote: >> The motivation for this patch comes from my own experience. While working >> on [1]. I added an enum-typed GUC and made a copy-and-paste mistake, >> assigning the same numeric value t

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Chao Li
> On Dec 17, 2025, at 22:51, Peter Eisentraut wrote: > > On 15.12.25 10:16, Chao Li wrote: >> The motivation for this patch comes from my own experience. While working on >> [1]. I added an enum-typed GUC and made a copy-and-paste mistake, assigning >> the same numeric value to two different

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Zsolt Parragi
Hello > . While working on [1]. I added an enum-typed GUC I wanted to check the original issue, but the linked patch adds a boolean GUC (logical_replication_fallback_to_full_identity), I did not see enum mentioned anywhere in the diff, did you link the correct thread? > Ideally, such a check wou

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Andres Freund
Hi, On 2025-12-15 17:16:56 +0800, Chao Li wrote: > The motivation for this patch comes from my own experience. While working > on [1]. I added an enum-typed GUC and made a copy-and-paste mistake, > assigning the same numeric value to two different enum entries. This > resulted in confusing runtime

Re: Add sanity check for duplicate enum values in GUC definitions

2025-12-17 Thread Peter Eisentraut
On 15.12.25 10:16, Chao Li wrote: The motivation for this patch comes from my own experience. While working on [1]. I added an enum-typed GUC and made a copy-and-paste mistake, assigning the same numeric value to two different enum entries. This resulted in confusing runtime behavior and cost m