| From: | Andrei Lepikhov <lepihov(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Xuneng Zhou <xunengzhou(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com> |
| Subject: | Re: Sequence Access Methods, round two |
| Date: | 2026-05-15 09:04:37 |
| Message-ID: | 688decf8-1e14-4ebc-869f-94e9ce6b53db@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 07/01/2026 06:32, Michael Paquier wrote:
> For now, I am sending a rebased v28. This stuff needed a refresh.
Here is a rebased version of the patch set.
It is generally looks quite elegant. Of course, an int64 value seems a little
restrictive, but in practice, with four different algorithms on board, I don't
need a value larger than 64 bits at this moment.
Notes on the snowflake sequence (0007):
1. The gettimeofday() might be called out of the loop before the exclusive lock
is acquired.
2. At least in my experience, gettimeofday does not always return monotonically
increased values. So, it makes sense to save the used value inside the 'seq'
structure and, if gettimeofday returned an earlier value, just increase this
cached value a little.
3. Sleep call under the lock. It might not be so inevitable, and call it only
when the time value stays the same.
--
regards, Andrei Lepikhov,
pgEdge
| Attachment | Content-Type | Size |
|---|---|---|
| v29-0001-Integrate-addition-of-attributes-for-sequences-w.patch | text/plain | 11.2 KB |
| v29-0002-Refactor-code-for-in-core-local-sequences.patch | text/plain | 56.4 KB |
| v29-0003-Sequence-access-methods-backend-support.patch | text/plain | 65.0 KB |
| v29-0004-Sequence-access-methods-dump-restore-support.patch | text/plain | 21.8 KB |
| v29-0005-Sequence-access-methods-core-documentation.patch | text/plain | 9.5 KB |
| v29-0006-Refactor-logic-for-page-manipulations-of-sequenc.patch | text/plain | 7.8 KB |
| v29-0007-snowflake-Add-sequence-AM-based-on-it.patch | text/plain | 25.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | jian he | 2026-05-15 09:05:47 | Re: on_error table, saving error info to a table |
| Previous Message | Zsolt Parragi | 2026-05-15 09:02:55 | Re: Track skipped tables during autovacuum and autoanalyze |