pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Introduce hash_search_with_hash_value() function
19+ messages / 6 participants
[nested] [flat]
* pgsql: Introduce hash_search_with_hash_value() function
@ 2024-08-07 04:08 Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
0 siblings, 2 replies; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-07 04:08 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Introduce hash_search_with_hash_value() function
This new function iterates hash entries with given hash values. This function
is designed to avoid full sequential hash search in the syscache invalidation
callbacks.
Discussion: https://postgr.es/m/5812a6e5-68ae-4d84-9d85-b443176966a1%40sigaev.ru
Author: Teodor Sigaev
Reviewed-by: Aleksander Alekseev, Tom Lane, Michael Paquier, Roman Zharkov
Reviewed-by: Andrei Lepikhov
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d0f020037e19c33c74d683eb7e0c7cc5725294b4
Modified Files
--------------
src/backend/utils/hash/dynahash.c | 38 ++++++++++++++++++++++++++++++++++++++
src/include/utils/hsearch.h | 5 +++++
2 files changed, 43 insertions(+)
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
@ 2024-08-07 06:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
1 sibling, 1 reply; 19+ messages in thread
From: Pavel Stehule @ 2024-08-07 06:34 UTC (permalink / raw)
To: Alexander Korotkov <akorotkov@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
Hi
st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov <akorotkov@postgresql.org>
napsal:
> Introduce hash_search_with_hash_value() function
>
> This new function iterates hash entries with given hash values. This
> function
> is designed to avoid full sequential hash search in the syscache
> invalidation
> callbacks.
>
> Discussion:
> https://postgr.es/m/5812a6e5-68ae-4d84-9d85-b443176966a1%40sigaev.ru
> Author: Teodor Sigaev
> Reviewed-by: Aleksander Alekseev, Tom Lane, Michael Paquier, Roman Zharkov
> Reviewed-by: Andrei Lepikhov
>
I tried to use hash_seq_init_with_hash_value in session variables patch,
but it doesn't work there.
<-->if (!sessionvars)
<--><-->return;
elog(NOTICE, "%u", hashvalue);
<-->hash_seq_init(&status, sessionvars);
<-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
<-->{
<--><-->if (hashvalue == 0 || svar->hashvalue == hashvalue)
<--><-->{
<--><--><-->elog(NOTICE, "FOUND OLD");
<--><--><-->svar->is_valid = false;
<--><-->}
<-->}
<-->/*
<--> * If the hashvalue is not specified, we have to recheck all currently
<--> * used session variables. Since we can't tell the exact session
variable
<--> * from its hashvalue, we have to iterate over all items in the hash
bucket.
<--> */
<-->if (hashvalue == 0)
<--><-->hash_seq_init(&status, sessionvars);
<-->else
<--><-->hash_seq_init_with_hash_value(&status, sessionvars, hashvalue);
<-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
<-->{
<--><-->Assert(hashvalue == 0 || svar->hashvalue == hashvalue);
elog(NOTICE, "found");
<--><-->svar->is_valid = false;
<--><-->needs_validation = true;
<-->}
}
Old methods found an entry, but new not.
What am I doing wrong?
Regards
Pavel
> Branch
> ------
> master
>
> Details
> -------
>
> https://git.postgresql.org/pg/commitdiff/d0f020037e19c33c74d683eb7e0c7cc5725294b4
>
> Modified Files
> --------------
> src/backend/utils/hash/dynahash.c | 38
> ++++++++++++++++++++++++++++++++++++++
> src/include/utils/hsearch.h | 5 +++++
> 2 files changed, 43 insertions(+)
>
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
@ 2024-08-07 08:52 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:02 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-07 08:52 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
Hi, Pavel!
On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov <akorotkov@postgresql.org> napsal:
>>
>> Introduce hash_search_with_hash_value() function
>>
>> This new function iterates hash entries with given hash values. This function
>> is designed to avoid full sequential hash search in the syscache invalidation
>> callbacks.
>>
>> Discussion: https://postgr.es/m/5812a6e5-68ae-4d84-9d85-b443176966a1%40sigaev.ru
>> Author: Teodor Sigaev
>> Reviewed-by: Aleksander Alekseev, Tom Lane, Michael Paquier, Roman Zharkov
>> Reviewed-by: Andrei Lepikhov
>
>
> I tried to use hash_seq_init_with_hash_value in session variables patch, but it doesn't work there.
>
> <-->if (!sessionvars)
> <--><-->return;
>
> elog(NOTICE, "%u", hashvalue);
>
>
> <-->hash_seq_init(&status, sessionvars);
>
> <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
> <-->{
> <--><-->if (hashvalue == 0 || svar->hashvalue == hashvalue)
> <--><-->{
> <--><--><-->elog(NOTICE, "FOUND OLD");
> <--><--><-->svar->is_valid = false;
> <--><-->}
> <-->}
>
>
>
> <-->/*
> <--> * If the hashvalue is not specified, we have to recheck all currently
> <--> * used session variables. Since we can't tell the exact session variable
> <--> * from its hashvalue, we have to iterate over all items in the hash bucket.
> <--> */
> <-->if (hashvalue == 0)
> <--><-->hash_seq_init(&status, sessionvars);
> <-->else
> <--><-->hash_seq_init_with_hash_value(&status, sessionvars, hashvalue);
>
> <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
> <-->{
> <--><-->Assert(hashvalue == 0 || svar->hashvalue == hashvalue);
>
> elog(NOTICE, "found");
>
> <--><-->svar->is_valid = false;
> <--><-->needs_validation = true;
> <-->}
> }
>
> Old methods found an entry, but new not.
>
> What am I doing wrong?
I'm trying to check this. Applying this patch [1], but got conflicts.
Could you please, rebase the patch, so I can recheck the issue?
Links.
1. https://www.postgresql.org/message-id/flat/CAFj8pRD053CY_N4%3D6SvPe7ke6xPbh%3DK50LUAOwjC3jm8Me9Obg%4...
------
Regards,
Alexander Korotkov
Supabase
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
@ 2024-08-07 10:02 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 10:22 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Pavel Stehule @ 2024-08-07 10:02 UTC (permalink / raw)
To: Alexander Korotkov <aekorotkov@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
st 7. 8. 2024 v 10:52 odesílatel Alexander Korotkov <aekorotkov@gmail.com>
napsal:
> Hi, Pavel!
>
> On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
> > st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov <
> akorotkov@postgresql.org> napsal:
> >>
> >> Introduce hash_search_with_hash_value() function
> >>
> >> This new function iterates hash entries with given hash values. This
> function
> >> is designed to avoid full sequential hash search in the syscache
> invalidation
> >> callbacks.
> >>
> >> Discussion:
> https://postgr.es/m/5812a6e5-68ae-4d84-9d85-b443176966a1%40sigaev.ru
> >> Author: Teodor Sigaev
> >> Reviewed-by: Aleksander Alekseev, Tom Lane, Michael Paquier, Roman
> Zharkov
> >> Reviewed-by: Andrei Lepikhov
> >
> >
> > I tried to use hash_seq_init_with_hash_value in session variables patch,
> but it doesn't work there.
> >
> > <-->if (!sessionvars)
> > <--><-->return;
> >
> > elog(NOTICE, "%u", hashvalue);
> >
> >
> > <-->hash_seq_init(&status, sessionvars);
> >
> > <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
> > <-->{
> > <--><-->if (hashvalue == 0 || svar->hashvalue == hashvalue)
> > <--><-->{
> > <--><--><-->elog(NOTICE, "FOUND OLD");
> > <--><--><-->svar->is_valid = false;
> > <--><-->}
> > <-->}
> >
> >
> >
> > <-->/*
> > <--> * If the hashvalue is not specified, we have to recheck all
> currently
> > <--> * used session variables. Since we can't tell the exact session
> variable
> > <--> * from its hashvalue, we have to iterate over all items in the hash
> bucket.
> > <--> */
> > <-->if (hashvalue == 0)
> > <--><-->hash_seq_init(&status, sessionvars);
> > <-->else
> > <--><-->hash_seq_init_with_hash_value(&status, sessionvars, hashvalue);
> >
> > <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
> > <-->{
> > <--><-->Assert(hashvalue == 0 || svar->hashvalue == hashvalue);
> >
> > elog(NOTICE, "found");
> >
> > <--><-->svar->is_valid = false;
> > <--><-->needs_validation = true;
> > <-->}
> > }
> >
> > Old methods found an entry, but new not.
> >
> > What am I doing wrong?
>
> I'm trying to check this. Applying this patch [1], but got conflicts.
> Could you please, rebase the patch, so I can recheck the issue?
>
>
I sent rebased patchset
Message-ID:
CAFj8pRAskimJmB9Q8pHDa8YoLphVoZMH1xPeGBK8Eze=u+_hBQ@mail.gmail.com
<https://www.postgresql.org/message-id/CAFj8pRAskimJmB9Q8pHDa8YoLphVoZMH1xPeGBK8Eze%3Du%2B_hBQ%40mail...;
Regards
Pavel
> Links.
> 1.
> https://www.postgresql.org/message-id/flat/CAFj8pRD053CY_N4%3D6SvPe7ke6xPbh%3DK50LUAOwjC3jm8Me9Obg%4...
>
> ------
> Regards,
> Alexander Korotkov
> Supabase
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:02 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
@ 2024-08-07 10:22 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-07 10:22 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
On Wed, Aug 7, 2024 at 1:03 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> st 7. 8. 2024 v 10:52 odesílatel Alexander Korotkov <aekorotkov@gmail.com> napsal:
>>
>> Hi, Pavel!
>>
>> On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> > st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov <akorotkov@postgresql.org> napsal:
>> >>
>> >> Introduce hash_search_with_hash_value() function
>> >>
>> >> This new function iterates hash entries with given hash values. This function
>> >> is designed to avoid full sequential hash search in the syscache invalidation
>> >> callbacks.
>> >>
>> >> Discussion: https://postgr.es/m/5812a6e5-68ae-4d84-9d85-b443176966a1%40sigaev.ru
>> >> Author: Teodor Sigaev
>> >> Reviewed-by: Aleksander Alekseev, Tom Lane, Michael Paquier, Roman Zharkov
>> >> Reviewed-by: Andrei Lepikhov
>> >
>> >
>> > I tried to use hash_seq_init_with_hash_value in session variables patch, but it doesn't work there.
>> >
>> > <-->if (!sessionvars)
>> > <--><-->return;
>> >
>> > elog(NOTICE, "%u", hashvalue);
>> >
>> >
>> > <-->hash_seq_init(&status, sessionvars);
>> >
>> > <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
>> > <-->{
>> > <--><-->if (hashvalue == 0 || svar->hashvalue == hashvalue)
>> > <--><-->{
>> > <--><--><-->elog(NOTICE, "FOUND OLD");
>> > <--><--><-->svar->is_valid = false;
>> > <--><-->}
>> > <-->}
>> >
>> >
>> >
>> > <-->/*
>> > <--> * If the hashvalue is not specified, we have to recheck all currently
>> > <--> * used session variables. Since we can't tell the exact session variable
>> > <--> * from its hashvalue, we have to iterate over all items in the hash bucket.
>> > <--> */
>> > <-->if (hashvalue == 0)
>> > <--><-->hash_seq_init(&status, sessionvars);
>> > <-->else
>> > <--><-->hash_seq_init_with_hash_value(&status, sessionvars, hashvalue);
>> >
>> > <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
>> > <-->{
>> > <--><-->Assert(hashvalue == 0 || svar->hashvalue == hashvalue);
>> >
>> > elog(NOTICE, "found");
>> >
>> > <--><-->svar->is_valid = false;
>> > <--><-->needs_validation = true;
>> > <-->}
>> > }
>> >
>> > Old methods found an entry, but new not.
>> >
>> > What am I doing wrong?
>>
>> I'm trying to check this. Applying this patch [1], but got conflicts.
>> Could you please, rebase the patch, so I can recheck the issue?
>
> I sent rebased patchset
Thank you.
Please see 40064a8ee1 takes special efforts to match HTAB hash
function to syscache hash function. By default, their hash values
don't match and you can't simply use syscache hash value to search
HTAB. This probably should be mentioned in the header comment of
hash_seq_init_with_hash_value().
------
Regards,
Alexander Korotkov
Supabase
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:02 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 10:22 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
@ 2024-08-07 10:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 20:25 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Pavel Stehule @ 2024-08-07 10:34 UTC (permalink / raw)
To: Alexander Korotkov <aekorotkov@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov <aekorotkov@gmail.com>
napsal:
> On Wed, Aug 7, 2024 at 1:03 PM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
> >
> > st 7. 8. 2024 v 10:52 odesílatel Alexander Korotkov <
> aekorotkov@gmail.com> napsal:
> >>
> >> Hi, Pavel!
> >>
> >> On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
> >> > st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov <
> akorotkov@postgresql.org> napsal:
> >> >>
> >> >> Introduce hash_search_with_hash_value() function
> >> >>
> >> >> This new function iterates hash entries with given hash values.
> This function
> >> >> is designed to avoid full sequential hash search in the syscache
> invalidation
> >> >> callbacks.
> >> >>
> >> >> Discussion:
> https://postgr.es/m/5812a6e5-68ae-4d84-9d85-b443176966a1%40sigaev.ru
> >> >> Author: Teodor Sigaev
> >> >> Reviewed-by: Aleksander Alekseev, Tom Lane, Michael Paquier, Roman
> Zharkov
> >> >> Reviewed-by: Andrei Lepikhov
> >> >
> >> >
> >> > I tried to use hash_seq_init_with_hash_value in session variables
> patch, but it doesn't work there.
> >> >
> >> > <-->if (!sessionvars)
> >> > <--><-->return;
> >> >
> >> > elog(NOTICE, "%u", hashvalue);
> >> >
> >> >
> >> > <-->hash_seq_init(&status, sessionvars);
> >> >
> >> > <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
> >> > <-->{
> >> > <--><-->if (hashvalue == 0 || svar->hashvalue == hashvalue)
> >> > <--><-->{
> >> > <--><--><-->elog(NOTICE, "FOUND OLD");
> >> > <--><--><-->svar->is_valid = false;
> >> > <--><-->}
> >> > <-->}
> >> >
> >> >
> >> >
> >> > <-->/*
> >> > <--> * If the hashvalue is not specified, we have to recheck all
> currently
> >> > <--> * used session variables. Since we can't tell the exact session
> variable
> >> > <--> * from its hashvalue, we have to iterate over all items in the
> hash bucket.
> >> > <--> */
> >> > <-->if (hashvalue == 0)
> >> > <--><-->hash_seq_init(&status, sessionvars);
> >> > <-->else
> >> > <--><-->hash_seq_init_with_hash_value(&status, sessionvars,
> hashvalue);
> >> >
> >> > <-->while ((svar = (SVariable) hash_seq_search(&status)) != NULL)
> >> > <-->{
> >> > <--><-->Assert(hashvalue == 0 || svar->hashvalue == hashvalue);
> >> >
> >> > elog(NOTICE, "found");
> >> >
> >> > <--><-->svar->is_valid = false;
> >> > <--><-->needs_validation = true;
> >> > <-->}
> >> > }
> >> >
> >> > Old methods found an entry, but new not.
> >> >
> >> > What am I doing wrong?
> >>
> >> I'm trying to check this. Applying this patch [1], but got conflicts.
> >> Could you please, rebase the patch, so I can recheck the issue?
> >
> > I sent rebased patchset
>
>
> Thank you.
> Please see 40064a8ee1 takes special efforts to match HTAB hash
> function to syscache hash function. By default, their hash values
> don't match and you can't simply use syscache hash value to search
> HTAB. This probably should be mentioned in the header comment of
> hash_seq_init_with_hash_value().
>
yes, enhancing doc should be great + maybe assert
Regards
Pavel
>
> ------
> Regards,
> Alexander Korotkov
> Supabase
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:02 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 10:22 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
@ 2024-08-07 20:25 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-08 04:44 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-07 20:25 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
On Wed, Aug 7, 2024 at 1:34 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov <aekorotkov@gmail.com> napsal:
>> Thank you.
>> Please see 40064a8ee1 takes special efforts to match HTAB hash
>> function to syscache hash function. By default, their hash values
>> don't match and you can't simply use syscache hash value to search
>> HTAB. This probably should be mentioned in the header comment of
>> hash_seq_init_with_hash_value().
>
>
> yes, enhancing doc should be great + maybe assert
Please check the patch, which adds a caveat to the function header
comment. I don't particularly like an assert here, because there
could be use-cases besides syscache callbacks, which could legally use
default hash function.
------
Regards,
Alexander Korotkov
Supabase
Attachments:
v1-0001-Add-a-caveat-to-hash_seq_init_with_hash_value-hea.patch (application/octet-stream, 1.4K) download
From 02c7b845d204b7a123536a3a2a1a01d4b0c64858 Mon Sep 17 00:00:00 2001
From: Alexander Korotkov <akorotkov@postgresql.org>
Date: Wed, 7 Aug 2024 23:18:09 +0300
Subject: [PATCH v1] Add a caveat to hash_seq_init_with_hash_value() header
comment
The typical use-case for hash_seq_init_with_hash_value() is syscache
callback. Add a caveat that the default hash function doesn't match syscache
hash function. So, one needs to define a custom hash function.
Reported-by: Pavel Stehule
Discussion: https://postgr.es/m/CAFj8pRAXmv6eyYx%3DE_BTfyK%3DO_%2ByOF8sXB%3D0bn9eOBt90EgWRA%40mail.gmail.com
---
src/backend/utils/hash/dynahash.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c
index 8040416a13c..5d9c62b652a 100644
--- a/src/backend/utils/hash/dynahash.c
+++ b/src/backend/utils/hash/dynahash.c
@@ -1395,6 +1395,11 @@ hash_seq_init(HASH_SEQ_STATUS *status, HTAB *hashp)
/*
* Same as above but scan by the given hash value.
* See also hash_seq_search().
+ *
+ * NOTE: the default hash function doesn't match syscache hash function.
+ * Thus, if you're going to use this function in syscache callback, make sure
+ * you're using custom hash function. See relatt_cache_syshash()
+ * for example.
*/
void
hash_seq_init_with_hash_value(HASH_SEQ_STATUS *status, HTAB *hashp,
--
2.39.3 (Apple Git-146)
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:02 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 10:22 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 20:25 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
@ 2024-08-08 04:44 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-08 08:51 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Pavel Stehule @ 2024-08-08 04:44 UTC (permalink / raw)
To: Alexander Korotkov <aekorotkov@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
st 7. 8. 2024 v 22:25 odesílatel Alexander Korotkov <aekorotkov@gmail.com>
napsal:
> On Wed, Aug 7, 2024 at 1:34 PM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
> > st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov <
> aekorotkov@gmail.com> napsal:
> >> Thank you.
> >> Please see 40064a8ee1 takes special efforts to match HTAB hash
> >> function to syscache hash function. By default, their hash values
> >> don't match and you can't simply use syscache hash value to search
> >> HTAB. This probably should be mentioned in the header comment of
> >> hash_seq_init_with_hash_value().
> >
> >
> > yes, enhancing doc should be great + maybe assert
>
> Please check the patch, which adds a caveat to the function header
> comment. I don't particularly like an assert here, because there
> could be use-cases besides syscache callbacks, which could legally use
> default hash function.
>
looks well
Regards
Pavel
>
> ------
> Regards,
> Alexander Korotkov
> Supabase
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:02 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 10:22 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:34 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 20:25 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-08 04:44 ` Re: pgsql: Introduce hash_search_with_hash_value() function Pavel Stehule <pavel.stehule@gmail.com>
@ 2024-08-08 08:51 ` Alexander Korotkov <aekorotkov@gmail.com>
0 siblings, 0 replies; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-08 08:51 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
On Thu, Aug 8, 2024 at 7:45 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> st 7. 8. 2024 v 22:25 odesílatel Alexander Korotkov <aekorotkov@gmail.com> napsal:
>>
>> On Wed, Aug 7, 2024 at 1:34 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> > st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov <aekorotkov@gmail.com> napsal:
>> >> Thank you.
>> >> Please see 40064a8ee1 takes special efforts to match HTAB hash
>> >> function to syscache hash function. By default, their hash values
>> >> don't match and you can't simply use syscache hash value to search
>> >> HTAB. This probably should be mentioned in the header comment of
>> >> hash_seq_init_with_hash_value().
>> >
>> >
>> > yes, enhancing doc should be great + maybe assert
>>
>> Please check the patch, which adds a caveat to the function header
>> comment. I don't particularly like an assert here, because there
>> could be use-cases besides syscache callbacks, which could legally use
>> default hash function.
>
>
> looks well
Thank you, pushed.
------
Regards,
Alexander Korotkov
Supabase
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
@ 2024-08-07 12:24 ` Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
1 sibling, 1 reply; 19+ messages in thread
From: Robert Haas @ 2024-08-07 12:24 UTC (permalink / raw)
To: Alexander Korotkov <akorotkov@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
You may have already realized this, but the name of the function the
patch adds is not the same as the name that appears in the commit
message.
...Robert
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
@ 2024-08-07 15:55 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-07 15:55 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
On Wed, Aug 7, 2024 at 3:24 PM Robert Haas <robertmhaas@gmail.com> wrote:
> You may have already realized this, but the name of the function the
> patch adds is not the same as the name that appears in the commit
> message.
:sigh:
I didn't realize that before your message. That would be another item
for my checklist: ensure entities referenced from commit message and
comments didn't change their names.
------
Regards,
Alexander Korotkov
Supabase
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
@ 2024-08-07 16:30 ` Robert Haas <robertmhaas@gmail.com>
2024-08-07 17:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-07 20:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
0 siblings, 2 replies; 19+ messages in thread
From: Robert Haas @ 2024-08-07 16:30 UTC (permalink / raw)
To: Alexander Korotkov <aekorotkov@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
On Wed, Aug 7, 2024 at 11:55 AM Alexander Korotkov <aekorotkov@gmail.com> wrote:
> On Wed, Aug 7, 2024 at 3:24 PM Robert Haas <robertmhaas@gmail.com> wrote:
> > You may have already realized this, but the name of the function the
> > patch adds is not the same as the name that appears in the commit
> > message.
>
> :sigh:
> I didn't realize that before your message. That would be another item
> for my checklist: ensure entities referenced from commit message and
> comments didn't change their names.
I really wish there was some way to fix commit messages. I had a typo
in mine today, too.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
@ 2024-08-07 17:08 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-07 17:15 ` Re: pgsql: Introduce hash_search_with_hash_value() function Nathan Bossart <nathandbossart@gmail.com>
1 sibling, 1 reply; 19+ messages in thread
From: Alvaro Herrera @ 2024-08-07 17:08 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Alexander Korotkov <aekorotkov@gmail.com>; pgsql-hackers@lists.postgresql.org
On 2024-Aug-07, Robert Haas wrote:
> I really wish there was some way to fix commit messages. I had a typo
> in mine today, too.
We could use git notes. The UI is a bit inconvenient (they have to be
pushed and pulled separately from commits), but they seem useful enough.
https://initialcommit.com/blog/git-notes
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"This is what I like so much about PostgreSQL. Most of the surprises
are of the "oh wow! That's cool" Not the "oh shit!" kind. :)"
Scott Marlowe, http://archives.postgresql.org/pgsql-admin/2008-10/msg00152.php
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 17:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2024-08-07 17:15 ` Nathan Bossart <nathandbossart@gmail.com>
2024-08-07 18:01 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Nathan Bossart @ 2024-08-07 17:15 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Robert Haas <robertmhaas@gmail.com>; Alexander Korotkov <aekorotkov@gmail.com>; pgsql-hackers@lists.postgresql.org
On Wed, Aug 07, 2024 at 01:08:35PM -0400, Alvaro Herrera wrote:
> On 2024-Aug-07, Robert Haas wrote:
>> I really wish there was some way to fix commit messages. I had a typo
>> in mine today, too.
>
> We could use git notes. The UI is a bit inconvenient (they have to be
> pushed and pulled separately from commits), but they seem useful enough.
Yeah, I spend a lot of time on commit messages because they're pretty much
written in stone once pushed. I'd definitely use git notes to add errata,
follow-up commits that fixed/reverted things, etc.
--
nathan
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 17:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-07 17:15 ` Re: pgsql: Introduce hash_search_with_hash_value() function Nathan Bossart <nathandbossart@gmail.com>
@ 2024-08-07 18:01 ` Robert Haas <robertmhaas@gmail.com>
2024-08-07 20:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-15 21:01 ` Re: pgsql: Introduce hash_search_with_hash_value() function Nathan Bossart <nathandbossart@gmail.com>
0 siblings, 2 replies; 19+ messages in thread
From: Robert Haas @ 2024-08-07 18:01 UTC (permalink / raw)
To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; Alexander Korotkov <aekorotkov@gmail.com>; pgsql-hackers@lists.postgresql.org
On Wed, Aug 7, 2024 at 1:15 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
> > We could use git notes. The UI is a bit inconvenient (they have to be
> > pushed and pulled separately from commits), but they seem useful enough.
>
> Yeah, I spend a lot of time on commit messages because they're pretty much
> written in stone once pushed. I'd definitely use git notes to add errata,
> follow-up commits that fixed/reverted things, etc.
I think this could be a good idea, although it wouldn't really fix the
problem, because in the case of both this commit and the one I
mentioned earlier today, all you could do with the note is point out
the earlier mistake. You couldn't actually fix it.
Also, for the notes to be useful, we'd probably need some conventions
about how we, as a project, want to use them. If everyone does
something different, the result isn't likely to be all that great.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 17:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-07 17:15 ` Re: pgsql: Introduce hash_search_with_hash_value() function Nathan Bossart <nathandbossart@gmail.com>
2024-08-07 18:01 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
@ 2024-08-07 20:08 ` Alexander Korotkov <aekorotkov@gmail.com>
1 sibling, 0 replies; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-07 20:08 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Nathan Bossart <nathandbossart@gmail.com>; Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-hackers@lists.postgresql.org
On Wed, Aug 7, 2024 at 9:01 PM Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Aug 7, 2024 at 1:15 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
> > > We could use git notes. The UI is a bit inconvenient (they have to be
> > > pushed and pulled separately from commits), but they seem useful enough.
> >
> > Yeah, I spend a lot of time on commit messages because they're pretty much
> > written in stone once pushed. I'd definitely use git notes to add errata,
> > follow-up commits that fixed/reverted things, etc.
>
> I think this could be a good idea, although it wouldn't really fix the
> problem, because in the case of both this commit and the one I
> mentioned earlier today, all you could do with the note is point out
> the earlier mistake. You couldn't actually fix it.
Correct, but something looks better than nothing.
> Also, for the notes to be useful, we'd probably need some conventions
> about how we, as a project, want to use them. If everyone does
> something different, the result isn't likely to be all that great.
+1
------
Regards,
Alexander Korotkov
Supabase
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 17:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-07 17:15 ` Re: pgsql: Introduce hash_search_with_hash_value() function Nathan Bossart <nathandbossart@gmail.com>
2024-08-07 18:01 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
@ 2024-08-15 21:01 ` Nathan Bossart <nathandbossart@gmail.com>
2024-08-23 14:49 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
1 sibling, 1 reply; 19+ messages in thread
From: Nathan Bossart @ 2024-08-15 21:01 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; Alexander Korotkov <aekorotkov@gmail.com>; pgsql-hackers@lists.postgresql.org
On Wed, Aug 07, 2024 at 02:01:30PM -0400, Robert Haas wrote:
> Also, for the notes to be useful, we'd probably need some conventions
> about how we, as a project, want to use them. If everyone does
> something different, the result isn't likely to be all that great.
What did you have in mind? Would it be sufficient to propose a template
that, once ratified, would be available in the committing checklist [0]?
[0] https://wiki.postgresql.org/wiki/Committing_checklist
--
nathan
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 17:08 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-07 17:15 ` Re: pgsql: Introduce hash_search_with_hash_value() function Nathan Bossart <nathandbossart@gmail.com>
2024-08-07 18:01 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-15 21:01 ` Re: pgsql: Introduce hash_search_with_hash_value() function Nathan Bossart <nathandbossart@gmail.com>
@ 2024-08-23 14:49 ` Robert Haas <robertmhaas@gmail.com>
0 siblings, 0 replies; 19+ messages in thread
From: Robert Haas @ 2024-08-23 14:49 UTC (permalink / raw)
To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; Alexander Korotkov <aekorotkov@gmail.com>; pgsql-hackers@lists.postgresql.org
On Thu, Aug 15, 2024 at 5:02 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
> On Wed, Aug 07, 2024 at 02:01:30PM -0400, Robert Haas wrote:
> > Also, for the notes to be useful, we'd probably need some conventions
> > about how we, as a project, want to use them. If everyone does
> > something different, the result isn't likely to be all that great.
>
> What did you have in mind? Would it be sufficient to propose a template
> that, once ratified, would be available in the committing checklist [0]?
>
> [0] https://wiki.postgresql.org/wiki/Committing_checklist
Yes, that would suffice.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: pgsql: Introduce hash_search_with_hash_value() function
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 12:24 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Re: pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Re: pgsql: Introduce hash_search_with_hash_value() function Robert Haas <robertmhaas@gmail.com>
@ 2024-08-07 20:08 ` Alexander Korotkov <aekorotkov@gmail.com>
1 sibling, 0 replies; 19+ messages in thread
From: Alexander Korotkov @ 2024-08-07 20:08 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Alexander Korotkov <akorotkov@postgresql.org>; pgsql-committers@lists.postgresql.org
On Wed, Aug 7, 2024 at 7:30 PM Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Aug 7, 2024 at 11:55 AM Alexander Korotkov <aekorotkov@gmail.com> wrote:
> > On Wed, Aug 7, 2024 at 3:24 PM Robert Haas <robertmhaas@gmail.com> wrote:
> > > You may have already realized this, but the name of the function the
> > > patch adds is not the same as the name that appears in the commit
> > > message.
> >
> > :sigh:
> > I didn't realize that before your message. That would be another item
> > for my checklist: ensure entities referenced from commit message and
> > comments didn't change their names.
>
> I really wish there was some way to fix commit messages. I had a typo
> in mine today, too.
+1,
One of the scariest things that happened to me was forgetting to
mention reviewers or even authors. People don't get credit for their
work, and you can't fix that.
------
Regards,
Alexander Korotkov
Supabase
^ permalink raw reply [nested|flat] 19+ messages in thread
end of thread, other threads:[~2024-08-23 14:49 UTC | newest]
Thread overview: 19+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-07 04:08 pgsql: Introduce hash_search_with_hash_value() function Alexander Korotkov <akorotkov@postgresql.org>
2024-08-07 06:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 08:52 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:02 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 10:22 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 10:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-07 20:25 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-08 04:44 ` Pavel Stehule <pavel.stehule@gmail.com>
2024-08-08 08:51 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 12:24 ` Robert Haas <robertmhaas@gmail.com>
2024-08-07 15:55 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-07 16:30 ` Robert Haas <robertmhaas@gmail.com>
2024-08-07 17:08 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-07 17:15 ` Nathan Bossart <nathandbossart@gmail.com>
2024-08-07 18:01 ` Robert Haas <robertmhaas@gmail.com>
2024-08-07 20:08 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-15 21:01 ` Nathan Bossart <nathandbossart@gmail.com>
2024-08-23 14:49 ` Robert Haas <robertmhaas@gmail.com>
2024-08-07 20:08 ` Alexander Korotkov <aekorotkov@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox