Paste into your AI assistant to fix the article, then ask for a re-review.
Show the text
Fix the article with this report, then ask pgTrue for a re-review.
# pgTrue report: UUIDv4 vs UUIDv7: what a random primary key costs in Postgres
Article title: UUIDv4 vs UUIDv7: what a random primary key costs in Postgres
Article URL: https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7
Report URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3
Audited revision: 1 of 1, 2026-11-11 04:03:38 UTC
Overall letter: A
## Axes
- Factual: A · 0 wrong · 41 checked · 1 caveats · assessed
- Applicable: A · 0 wrong · 0 checked · 0 caveats · partly assessed
- Consistent: A · 0 wrong · 0 checked · 0 caveats · A · 0 checked
- Transparent: A · 0 wrong · 19 checked · 0 caveats · partly assessed
- Safe: A · 0 wrong · 0 checked · 0 caveats · partly assessed
ElephantSeal: A.
Open conditions: central claim not checked.
## Report metadata
- Report: Technical fact-check, edition 2
- pgTrue version: audited with v1.1.6
- Issued: 2026-11-11
- Edition: Updated after review. Corrections are listed below.
- Submitted: Submitted by the PostgresAI team.
- Author response: No written reply from the author. See Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).
## Findings needing a change (1)
### F1 · Imprecise · Factual · UUIDv4 foreign-key indexes need not behave like unique UUIDv4 primary keys.
Location: excerpt · section “Recommendations” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Any%20index%20on%20a%20UUIDv4%20column%20behaves%20the%20same%20way)
Article says:
```text
Any index on a UUIDv4 column behaves the same way…
```
What is true:
Nonunique UUID indexes can deduplicate repeated keys into posting lists. A small, frequently referenced parent set can also concentrate inserts within a few leaves. The primary-key thresholds do not describe every foreign-key index.
So what:
Measure the foreign-key index's size, distinct parent IDs, and insertion locality before applying the primary-key memory thresholds.
Charitable reading:
The sentence can describe random key ordering alone. Its unrestricted wording also covers repeated child-table foreign keys.
Review: We tested whether the statement concerns random ordering alone. Its foreign-key example still extends primary-key thresholds beyond deduplicated indexes. We tried reading 'same way' as random ordering alone. The surrounding capacity recommendation still extends primary-key thresholds to foreign-key indexes. UUID deduplication supports the exception. Measuring distinct keys and index size supplies a concrete action. Wasted work fits the evidence.
Sources:
- [REL_18_6 · doc/src/sgml/btree.sgml:777-785](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/btree.sgml#L777-L785)
Excerpt:
```text
Deduplication works by periodically merging groups of duplicate
tuples together, forming a single <firstterm>posting list</firstterm> tuple for each
group. The column key value(s) only appear once in this
representation.
```
- [REL_18_6 · src/include/catalog/pg_amproc.dat:282-283](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/catalog/pg_amproc.dat#L282-L283)
Excerpt:
```text
{ amprocfamily => 'btree/uuid_ops', amproclefttype => 'uuid',
amprocrighttype => 'uuid', amprocnum => '4', amproc => 'btequalimage' },
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F1
## Verified accurate claims (40)
### F2 · Accurate · Factual · UUID generation and per-backend ordering match the source.
Location: excerpt · section “UUIDv7 costs” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=uuidv7%28%29%20is%20monotonic%20within%20one%20backend%20but%20not%20across%20backends.)
Article says:
```text
uuidv7() is monotonic within one backend but not across backends.
```
What is true:
uuidv7() returns uuid and encodes Unix milliseconds plus a sub-millisecond fraction. Each backend advances its own timestamp state. gen_random_uuid() generates UUIDv4. The interval overload adjusts the timestamp without concealing its structure.
Charitable reading:
The ordering statement concerns the built-in generator's per-backend state.
Review: We checked backend-local timestamp state and the interval overload. Neither establishes cross-backend monotonic ordering. We checked whether monotonicity implied coordination across backends. The source explicitly limits timestamp progression to one backend. The interval overload changes the timestamp without hiding its layout.
Sources:
- [REL_18_6 · src/backend/utils/adt/uuid.c:564-566](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L564-L566)
Excerpt:
```text
* Get the current timestamp with nanosecond precision for UUID generation.
* The returned timestamp is ensured to be at least SUBMS_MINIMAL_STEP greater
* than the previous returned timestamp (on this backend).
```
- [REL_18_6 · src/backend/utils/adt/uuid.c:608-732](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L608-L732)
Excerpt:
```text
* UUID version 7 consists of a Unix timestamp in milliseconds (48 bits) and
* 74 random bits, excluding the required version and variant bits.
```
- [REL_18_0 · src/backend/utils/adt/uuid.c:591-596](https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/adt/uuid.c#L591-L596)
Qualification: Version note: Checked the PostgreSQL 18 version floor.
Excerpt:
```text
* described in the RFC. This method utilizes 12 bits from the "rand_a" bits
* to store a 1/4096 (or 2^12) fraction of sub-millisecond precision.
```
- [REL_18_6 · src/backend/utils/adt/uuid.c:539-544](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L539-L544)
Excerpt:
```text
* Generate UUID version 4.
*
* All UUID bytes are filled with strong random numbers except version and
* variant bits.
```
- [REL_18_6 · src/include/catalog/pg_proc.dat:9482-9501](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/catalog/pg_proc.dat#L9482-L9501)
Excerpt:
```text
{ oid => '6429', descr => 'generate UUID version 7',
proname => 'uuidv7', provolatile => 'v', prorettype => 'uuid',
proargtypes => '', prosrc => 'uuidv7' },
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F2
### F3 · Accurate · Factual · Changing the UUID default requires ACCESS EXCLUSIVE and preserves existing rows.
Location: excerpt · section “Switching a table” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=it%20takes%20an%20ACCESS%20EXCLUSIVE%20lock)
Article says:
```text
…it takes an ACCESS EXCLUSIVE lock…
```
What is true:
AT_ColumnDefault requires AccessExclusiveLock. Changing the default changes subsequent default evaluations without rewriting existing rows. Explicitly supplied IDs bypass the default. lock_timeout aborts a statement when an individual lock acquisition wait exceeds its setting.
Charitable reading:
The recipe changes an existing uuid column under ordinary statement execution.
Review: We checked whether lock_timeout limits execution duration. The finding correctly limits it to individual lock waits. We checked whether lock_timeout limited total execution time. The finding correctly describes individual acquisition waits. AT_ColumnDefault requires AccessExclusiveLock, and changing defaults preserves existing values.
Sources:
- [REL_18_6 · src/backend/commands/tablecmds.c:4710-4727](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L4710-L4727)
Excerpt:
```text
case AT_ColumnDefault:
case AT_CookedColumnDefault:
case AT_AlterConstraint:
case AT_AddIndex: /* from ADD CONSTRAINT */
case AT_AddIndexConstraint:
case AT_ReplicaIdentity:
case AT_SetNotNull:
case AT_EnableRowSecurity:
case AT_DisableRowSecurity:
case AT_ForceRowSecurity:
case AT_NoForceRowSecurity:
case AT_AddIdentity:
case AT_DropIdentity:
case AT_SetIdentity:
case AT_SetExpression:
case AT_DropExpression:
case AT_SetCompression:
cmd_lockmode = AccessExclusiveLock;
```
- [REL_18_6 · doc/src/sgml/ref/alter_table.sgml:223-227](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/alter_table.sgml#L223-L227)
Excerpt:
```text
default value will only apply in subsequent <command>INSERT</command>
or <command>UPDATE</command> commands; it does not cause rows already
in the table to change.
```
- [REL_18_6 · doc/src/sgml/config.sgml:10296-10303](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L10296-L10303)
Excerpt:
```text
Abort any statement that waits longer than the specified amount of
time while attempting to acquire a lock on a table, index,
row, or other database object. The time limit applies separately to
each lock acquisition attempt.
```
- [REL_18_6 · doc/src/sgml/ref/create_table.sgml:886-906](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/create_table.sgml#L886-L906)
Excerpt:
```text
The default expression will be used in any insert operation that
does not specify a value for the column. If there is no default
for a column, then the default is null.
```
- [REL_18_6 · src/include/catalog/pg_proc.dat:9482-9501](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/catalog/pg_proc.dat#L9482-L9501)
Excerpt:
```text
{ oid => '6429', descr => 'generate UUID version 7',
proname => 'uuidv7', provolatile => 'v', prorettype => 'uuid',
proargtypes => '', prosrc => 'uuidv7' },
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F3
### F4 · Accurate · Factual · The mixed UUIDv4/UUIDv7 split explanation matches the single-column code path.
Location: excerpt · section “Switching a table” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=The%20%22split%20after%20new%20item%22,the%20middle%20skips%20single%2Dcolumn%20indexes)
Article says:
```text
The "split after new item" rule that could pack a leaf in the middle skips single-column indexes…
```
What is true:
The interior split optimization rejects single-key indexes. Ordinary interior leaves use the 50:50 strategy. Sorted builds apply the leaf fillfactor threshold. Ascending UUIDv7 inserts inside an older UUIDv4 range can leave previously split left halves underfilled.
Charitable reading:
The paragraph discusses the single-column UUID primary key shown in the schema.
Review: We tested the composite-index exception. The finding correctly restricts its explanation to the single-column interior split path. We tested the composite-index exception against the finding's scope. The article specifies single-column indexes. The optimization rejects one key attribute, while ordinary interior leaves use 50:50 splits.
Sources:
- [REL_18_6 · src/backend/utils/adt/uuid.c:219-225](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L219-L225)
Excerpt:
```text
static int
uuid_internal_cmp(const pg_uuid_t *arg1, const pg_uuid_t *arg2)
{
return memcmp(arg1->data, arg2->data, UUID_LEN);
}
```
- [REL_18_6 · src/backend/access/nbtree/nbtsplitloc.c:640-644](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtsplitloc.c#L640-L644)
Excerpt:
```text
nkeyatts = IndexRelationGetNumberOfKeyAttributes(state->rel);
/* Single key indexes not considered here */
if (nkeyatts == 1)
return false;
```
- [REL_18_6 · src/backend/access/nbtree/nbtsplitloc.c:329-335](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtsplitloc.c#L329-L335)
Excerpt:
```text
else
{
/* Other leaf page. 50:50 page split. */
usemult = false;
/* fillfactormult not used, but be tidy */
fillfactormult = 0.50;
}
```
- [REL_18_6 · src/backend/access/nbtree/nbtsort.c:662-667](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtsort.c#L662-L667)
Excerpt:
```text
state->btps_level = level;
/* set "full" threshold based on level. See notes at head of file. */
if (level > 0)
state->btps_full = (BLCKSZ * (100 - BTREE_NONLEAF_FILLFACTOR) / 100);
else
state->btps_full = BTGetTargetPageFreeSpace(wstate->index);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F4
### F5 · Accurate · Factual · Expression partitioning requires a matching expression restriction for pruning.
Location: excerpt · section “UUIDv7 costs” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Partitioning%20on%20uuid_extract_timestamp%28id%29%20does%20not,plain%20id%20%3D%20%241%20lookup)
Article says:
```text
Partitioning on uuid_extract_timestamp(id) does not help a plain id = $1 lookup…
```
What is true:
The pruning matcher compares a clause operand with the partition key expression. id = $1 matches direct id partitioning. It does not match uuid_extract_timestamp(id). An equality on that expression supplies the required restriction.
Charitable reading:
The comparison uses direct id partitioning versus the stated timestamp expression.
Review: We checked expression matching and operand commutation. Plain id equality does not match the timestamp partition expression. We checked whether plain id equality matched the timestamp partition expression. The matcher compares expression trees. The finding correctly requires the additional expression restriction.
Sources:
- [REL_18_6 · src/backend/partitioning/partprune.c:1920-1982](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/partitioning/partprune.c#L1920-L1982)
Excerpt:
```text
/* check if the clause matches this partition key */
if (equal(leftop, partkey))
expr = rightop;
else if (equal(rightop, partkey))
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F5
### F6 · Accurate · Factual · Partitioned primary keys must include partition columns and cannot use expression partition keys.
Location: excerpt · section “UUIDv7 costs” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=a%20primary%20key%20on%20a,must%20include%20the%20partition%20key)
Article says:
```text
…a primary key on a partitioned table must include the partition key…
```
What is true:
PostgreSQL rejects a partitioned unique constraint that omits a partitioning column. It also rejects these constraints when partition keys contain expressions. The stated restrictions on created_at and uuid_extract_timestamp(id) follow from those checks.
Charitable reading:
The uniqueness conclusion compares the three partitioning choices described in the article.
Review: We tested whether the conclusion excludes hash partitioning. The finding confines itself to the three stated designs. We considered whether unrelated partition schemes defeated the conclusion. The finding confines the comparison to the article's alternatives. Both constraint restrictions appear explicitly in indexcmds.c.
Sources:
- [REL_18_6 · src/backend/commands/indexcmds.c:1032-1038](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/indexcmds.c#L1032-L1038)
Excerpt:
```text
if (key->partattrs[i] == 0)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("unsupported %s constraint with partition key definition",
constraint_type),
errdetail("%s constraints cannot be used when partition keys include expressions.",
constraint_type)));
```
- [REL_18_6 · src/backend/commands/indexcmds.c:1107-1112](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/indexcmds.c#L1107-L1112)
Excerpt:
```text
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("unique constraint on partitioned table must include all partitioning columns"),
errdetail("%s constraint on table \"%s\" lacks column \"%s\" which is part of the partition key.",
constraint_type, RelationGetRelationName(rel),
NameStr(att->attname))));
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F6
### F7 · Accurate · Factual · Verified accurate: “…first change to a page after a checkpoint writes a full image…”
Location: excerpt · section “WAL” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=first%20change%20to%20a%20page,checkpoint%20writes%20a%20full%20image)
Article says:
```text
…first change to a page after a checkpoint writes a full image…
```
What is true:
The WAL insertion code compares the page LSN with the checkpoint redo position. With full_page_writes enabled, ordinary first modifications require page images. Repeated changes amortize those images across inserts. More distinct existing leaves can require more images within a checkpoint interval.
Review: The finding assigns the comparison to the WAL writer. E-41 places it in the WAL insertion code. We considered initialization and forced-image exceptions. The finding concerns existing leaves under ordinary logged modifications. The page-LSN comparison supports its checkpoint explanation.
Sources:
- [REL_18_6 · src/backend/access/transam/xloginsert.c:618-620](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xloginsert.c#L618-L620)
Excerpt:
```text
XLogRecPtr page_lsn = PageGetLSN(regbuf->page);
needs_backup = (page_lsn <= RedoRecPtr);
```
- [REL_18_6 · doc/src/sgml/config.sgml:3387-3392](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3387-L3392)
Excerpt:
```text
When this parameter is on, the <productname>PostgreSQL</productname> server
writes the entire content of each disk page to WAL during the
first modification of that page after a checkpoint.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F7
### F8 · Accurate · Factual · checkpoint_timeout and max_wal_size control different checkpoint triggers.
Location: excerpt · section “WAL” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Raise%20max_wal_size%20too%2C%20so%20checkpoints%20stay%20timed.)
Article says:
```text
Raise max_wal_size too, so checkpoints stay timed.
```
What is true:
checkpoint_timeout sets the timed checkpoint interval. max_wal_size determines a WAL-distance checkpoint threshold. Increasing the timeout alone does not prevent WAL-driven checkpoints. Increasing checkpoint intervals can increase crash recovery work.
Charitable reading:
The recommendation seeks timed checkpoints under the measured write workload.
Review: We checked whether increasing timeout alone prevents WAL-driven checkpoints. The independent WAL-distance threshold defeats that interpretation. We checked whether checkpoint_timeout alone controlled checkpoint frequency. max_wal_size separately determines CheckPointSegments. The finding preserves that distinction and does not certify the measured WAL reduction.
Sources:
- [REL_18_6 · src/backend/access/transam/xlog.c:2187-2197](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlog.c#L2187-L2197)
Excerpt:
```text
target = (double) ConvertToXSegs(max_wal_size_mb, wal_segment_size) /
(1.0 + CheckPointCompletionTarget);
/* round down */
CheckPointSegments = (int) target;
```
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:2983-2991](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2983-L2991)
Excerpt:
```text
{"checkpoint_timeout", PGC_SIGHUP, WAL_CHECKPOINTS,
gettext_noop("Sets the maximum time between automatic WAL checkpoints."),
NULL,
GUC_UNIT_S
},
&CheckPointTimeout,
300, 30, 86400,
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F8
### F9 · Accurate · Factual · The background-writer defaults and ceiling counter match PostgreSQL 18.6.
Location: excerpt · section “Why UUIDv4 slows down” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=bgwriter_lru_maxpages%20%3D%20100%20per%20bgwriter_delay%20%3D%20200ms)
Article says:
```text
…bgwriter_lru_maxpages = 100 per bgwriter_delay = 200ms…
```
What is true:
bgwriter_lru_maxpages defaults to 100 buffers per round. bgwriter_delay defaults to 200 ms. The cleaning scan increments maxwritten_clean when its write count reaches the limit. pg_stat_bgwriter exposes that counter.
Charitable reading:
The 500 buffers/s figure is an approximate default ceiling under sustained activity.
Review: We tested whether the defaults guarantee 500 writes each second. The finding correctly states per-round limits instead. We checked whether 500 buffers/s was a guaranteed rate. The finding states the per-round defaults. The source increments maxwritten_clean when the scan reaches its write limit.
Sources:
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:3218-3236](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L3218-L3236)
Excerpt:
```text
{"bgwriter_delay", PGC_SIGHUP, RESOURCES_BGWRITER,
gettext_noop("Background writer sleep time between rounds."),
NULL,
GUC_UNIT_MS
},
&BgWriterDelay,
200, 10, 10000,
```
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:3229-3236](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L3229-L3236)
Excerpt:
```text
{"bgwriter_lru_maxpages", PGC_SIGHUP, RESOURCES_BGWRITER,
gettext_noop("Background writer maximum number of LRU pages to flush per round."),
gettext_noop("0 disables background writing.")
},
&bgwriter_lru_maxpages,
100, 0, INT_MAX / 2, /* Same upper limit as shared_buffers */
```
- [REL_18_6 · src/backend/storage/buffer/bufmgr.c:3875-3883](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L3875-L3883)
Excerpt:
```text
if (sync_state & BUF_WRITTEN)
{
reusable_buffers++;
if (++num_written >= bgwriter_lru_maxpages)
{
PendingBgWriterStats.maxwritten_clean++;
break;
}
}
```
- [REL_18_6 · src/backend/catalog/system_views.sql:1150-1155](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L1150-L1155)
Excerpt:
```text
CREATE VIEW pg_stat_bgwriter AS
SELECT
pg_stat_get_bgwriter_buf_written_clean() AS buffers_clean,
pg_stat_get_bgwriter_maxwritten_clean() AS maxwritten_clean,
pg_stat_get_buf_alloc() AS buffers_alloc,
pg_stat_get_bgwriter_stat_reset_time() AS stats_reset;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F9
### F10 · Accurate · Factual · The foreground-write diagnostic uses valid shared-buffer and pg_stat_io mechanisms.
Location: excerpt · section “Recommendations” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=watch%20pg_stat_io%20for%20writes%20by,backends%20in%20the%20normal%20context.)
Article says:
```text
…watch pg_stat_io for writes by client backends in the normal context.
```
What is true:
shared_buffers controls the shared buffer count. A backend can flush a dirty victim before reusing its buffer. pg_stat_io exposes the query's backend_type, object, context, reads, writes, and evictions columns. Those statistics aggregate activity across relations.
Charitable reading:
The diagnostic applies to the article's insert workload and uses cluster-wide statistics.
Review: We checked for unsupported relation-level attribution. The finding explicitly describes aggregate statistics and a valid dirty-victim flush path. We checked whether the counters identified the UUID index. The finding explicitly preserves their aggregate scope. The buffer replacement path can flush a dirty victim.
Sources:
- [REL_18_6 · src/backend/utils/misc/guc_tables.c:2379-2387](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/misc/guc_tables.c#L2379-L2387)
Excerpt:
```text
{"shared_buffers", PGC_POSTMASTER, RESOURCES_MEM,
gettext_noop("Sets the number of shared memory buffers used by the server."),
NULL,
GUC_UNIT_BLOCKS
},
&NBuffers,
16384, 16, INT_MAX / 2,
```
- [REL_18_6 · src/backend/storage/buffer/bufmgr.c:2420-2483](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L2420-L2483)
Excerpt:
```text
/* OK, do the I/O */
FlushBuffer(buf_hdr, NULL, IOOBJECT_RELATION, io_context);
LWLockRelease(content_lock);
```
- [REL_18_6 · src/backend/catalog/system_views.sql:1171-1193](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L1171-L1193)
Excerpt:
```text
CREATE VIEW pg_stat_io AS
SELECT
b.backend_type,
b.object,
b.context,
b.reads,
b.read_bytes,
b.read_time,
b.writes,
b.write_bytes,
b.write_time,
b.writebacks,
b.writeback_time,
b.extends,
b.extend_bytes,
b.extend_time,
b.hits,
b.evictions,
b.reuses,
b.fsyncs,
b.fsync_time,
b.stats_reset
FROM pg_stat_get_io() b;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F10
### F11 · Accurate · Factual · pg_stat_wal provides the stated class of WAL measurements.
Location: excerpt · section “Environment and load” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=pg_stat_wal)
Article says:
```text
…pg_stat_wal…
```
What is true:
pg_stat_wal exposes WAL records, full-page images, WAL bytes, WAL-buffer-full events, and the statistics reset timestamp. The view is appropriate for the named WAL sampling purpose.
Charitable reading:
The named view serves as a source of WAL counters.
Review: We compared every named counter with the view definition. The finding does not claim to verify sampling execution. We checked whether the finding certified sampling execution. It only verifies counter availability. The pg_stat_wal definition contains every named counter.
Sources:
- [REL_18_6 · src/backend/catalog/system_views.sql:1195-1202](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/system_views.sql#L1195-L1202)
Excerpt:
```text
CREATE VIEW pg_stat_wal AS
SELECT
w.wal_records,
w.wal_fpi,
w.wal_bytes,
w.wal_buffers_full,
w.stats_reset
FROM pg_stat_get_wal() w;
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F11
### F12 · Accurate · Factual · synchronous_commit waits for WAL flush in the demonstrated workload.
Location: excerpt · section “In memory” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=With%20synchronous_commit%20%3D%20on%20%2C,waits%20for%20its%20WAL%20flush)
Article says:
```text
With synchronous_commit = on , each transaction waits for its WAL flush…
```
What is true:
The commit path calls XLogFlush for committed WAL-writing transactions when synchronous_commit exceeds off. This supports the article's flush explanation. The measured grouping and throughput effects require the experiment's counters.
Charitable reading:
The statement concerns the demonstrated WAL-logged INSERT transactions.
Review: We tested read-only transactions as a counterexample. The finding limits its statement to the demonstrated logged writes. We considered read-only transactions and grouped flushes. The finding limits its claim to logged INSERT transactions. XLogFlush supports waiting for WAL durability without requiring a separate physical flush per transaction.
Sources:
- [REL_18_6 · src/backend/access/transam/xact.c:1498-1503](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L1498-L1503)
Excerpt:
```text
if ((wrote_xlog && markXidCommitted &&
synchronous_commit > SYNCHRONOUS_COMMIT_OFF) ||
forceSyncCommit || nrels > 0)
{
XLogFlush(XactLastRecEnd);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F12
### F13 · Accurate · Factual · PostgreSQL 18 enables checksums by default and protects qualifying hint-bit changes with page images.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=With%20checksums%2C%20hint%2Dbit%20changes%20also,full%2Dpage%20images%20after%20a%20checkpoint.)
Article says:
```text
With checksums, hint-bit changes also write full-page images after a checkpoint.
```
What is true:
initdb defaults data_checksums to true in PostgreSQL 18. Checksums activate XLogHintBitIsNeeded(). The hint-bit dirtying path records a page image when the hint update is the first post-checkpoint change requiring protection.
Charitable reading:
The hint-bit statement concerns permanent pages during ordinary primary operation.
Review: We checked the PostgreSQL 18.0 default and the first-change condition. The finding preserves both qualifications. We checked the PostgreSQL 18.0 default and exceptions for recovery and already-dirty buffers. The finding's qualifying language matches those restrictions.
Sources:
- [REL_18_6 · src/bin/initdb/initdb.c:167-167](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/initdb/initdb.c#L167-L167)
Excerpt:
```text
static bool data_checksums = true;
```
- [REL_18_0 · src/bin/initdb/initdb.c:163-169](https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/bin/initdb/initdb.c#L163-L169)
Qualification: Version note: Checked the PostgreSQL 18 version floor.
Excerpt:
```text
static bool data_checksums = true;
```
- [REL_18_6 · src/include/access/xlog.h:120-120](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/access/xlog.h#L120-L120)
Excerpt:
```text
#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints)
```
- [REL_18_6 · src/backend/storage/buffer/bufmgr.c:5490-5547](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/storage/buffer/bufmgr.c#L5490-L5547)
Excerpt:
```text
* If we need to protect hint bit updates from torn writes, WAL-log a
* full page image of the page. This full page image is only necessary
* if the hint bit update is the first change to the page since the
* last checkpoint.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F13
### F14 · Accurate · Factual · The leaf-entry layout and default B-tree fillfactor support the size calculation.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=An%20index%20entry%20is%20an,tuple%20header%20plus%20the%20key)
Article says:
```text
An index entry is an 8-byte tuple header plus the key…
```
What is true:
The tuple header contains a heap TID and t_info. PostgreSQL aligns tuple storage and adds a line pointer. On the tested build, this gives 28 B per UUID entry and 20 B per bigint entry. B-tree fillfactor defaults to 90.
Charitable reading:
The calculation describes non-null, single-column leaf entries on the stated 64-bit server.
Review: We recalculated aligned entry sizes and checked the line pointer. The stated 28-byte and 20-byte sizes follow. We checked whether alignment or line pointers changed the entry widths. On the stated build, the totals remain 28 B and 20 B. The finding separates those widths from measured index sizes.
Sources:
- [REL_18_6 · src/include/access/itup.h:25-52](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/access/itup.h#L25-L52)
Excerpt:
```text
typedef struct IndexTupleData
{
ItemPointerData t_tid; /* reference TID to heap tuple */
/* ---------------
* t_info is laid out in the following fashion:
*
* 15th (high) bit: has nulls
* 14th bit: has var-width attributes
* 13th bit: AM-defined meaning
* 12-0 bit: size of tuple
* ---------------
*/
unsigned short t_info; /* various info about tuple */
} IndexTupleData;
```
- [REL_18_6 · src/include/storage/itemid.h:23-45](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/storage/itemid.h#L23-L45)
Excerpt:
```text
typedef struct ItemIdData
{
unsigned lp_off:15, /* offset to tuple (from start of page) */
lp_flags:2, /* state of line pointer, see below */
lp_len:15; /* byte length of tuple */
} ItemIdData;
```
- [REL_18_6 · src/backend/access/common/indextuple.c:150-166](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/common/indextuple.c#L150-L166)
Excerpt:
```text
size = hoff + data_size;
size = MAXALIGN(size); /* be conservative */
```
- [REL_18_6 · src/include/access/nbtree.h:201-201](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/access/nbtree.h#L201-L201)
Excerpt:
```text
#define BTREE_DEFAULT_FILLFACTOR 90
```
- [REL_18_6 · src/include/utils/uuid.h:18-18](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/utils/uuid.h#L18-L18)
Excerpt:
```text
#define UUID_LEN 16
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F14
### F15 · Accurate · Factual · VACUUM does not compact partly occupied B-tree leaves.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Only%20a%20rebuild%2C%20such%20as,CONCURRENTLY%20%2C%20recovers%20that%20space.)
Article says:
```text
Only a rebuild, such as REINDEX CONCURRENTLY , recovers that space.
```
What is true:
B-tree page deletion begins with an empty leaf. VACUUM does not merge partly occupied leaves. A rebuild repacks surviving entries. This supports the rebuild recommendation under the article's stated random-delete and ascending-refill conditions.
Charitable reading:
The recommendation concerns partly occupied leaves that future ascending keys do not revisit.
Review: We tested empty-page recycling as a counterexample. The finding correctly concerns partly occupied leaves that ascending inserts do not revisit. We tried the empty-page recycling counterexample. The article describes partly occupied leaves that ascending inserts do not revisit. The source explicitly excludes merging those leaves.
Sources:
- [REL_18_6 · src/backend/access/nbtree/nbtsort.c:662-667](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtsort.c#L662-L667)
Excerpt:
```text
state->btps_level = level;
/* set "full" threshold based on level. See notes at head of file. */
if (level > 0)
state->btps_full = (BLCKSZ * (100 - BTREE_NONLEAF_FILLFACTOR) / 100);
else
state->btps_full = BTGetTargetPageFreeSpace(wstate->index);
```
- [REL_18_6 · src/backend/access/nbtree/README:235-241](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/README#L235-L241)
Excerpt:
```text
We consider deleting an entire page from the btree only when it's become
completely empty of items.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F15
### F16 · Accurate · Factual · The table definitions use supported built-in defaults and column declarations.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=id%20uuid%20default%20gen_random_uuid%28%29%20primary%20key)
Article says:
```text
…id uuid default gen_random_uuid() primary key…
```
What is true:
The UUID defaults return uuid. The bigint identity declaration supplies sequence values. clock_timestamp() supplies the shown timestamp default. The INSERT can omit both defaulted columns. The secondary indexes reference columns declared in the table.
Charitable reading:
The commented id declarations are alternatives for separate table variants.
Review: We checked default types and omitted columns. The commented declarations are alternatives, and the finding does not certify runtime permissions. We checked whether the commented declarations created conflicting columns. They are alternatives. Built-in defaults and identity semantics support the recipe's declarations. The finding does not certify permissions or execution.
Sources:
- [REL_18_6 · src/backend/utils/adt/uuid.c:539-544](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L539-L544)
Excerpt:
```text
* Generate UUID version 4.
*
* All UUID bytes are filled with strong random numbers except version and
* variant bits.
```
- [REL_18_6 · doc/src/sgml/ref/create_table.sgml:886-906](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/create_table.sgml#L886-L906)
Excerpt:
```text
The default expression will be used in any insert operation that
does not specify a value for the column. If there is no default
for a column, then the default is null.
```
- [REL_18_6 · doc/src/sgml/ref/create_table.sgml:941-954](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/create_table.sgml#L941-L954)
Excerpt:
```text
This clause creates the column as an <firstterm>identity
column</firstterm>. It will have an implicit sequence attached to it
and in newly-inserted rows the column will automatically have values
from the sequence assigned to it.
Such a column is implicitly <literal>NOT NULL</literal>.
```
- [REL_18_6 · doc/src/sgml/func.sgml:11246-11255](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L11246-L11255)
Excerpt:
```text
<function>clock_timestamp()</function> returns the actual current time, and
therefore its value changes even within a single SQL statement.
```
- [REL_18_6 · src/include/catalog/pg_proc.dat:9482-9501](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/catalog/pg_proc.dat#L9482-L9501)
Excerpt:
```text
{ oid => '6429', descr => 'generate UUID version 7',
proname => 'uuidv7', provolatile => 'v', prorettype => 'uuid',
proargtypes => '', prosrc => 'uuidv7' },
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F16
### F17 · Accurate · Factual · The pgbench Zipfian expression and payload expression are supported.
Location: excerpt · section “The test” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=%5Cset%20uid%20random_zipfian%281%2C%2010000000%2C%201.1%29)
Article says:
```text
…\set uid random_zipfian(1, 10000000, 1.1)…
```
What is true:
pgbench accepts Zipfian parameters from 1.001 through 1000, including 1.1. The SQL hashes the text representation of random() and repeats the resulting hexadecimal MD5 text three times. The statement supplies the required user_id and payload values.
Charitable reading:
The backslash command belongs to a pgbench script.
Review: We checked pgbench's parameter restriction independently of SQL parsing. The parameter 1.1 and the payload expression remain supported. We checked the pgbench interpretation and Zipfian parameter range. Parameter 1.1 is supported. MD5 text repeated 3 times supplies the stated payload expression.
Sources:
- [REL_18_6 · doc/src/sgml/ref/pgbench.sgml:2188-2198](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pgbench.sgml#L2188-L2198)
Excerpt:
```text
the <replaceable>parameter</replaceable> value is restricted to
the range [1.001, 1000].
```
- [REL_18_6 · doc/src/sgml/func.sgml:3234-3250](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L3234-L3250)
Excerpt:
```text
Computes the MD5 <link linkend="functions-hash-note">hash</link> of
the argument, with the result written in hexadecimal.
```
- [REL_18_6 · doc/src/sgml/func.sgml:3631-3642](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L3631-L3642)
Excerpt:
```text
Repeats <parameter>string</parameter> the specified
<parameter>number</parameter> of times.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F17
### F18 · Accurate · Factual · The PostgreSQL 17 timestamp limitation and UUIDv7 SQL workaround are supported.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=In%20Postgres%2017%2C%20uuid_extract_timestamp%28%29%20returns%20NULL%20for%20UUIDv7)
Article says:
```text
…In Postgres 17, uuid_extract_timestamp() returns NULL for UUIDv7…
```
What is true:
The PostgreSQL 17 native extractor handles version 1 and returns NULL otherwise. PostgreSQL 18 adds version 7. The SQL workaround converts the first 48 bits from milliseconds to Unix seconds. It does not validate the UUID version.
Charitable reading:
The version comparison describes the native extractor. The SQL workaround explicitly accepts only UUIDv7 values.
Review: We checked version-specific extraction and the unsigned 48-bit conversion. The workaround's missing version validation is already explicit. We checked the PostgreSQL 17 versus 18 distinction and the workaround's units. Version 17 returns NULL for UUIDv7. The workaround divides unsigned 48-bit milliseconds by 1000.0 and explicitly excludes other UUID versions.
Sources:
- [REL_17_0 · src/backend/utils/adt/uuid.c:445-471](https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/backend/utils/adt/uuid.c#L445-L471)
Qualification: Version note: The only timestamp branch in this range handles version 1.
Excerpt:
```text
/* not a timestamp-containing UUID version */
PG_RETURN_NULL();
```
- [REL_18_6 · src/backend/utils/adt/uuid.c:745-810](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L745-L810)
Excerpt:
```text
if (version == 7)
{
tms = (uuid->data[5])
+ (((uint64) uuid->data[4]) << 8)
+ (((uint64) uuid->data[3]) << 16)
+ (((uint64) uuid->data[2]) << 24)
+ (((uint64) uuid->data[1]) << 32)
+ (((uint64) uuid->data[0]) << 40);
```
- [REL_17_7 · src/backend/utils/adt/varbit.c:1666-1697](https://github.com/postgres/postgres/blob/fbb530a3dff569222bea7098ad4de3d8bde97740/src/backend/utils/adt/varbit.c#L1666-L1697)
Qualification: Version note: Checked the release named for the SQL recipe.
Excerpt:
```text
result = 0;
for (r = VARBITS(arg); r < VARBITEND(arg); r++)
{
result <<= BITS_PER_BYTE;
result |= *r;
}
/* Now shift the result to take account of the padding at the end */
result >>= VARBITPAD(arg);
PG_RETURN_INT64(result);
```
- [REL_18_6 · doc/src/sgml/func.sgml:10144-10154](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L10144-L10154)
Excerpt:
```text
Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
timestamp with time zone
```
- [REL_18_6 · doc/src/sgml/func.sgml:14425-14556](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L14425-L14556)
Excerpt:
```text
Extracts the version from a UUID of one of the variants described by
<ulink url="https://datatracker.ietf.org/doc/html/rfc9562">RFC
9562</ulink>. For other variants, this function returns null.
```
- [REL_18_0 · doc/src/sgml/func.sgml:14517-14525](https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/doc/src/sgml/func.sgml#L14517-L14525)
Qualification: Version note: Checked the PostgreSQL 18 version floor.
Excerpt:
```text
Extracts a <type>timestamp with time zone</type> from UUID
version 1 and 7. For other versions, this function returns null.
```
- [REL_17_0 · doc/src/sgml/func.sgml:14186-14195](https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/doc/src/sgml/func.sgml#L14186-L14195)
Qualification: Version note: Checked the PostgreSQL 17 version floor.
Excerpt:
```text
This function extracts a <type>timestamp with time zone</type> from UUID
version 1. For other versions, this function returns null.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F18
### F19 · Accurate · Factual · The UUID time-bound construction matches UUID byte ordering.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=put%20the%20Unix%20time%20in,Fill%20the%20rest%20with%20zeros.)
Article says:
```text
…put the Unix time in milliseconds into the first 48 bits. Fill the rest with zeros.
```
What is true:
UUID comparison uses memcmp. UUIDv7 stores Unix milliseconds in its leading 48 bits. A zero suffix sorts below valid UUIDv7 values with that prefix. The stated 2026-10-01 boundary has hexadecimal prefix 01a0f4c2c400.
Charitable reading:
The boundary represents the stated millisecond and uses ordinary bytewise UUID ordering.
Review: We independently calculated the October 2026 prefix and checked byte ordering. The zero suffix supplies the stated lower bound. We checked whether the zero suffix needed valid UUIDv7 version bits. It serves as a comparison bound. Bytewise ordering places valid UUIDv7 values with that millisecond prefix above it.
Sources:
- [REL_18_6 · src/backend/utils/adt/uuid.c:608-732](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L608-L732)
Excerpt:
```text
* UUID version 7 consists of a Unix timestamp in milliseconds (48 bits) and
* 74 random bits, excluding the required version and variant bits.
```
- [REL_18_6 · src/backend/utils/adt/uuid.c:219-225](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L219-L225)
Excerpt:
```text
static int
uuid_internal_cmp(const pg_uuid_t *arg1, const pg_uuid_t *arg2)
{
return memcmp(arg1->data, arg2->data, UUID_LEN);
}
```
- [REL_18_6 · doc/src/sgml/func.sgml:10144-10154](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L10144-L10154)
Excerpt:
```text
Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to
timestamp with time zone
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F19
### F20 · Accurate · Factual · AWS supports the stated Aurora write-request units and batching condition.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Aurora%20counts%20write%20I%2FOs%20in%204%20KiB%20units.)
Article says:
```text
…Aurora counts write I/Os in 4 KiB units.
```
What is true:
AWS describes Aurora writes in 4 KB units when possible. It describes batching small log records when the writer has several available together. These statements support the article's batching assumptions, subject to its stated model limits.
Charitable reading:
The article presents billing arithmetic under explicit batching assumptions.
Review: We checked whether batching is unconditional. The finding preserves the requirement that several small records be available together. We checked whether the finding turned billing assumptions into measured costs. It does not. The cited page expressly describes 4 KB units and conditional batching of smaller records.
Sources:
- [https://aws.amazon.com/blogs/database/planning-i-o-in-amazon-aurora/](https://aws.amazon.com/blogs/database/planning-i-o-in-amazon-aurora/)
Excerpt:
```text
Although actual log records vary in size, writes to an Aurora cluster are sent in 4 KB units when possible. If the writer has several log records at the same time that are less than 4 KB in size, they’re batched together into a single write operation.
```
- [https://aws.amazon.com/blogs/database/planning-i-o-in-amazon-aurora/](https://aws.amazon.com/blogs/database/planning-i-o-in-amazon-aurora/)
Excerpt:
```text
Log records greater than 4 KB are split into 4 KB units.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F20
### F21 · Accurate · Factual · Heap insertion does not cluster rows by primary-key value.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=In%20Postgres%2C%20an%20insert%2Donly%20table,the%20heap%20whatever%20the%20key)
Article says:
```text
In Postgres, an insert-only table appends rows to the heap whatever the key…
```
What is true:
RelationGetBufferForTuple selects heap space using available page space and the free-space map. It extends the relation when necessary. The primary-key value does not impose heap ordering. Random-key placement occurs in the corresponding B-tree.
Charitable reading:
The comparison concerns the demonstrated insert-only heap table.
Review: We tested free-space reuse against literal append-only placement. The finding correctly describes space-based placement without primary-key heap ordering. We checked whether heap space reuse contradicted the finding. The finding explicitly includes the free-space map. It verifies independence from primary-key order rather than unconditional end-of-file insertion.
Sources:
- [REL_18_6 · src/backend/access/heap/hio.c:437-480](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/heap/hio.c#L437-L480)
Excerpt:
```text
* We normally use FSM to help us find free space. However,
* if HEAP_INSERT_SKIP_FSM is specified, we just append a new empty page to
* the end of the relation if the tuple won't fit on the current target page.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F21
### F22 · Accurate · Factual · UUIDv4 ordering does not express row recency.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Order%20by%20created_at%20on%20UUIDv4%20tables.)
Article says:
```text
Order by created_at on UUIDv4 tables.
```
What is true:
UUID comparison orders the stored bytes. UUIDv4 fills those bytes randomly apart from version and variant bits. Descending UUIDv4 order selects large random identifiers. Ordering by the shown created_at column expresses the requested creation-time ordering.
Charitable reading:
The recommendation concerns the shown schema and its generated creation timestamp.
Review: We checked whether descending UUIDv4 order encodes recency. Random bytes and memcmp provide no creation-time ordering. We considered commit ordering and explicitly supplied timestamps. The finding concerns the shown clock_timestamp() default. It correctly avoids promising commit order or validating displayed lookup timings.
Sources:
- [REL_18_6 · src/backend/utils/adt/uuid.c:539-544](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L539-L544)
Excerpt:
```text
* Generate UUID version 4.
*
* All UUID bytes are filled with strong random numbers except version and
* variant bits.
```
- [REL_18_6 · src/backend/utils/adt/uuid.c:219-225](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/uuid.c#L219-L225)
Excerpt:
```text
static int
uuid_internal_cmp(const pg_uuid_t *arg1, const pg_uuid_t *arg2)
{
return memcmp(arg1->data, arg2->data, UUID_LEN);
}
```
- [REL_18_6 · src/backend/access/nbtree/nbtsplitloc.c:329-335](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtsplitloc.c#L329-L335)
Excerpt:
```text
else
{
/* Other leaf page. 50:50 page split. */
usemult = false;
/* fillfactormult not used, but be tidy */
fillfactormult = 0.50;
}
```
- [REL_18_6 · doc/src/sgml/func.sgml:11246-11255](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/func.sgml#L11246-L11255)
Excerpt:
```text
<function>clock_timestamp()</function> returns the actual current time, and
therefore its value changes even within a single SQL statement.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F22
### F23 · Accurate · Factual · wal_compression compresses page images and conditionally supports lz4.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=wal_compression%20%3D%20off%20%28lz4%20tested%20separately%29)
Article says:
```text
…wal_compression = off (lz4 tested separately)…
```
What is true:
wal_compression compresses full-page images in WAL. PostgreSQL decompresses those images during replay. lz4 requires a build configured with lz4 support. The setting does not compress every logical WAL record.
Charitable reading:
The article distinguishes its uncompressed baseline from a separate lz4 measurement.
Review: We tested whether compression covers all WAL records. The finding correctly limits it to page images and states the build dependency. We checked whether wal_compression compressed every WAL record. The finding correctly limits compression to page images and states the lz4 build dependency. The measured reduction remains outside its verification.
Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:3453-3486](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L3453-L3486)
Excerpt:
```text
server compresses full page images written to WAL (e.g. when
<xref linkend="guc-full-page-writes"/> is on, during a base backup,
etc.).
A compressed page image will be decompressed during WAL replay.
The supported methods are <literal>pglz</literal>,
<literal>lz4</literal> (if <productname>PostgreSQL</productname>
was compiled with <option>--with-lz4</option>)
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F23
### F24 · Accurate · Factual · The physical recovery loop applies WAL records serially.
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=The%20startup%20process%20replays%20WAL%20in%20one%20process)
Article says:
```text
The startup process replays WAL in one process…
```
What is true:
The recovery loop calls ApplyWalRecord for the current record before fetching the next record. This supports the article's single-process replay explanation. The replay performance differences require the standby measurements.
Charitable reading:
The statement concerns physical WAL application by the startup recovery process.
Review: We checked record application against prefetching. The recovery loop applies each record before requesting the next. We checked whether prefetching defeated the serial replay description. The recovery loop applies each record before reading the next. The finding concerns application order, not all standby I/O.
Sources:
- [REL_18_6 · src/backend/access/transam/xlogrecovery.c:1842-1863](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xlogrecovery.c#L1842-L1863)
Excerpt:
```text
ApplyWalRecord(xlogreader, record, &replayTLI);
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F24
### F25 · Accurate · Factual · PostgreSQL 18 documents uuidv7()
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Postgres%2018%20ships%20uuidv7%28%29)
Article says:
```text
…Postgres 18 ships uuidv7()…
```
What is true:
PostgreSQL 18 lists uuidv7() as a built-in UUIDv7 generator. The documented signature accepts an optional shift interval.
Charitable reading:
The claim concerns PostgreSQL 18 availability.
Review: We checked the PostgreSQL 18 signature. It explicitly provides the built-in generator and optional interval. We checked availability versus extension requirements. The PostgreSQL 18 function reference lists uuidv7() directly, with an optional shift interval.
Sources:
- [https://www.postgresql.org/docs/18/functions-uuid.html](https://www.postgresql.org/docs/18/functions-uuid.html)
Excerpt:
```text
uuidv7 ( [ shift interval ] ) → uuid Generates a version 7 (time-ordered) UUID.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F25
### F26 · Accurate · Factual · PostgreSQL 18 documents a sub-millisecond UUIDv7 component
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Postgres%2018%20adds%20a%20sub%2Dmillisecond%20fraction)
Article says:
```text
…Postgres 18 adds a sub-millisecond fraction…
```
What is true:
PostgreSQL 18 documents millisecond time, a sub-millisecond timestamp component, and random data in uuidv7().
Charitable reading:
The claim describes the timestamp component, not guaranteed clock accuracy.
Review: We checked whether documentation promises exact clock accuracy. The finding only verifies the sub-millisecond timestamp component. We checked whether the finding implied clock accuracy or platform-specific precision. It claims only the documented sub-millisecond component.
Sources:
- [https://www.postgresql.org/docs/18/functions-uuid.html](https://www.postgresql.org/docs/18/functions-uuid.html)
Excerpt:
```text
The timestamp is computed using UNIX timestamp with millisecond precision + sub-millisecond timestamp + random.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F26
### F27 · Accurate · Factual · UUIDv4 timestamp extraction returns null in PostgreSQL 18
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=uuid_extract_timestamp%28%29%20returns%20NULL%20for%20them)
Article says:
```text
…uuid_extract_timestamp() returns NULL for them…
```
What is true:
PostgreSQL 18 documents timestamp extraction for UUID versions 1 and 7. Other versions, including UUIDv4, return null.
Charitable reading:
The surrounding passage identifies the existing values as UUIDv4.
Review: We read the surrounding extraction documentation. Its other-versions clause includes UUIDv4. We checked the antecedent of 'them' in the article. It refers to retained UUIDv4 values. The documentation excludes UUIDv4 from timestamp extraction.
Sources:
- [https://www.postgresql.org/docs/18/functions-uuid.html](https://www.postgresql.org/docs/18/functions-uuid.html)
Excerpt:
```text
For other versions, this function returns null.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F27
### F28 · Accurate · Factual · PostgreSQL 18 documents both UUIDv4 generator names
Location: excerpt · section “Footnotes” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Postgres%2018%20also%20adds%20uuidv4%28%29%20%2C%20another%20name%20for%20gen_random_uuid%28%29)
Article says:
```text
…Postgres 18 also adds uuidv4() , another name for gen_random_uuid()…
```
What is true:
PostgreSQL 18 documents gen_random_uuid() and uuidv4() together as UUIDv4 generators.
Charitable reading:
Another name means the same documented UUIDv4 generation operation.
Review: We checked both function names in the versioned table. Both generate UUIDv4. We checked whether the finding independently established the introduction release. Its wording only verifies the two documented names. The PostgreSQL 18 reference groups them under UUIDv4 generation.
Sources:
- [https://www.postgresql.org/docs/18/functions-uuid.html](https://www.postgresql.org/docs/18/functions-uuid.html)
Excerpt:
```text
gen_random_uuid ( ) → uuid uuidv4 ( ) → uuid Generates a version 4 (random) UUID
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F28
### F29 · Accurate · Factual · The cited bulk-load timings round correctly
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=UUIDv4%20took%2020%3A40%20and%20UUIDv7%201%3A46)
Article says:
```text
…UUIDv4 took 20:40 and UUIDv7 1:46…
```
What is true:
The cited 50-million-row load reports 20:39.840 for UUIDv4 and 01:46.343 for UUIDv7. The article rounds those to 20:40 and 1:46.
Charitable reading:
The article rounds the cited elapsed times to whole seconds.
Review: We recalculated the rounded durations. Both match the cited timings. F41 repeats this check. We checked the empty-table heading and milliseconds against the displayed minutes. Both round correctly. The finding verifies attribution and rounding rather than benchmark execution.
Sources:
- [https://www.credativ.de/en/blog/postgresql-en/a-deeper-look-at-old-uuidv4-vs-new-uuidv7-in-postgresql-18/](https://www.credativ.de/en/blog/postgresql-en/a-deeper-look-at-old-uuidv4-vs-new-uuidv7-in-postgresql-18/)
Excerpt:
```text
Insert time: 1239839.702 ms (20:39.840) Insert time: 106343.314 ms (01:46.343)
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F29
### F30 · Accurate · Factual · The earlier benchmark reports throughput below 30%
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=random%20keys%20ran%20at%20less%20than%2030%25)
Article says:
```text
…random keys ran at less than 30%…
```
What is true:
The cited benchmark reports random UUID throughput below 30% for data exceeding shared buffers but fitting RAM. It says ordered generators largely maintained throughput.
Charitable reading:
The comparison concerns the cited medium dataset and its nearly unchanged ordered generators.
Review: We checked the comparison population. The finding preserves the benchmark's shared-buffer and RAM conditions. We checked the denominator behind 'less than 30%'. The source says original throughput and separately describes ordered generators maintaining performance. The finding preserves that distinction.
Sources:
- [https://www.enterprisedb.com/blog/sequential-uuid-generators](https://www.enterprisedb.com/blog/sequential-uuid-generators)
Excerpt:
```text
For the medium scale (larger than shared buffers, still fits into RAM) this changes quite a bit and the random UUID generator drops to less than 30% of the original throughput, while the other generators pretty much maintain the performance.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F30
### F31 · Accurate · Factual · The cited payment benchmark omits its database and primary-key role
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=It%20does%20not%20name%20the,key%20was%20the%20primary%20key.)
Article says:
```text
It does not name the database or say that the key was the primary key.
```
What is true:
The cited anecdote reports 50% lower INSERT duration after replacing UUIDv4 idempotency keys with ULIDs. It identifies neither the database nor a primary-key role.
Charitable reading:
The sentence concerns the UUID-to-ULID anecdote, not every database reference elsewhere in the cited article.
Review: We searched the full page for database names. Other sections mention MySQL but do not identify this anecdote's database. We checked whether the anecdote identified a database or primary-key role. It identifies idempotency keys and a 50% duration reduction. The finding does not certify the underlying measurement.
Sources:
- [https://shopify.engineering/building-resilient-payment-systems](https://shopify.engineering/building-resilient-payment-systems)
Excerpt:
```text
In one high-throughput system at Shopify we’ve seen a 50 percent decrease in INSERT statement duration by switching from UUIDv4 to ULID for idempotency keys.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F31
### F32 · Accurate · Factual · Aurora I/O-Optimized includes read and write I/O charges
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Aurora%20I%2FO%2DOptimized%20has%20no%20per%2DI%2FO%20charge)
Article says:
```text
Aurora I/O-Optimized has no per-I/O charge…
```
What is true:
The Aurora billing FAQ includes read and write I/O at no additional charge under I/O-Optimized.
Charitable reading:
The claim concerns ordinary read and write I/O charges. It does not claim zero total database cost.
Review: We checked whether the claim concerns all storage charges. It correctly concerns only additional read and write I/O charges. We checked whether 'no per-I/O charge' implied a free database. The finding concerns read and write I/O charges only. The billing FAQ supports that scope.
Sources:
- [https://docs.aws.amazon.com/rds/latest/auroraextendedcontent/aurora-faq-billing.html](https://docs.aws.amazon.com/rds/latest/auroraextendedcontent/aurora-faq-billing.html)
Excerpt:
```text
With Aurora I/O-Optimized, read and write I/O operations are included at no additional charge.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F32
### F33 · Accurate · Factual · UUIDv7 starts with a 48-bit millisecond timestamp
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=The%20first%2048%20bits%20are%20a%20millisecond%20timestamp)
Article says:
```text
The first 48 bits are a millisecond timestamp…
```
What is true:
RFC 9562 section 5.7 assigns the first 48 bits to a big-endian Unix timestamp in milliseconds.
Charitable reading:
The claim describes the UUIDv7 timestamp field, not independent proof of a row's creation time.
Review: We checked field width, byte order, and timestamp units against RFC 9562. All three match. We checked field width, byte order, and time units in RFC 9562. All match. The finding makes no claim that the field proves row creation time.
Sources:
- [https://www.rfc-editor.org/rfc/rfc9562](https://www.rfc-editor.org/rfc/rfc9562)
Excerpt:
```text
48-bit big-endian unsigned number of the Unix Epoch timestamp in
milliseconds as per Section 6.1 .
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F33
### F34 · Accurate · Factual · UUIDv4 has 122 random bits
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=UUIDv4%3A%20122%20random%20bits)
Article says:
```text
…UUIDv4: 122 random bits…
```
What is true:
RFC 9562 specifies 122 random bits for UUIDv4. The remaining 6 bits encode its version and variant.
Charitable reading:
The claim describes UUIDv4's random fields, excluding its version and variant bits.
Review: We checked the UUIDv4 layout. Its version and variant fields leave 122 random bits. We checked whether version and variant fields reduced the stated random-bit count. RFC 9562 assigns 122 random bits after excluding those 6 bits.
Sources:
- [https://www.rfc-editor.org/rfc/rfc9562](https://www.rfc-editor.org/rfc/rfc9562)
Excerpt:
```text
random_ c (122 bits total)
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F34
### F35 · Accurate · Factual · The reported index-size percentages agree
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=an%20int8%20index%20is%2029%25%20smaller%20than%20a%20UUIDv7%20index.)
Article says:
```text
…an int8 index is 29% smaller than a UUIDv7 index.
```
What is true:
The int8 index uses 28.8% fewer bytes than UUIDv7 (derived: 1 − 2,146 / 3,012). UUIDv4 uses 32.7% more bytes than UUIDv7 (derived: 3,996 / 3,012 − 1). Both percentages round as stated.
Charitable reading:
The percentage compares complete measured primary-key indexes at equal row counts.
Review: We recalculated both percentages using UUIDv7 as denominator. They round to 28.8% smaller and 32.7% larger. We checked column ordering and percentage denominators. The reported sizes yield 28.8% less for int8 and 32.7% more for UUIDv4, each relative to UUIDv7.
Sources:
- [https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc](https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc)
Excerpt:
```text
PK index 3,996 MiB 3,012 MiB 2,146 MiB
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F35
### F36 · Accurate · Factual · All 12 size-planning cells round correctly
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Rows%20%3D%20size%20%C3%B7%20bytes%20per%20row%20at%20100M%20rows)
Article says:
```text
…Rows = size ÷ bytes per row at 100M rows…
```
What is true:
The table consistently uses binary capacities and 41.8, 31.5, and 22.5 bytes per row. One GiB holds approximately 25.7 million UUIDv4 entries (derived: 1,073,741,824 bytes / 41.8 bytes per row).
Charitable reading:
The table estimates capacity from rounded measured bytes per row. It does not promise a measured slowdown threshold.
Review: We checked binary capacities against decimal row counts. The table's rounded thresholds follow the stated bytes per row. We recalculated all 12 cells using binary capacities and the stated bytes per row. Every cell rounds correctly. The finding does not interpret these capacities as universal slowdown thresholds.
Sources:
- [https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc](https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc)
Excerpt:
```text
primary key size v4 rows v7 rows int8 rows 512 MiB 12.8M 17.0M 23.9M 1 GiB 25.7M 34.1M 47.7M 4 GiB 102.8M 136.3M 190.9M 16 GiB 411.0M 545.4M 763.5M
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F36
### F37 · Accurate · Factual · The WAL range matches the stated measurement window
Location: excerpt · section “WAL” · as fetched 2026-11-11 · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=UUIDv4%20wrote%201.5%20to%201.9,row%20on%20the%20same%20server.)
Article says:
```text
…UUIDv4 wrote 1.5 to 1.9 times the reference key's WAL per row on the same server.
```
What is true:
The study reports UUIDv4/reference WAL ratios of 1.53–1.85 over 90 million to 100 million rows. The article rounds that range to 1.5–1.9.
Charitable reading:
The comparison includes total WAL, including autovacuum, over the stated row window.
Review: We checked the row window and rounding. The finding verifies the study's reported range without claiming independent measurement. We checked competing WAL windows and autovacuum exclusions. The finding uses total WAL over 90 million to 100 million rows. The 1.53–1.85 range rounds as stated.
Sources:
- [https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc](https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc)
Excerpt:
```text
UUIDv4 ÷ reference WAL per row is 1.53 to 1.85 over 90M to 100M rows with autovacuum's WAL included
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F37
### F38 · Accurate · Factual · The clock-skew figures match the study
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=The%20index%20ended%20up%2069%25,of%20leaves%20out%20of%20order.)
Article says:
```text
The index ended up 69% full, with 45% of leaves out of order.
```
What is true:
The study reports 69% leaf density and 45% physical leaf disorder for skewed UUIDv7 clients. Clean UUIDv7 insertion produced 90% density and no physical leaf disorder.
Charitable reading:
The result applies to the tested 16-client workload with offsets spanning plus or minus 60 seconds.
Review: We checked whether physical leaf disorder implies broken logical ordering. The finding correctly limits the metric to physical disorder. We checked whether physical leaf disorder meant incorrect logical ordering. The finding explicitly describes physical disorder. Both percentages match the study's 16-client clock-skew test.
Sources:
- [https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc](https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc)
Excerpt:
```text
The PK ended up with 69% leaf density and 45% of leaves out of order. Clean UUIDv7 had 90% and 0.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F38
### F39 · Accurate · Factual · The random-delete growth ratio matches the study
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=Deleting%20a%20random%2030%25%20and,primary%20key%201.30%20times%20larger.)
Article says:
```text
Deleting a random 30% and refilling left the primary key 1.30 times larger.
```
What is true:
The study reports a 1.300 primary-key size ratio after random deletion and refill. Its oldest-first deletion test reports 1.000. The article preserves both comparisons.
Charitable reading:
The 1.30 ratio compares total index sizes before deletion and after refilling the deleted rows.
Review: We checked the deletion-pattern columns and ratio denominator. The finding preserves the random and oldest-first comparisons. We checked whether the ratio used the surviving 70% population. The study compares complete index sizes before deletion and after refill. Its 1.300 and 1.000 ratios support the finding.
Sources:
- [https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc](https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc)
Excerpt:
```text
v7, 75M rows, size after refill ÷ before oldest 30% deleted random 30% deleted PK index 1.000 1.300
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F39
### F40 · Accurate · Factual · The two-key 35% increase uses the correct population
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=int8%20plus%20a%20uuidv7%28%29%20unique,per%20row%20than%20UUIDv7%20alone)
Article says:
```text
…int8 plus a uuidv7() unique column cost 35% more index bytes per row than UUIDv7 alone…
```
What is true:
The study reports 35% more total index bytes per row for int8 plus a unique UUIDv7 column. The comparison includes the unchanged secondary indexes.
Charitable reading:
The claim compares all indexes in the tested schema, including its two secondary indexes.
Review: We tested a primary-key-only interpretation. The finding correctly identifies total index bytes, including secondary indexes. We checked whether entry-width arithmetic supplied a conflicting denominator. The study compares all indexes, including unchanged secondary indexes. The finding correctly retains that population.
Sources:
- [https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc](https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc)
Excerpt:
```text
Two keys (int8 identity PK plus a UUIDv7 unique column): all-index bytes per row +57% over int8 alone and +35% over UUIDv7 alone.
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F40
### F41 · Accurate · Factual · The cited bulk-load timings round correctly
Location: Article · exact quote · [open in article](https://postgres.ai/blog/20261105-uuidv4-vs-uuidv7#:~:text=UUIDv4%20took%2020%3A40%20and%20UUIDv7%201%3A46.)
Article says:
```text
…UUIDv4 took 20:40 and UUIDv7 1:46.
```
What is true:
The original timings are 20 minutes 39.840 seconds for UUIDv4 and 1 minute 46.343 seconds for UUIDv7. They round to 20:40 and 1:46.
Charitable reading:
The timings describe the cited author's first bulk insertion into empty tables.
Review: We checked milliseconds against minutes and seconds. The rounding is correct, although F29 already verifies these timings. We checked the source's empty-table labels and millisecond conversions. The timings round correctly. This duplicates F29's substantive check but does not change its accuracy.
Sources:
- [https://www.credativ.de/en/blog/postgresql-en/a-deeper-look-at-old-uuidv4-vs-new-uuidv7-in-postgresql-18/](https://www.credativ.de/en/blog/postgresql-en/a-deeper-look-at-old-uuidv4-vs-new-uuidv7-in-postgresql-18/)
Excerpt:
```text
Insert time: 1239839.702 ms (20:39.840) Insert time: 106343.314 ms (01:46.343)
```
Finding URL: https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3#F41
## Notes (not graded) (0)
None.
## Withdrawn findings (0)
None.
## Section checks
- Overview · A · 3 verified-accurate · 94% of claims (17 of 18, plus 5 that need data we do not have)
- Prior work · A · 3 verified-accurate · 83% of claims (5 of 6, plus 4 that need data we do not have)
- Test setup · A · 2 verified-accurate · 100% of claims (18 of 18, plus 5 that need data we do not have)
- In memory · A · 1 verified-accurate · 100% of claims (5 of 5, plus 1 that need data we do not have)
- Slowdown mechanism · A · 1 verified-accurate · 100% of claims (9 of 9, plus 4 that need data we do not have)
- WAL · A · 5 verified-accurate · 86% of claims (13 of 15, plus 10 that need data we do not have)
- Index size · A · 2 verified-accurate · 63% of claims (7 of 11, plus 1 that need data we do not have)
- Reads · A · 1 verified-accurate · 100% of claims (4 of 4, plus 3 that need data we do not have)
- Standbys · A · 1 verified-accurate · 100% of claims (3 of 3, plus 3 that need data we do not have)
- UUIDv7 costs · A · 6 verified-accurate · 100% of claims (12 of 12, plus 6 that need data we do not have)
- Partitioning · A · 2 verified-accurate · 88% of claims (8 of 9, plus 3 that need data we do not have)
- Switching a table · A · 3 verified-accurate · 72% of claims (18 of 25, plus 1 that need data we do not have)
- Reading time on Postgres 17 · A · 1 verified-accurate · 87% of claims (7 of 8, plus 3 that need data we do not have)
- Discussion and limits · A · 2 verified-accurate · 100% of claims (2 of 2, plus 5 that need data we do not have)
- Recommendations · A · 1 imprecise · 3 verified-accurate · 92% of claims (24 of 26, plus 4 that need data we do not have)
- Size planning · A · 1 verified-accurate · 100% of claims (9 of 9)
- Method · A · 3 verified-accurate · 100% of claims (4 of 4, plus 10 that need data we do not have)
## Claim coverage
- Overview: 17 of 18 Postgres claims checked, plus 5 that need data we do not have; not counted: 2 product or opinion, 4 duplicate, 3 not a claim; not checked: 1 for other reasons
- Prior work: 5 of 6 Postgres claims checked, plus 4 that need data we do not have; not counted: 7 product or opinion; not checked: 1 for other reasons
- Test setup: 18 of 18 Postgres claims checked, plus 5 that need data we do not have; not counted: 1 duplicate
- In memory: 5 of 5 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 duplicate
- Past memory: 6 of 6 Postgres claims checked, plus 9 that need data we do not have; not counted: 1 product or opinion, 3 duplicate, 2 not a claim
- Slowdown mechanism: 9 of 9 Postgres claims checked, plus 4 that need data we do not have; not counted: 2 duplicate
- WAL: 13 of 15 Postgres claims checked, plus 10 that need data we do not have; not counted: 4 product or opinion, 1 duplicate, 1 not a claim; not checked: 2 for other reasons
- Index size: 7 of 11 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 duplicate; not checked: 4 for other reasons
- UUIDv7 versus int8: 5 of 5 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 product or opinion, 1 duplicate
- Reads: 4 of 4 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 duplicate
- Standbys: 3 of 3 Postgres claims checked, plus 3 that need data we do not have
- UUIDv7 costs: 12 of 12 Postgres claims checked, plus 6 that need data we do not have; not counted: 1 product or opinion, 3 duplicate, 1 not a claim
- Partitioning: 8 of 9 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 not a claim; not checked: 1 for other reasons
- Switching a table: 18 of 25 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 duplicate, 1 not a claim; not checked: 7 for other reasons
- Reading time on Postgres 17: 7 of 8 Postgres claims checked, plus 3 that need data we do not have; not checked: 1 for other reasons
- Discussion and limits: 2 of 2 Postgres claims checked, plus 5 that need data we do not have; not counted: 2 product or opinion, 1 duplicate, 4 not a claim; not checked: 1 for other reasons
- Recommendations: 24 of 26 Postgres claims checked, plus 4 that need data we do not have; not counted: 4 duplicate; not checked: 2 for other reasons
- Size planning: 9 of 9 Postgres claims checked; not counted: 2 duplicate
- Ideas for Postgres: 1 of 2 Postgres claims checked, plus 3 that need data we do not have; not counted: 4 product or opinion, 1 not a claim; not checked: 1 for other reasons
- Method: 4 of 4 Postgres claims checked, plus 10 that need data we do not have; not counted: 7 product or opinion, 9 duplicate
- References and footnotes: 8 of 8 Postgres claims checked, plus 4 that need data we do not have; not counted: 9 product or opinion, 2 duplicate, 1 not a claim
## What we did not check
- We did not reproduce the displayed measurements or validate the benchmark's server comparison and clone testing procedures.
- We did not execute the SQL or pgbench scripts or check deployment permissions and runtime setup.
- We did not verify pg_uuidv7 compatibility or its timestamp extraction function.
- We did not verify Linux cgroup accounting or a specific Snowflake generator implementation.
- We did not verify Aurora's full-page-write configuration or compare the modeled bill with an Aurora deployment.
- We did not reproduce the article's throughput, WAL, index size, clock skew, or standby measurements.
- We could not verify PostgreSQL 17 support for uuid_extract_timestamp().
- We did not verify the PostgreSQL 17.7 and 18.3 recipe execution claims.
- We could not retrieve the cited Ants Aasma and Jeremy Schneider articles or the UUIDv7 commit page.
- We did not verify Aurora performance or map the article's PostgreSQL counters to an actual Aurora bill.
- We did not check recipe dependencies, permissions, setup, function bodies, or runtime effects.
- We did not establish release changes between November 5 and November 11, 2026.
- We did not reproduce the PostgreSQL 18.6 measurements or independently inspect their raw counters.
- We did not inspect the article's chart images.
- We did not verify PostgreSQL 18's platform-specific UUIDv7 bit allocation or index-entry layout.
- We did not execute the six code examples or check their permissions, dependencies, and runtime effects.
- reproducibility: benchmark check did not finish
- central claim: evidence check did not finish
- Applicable: we did not complete every applicable check.
- Consistent: we did not complete every applicable check.
- Transparent: we did not complete every applicable check.
- Safe: we did not complete every applicable check.
- Section “Ideas for Postgres”: we checked 1 of 5 checkable claims.
- Transparent: claims sourced check did not finish.
- Transparent: claims dated check did not finish.
- Transparent: interest disclosed check did not finish.
- Transparent: author dated check did not finish.
- experiments: check did not finish
- production actions: check did not finish
- benchmark: check did not finish
- We hold no source mapping for “postgres-ai/docs”, so we did not check the article's claims about its code.
- We checked 5 SQL blocks with PostgreSQL 18 grammar for syntax.
- 1 block was not checked for syntax.
- Code block 2 was not checked for syntax because the block includes psql commands or output, input data, or placeholders.
- We did not execute any scripts or check dependencies, setup, permissions, embedded SQL, function bodies, inline snippets, or run-time effects.
## Notes
- A — the findings address the article's main subject. What we did not check is listed below. The findings directly check UUID key ordering, memory eviction, WAL, storage sizing, partitioning, and migration guidance.
- We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.
- Average of 5 axes: 4 · result A
- Some explanatory text is not shown in this edition; the grade and findings are complete.
- Some checks did not happen for this edition, and each one we know of is listed above.
- Checked against: github.com/postgres/postgres REL_18_6 at commit 724edf9bde9d356724ad384a2e196edc3c9f80f7 (pinned target); https://aws.amazon.com/blogs/database/planning-i-o-in-amazon-aurora/ (fetched 2026-11-11T04:04:42.257414Z); https://aws.amazon.com/rds/aurora/pricing/ (fetched 2026-11-11T04:04:39.298584Z); https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bc (fetched 2026-11-11T04:04:14.554880Z); https://docs.aws.amazon.com/rds/latest/auroraextendedcontent/aurora-faq-billing.html (fetched 2026-11-11T04:04:42.989566Z); https://hacking.postgres.tv/sessions/YPq_hiOE-N8/ (fetched 2026-11-11T04:04:28.360469Z); https://postgres.ai/blog/20210923-zero-downtime-postgres-schema-migrations-lock-timeout-and-retries (fetched 2026-11-11T04:04:33.542540Z); https://postgres.ai/blog/tags/performance (fetched 2026-11-11T04:04:45.043371Z); https://postgres.ai/blog/tags/postgres-fm (fetched 2026-11-11T04:04:47.972749Z); https://postgres.ai/blog/tags/postgres-insights (fetched 2026-11-11T04:04:44.049432Z); https://postgres.ai/blog/tags/uuid (fetched 2026-11-11T04:04:46.059941Z); https://postgres.ai/blog/tags/wal (fetched 2026-11-11T04:04:47.001679Z); https://postgres.ai/products/dblab-forge (fetched 2026-11-11T04:04:12.791847Z); https://postgres.fm/episodes/uuidv4-vs-uuidv7 (fetched 2026-11-11T04:04:15.860447Z); https://shopify.engineering/building-resilient-payment-systems (fetched 2026-11-11T04:04:27.451713Z); https://www.credativ.de/en/blog/postgresql-en/a-deeper-look-at-old-uuidv4-vs-new-uuidv7-in-postgresql-18/ (fetched 2026-11-11T04:04:26.106830Z); https://www.enterprisedb.com/blog/sequential-uuid-generators (fetched 2026-11-11T04:04:20.646718Z); https://www.postgresql.org/docs/18/functions-uuid.html (fetched 2026-11-11T04:04:08.248801Z); https://www.rfc-editor.org/rfc/rfc9562 (fetched 2026-11-11T04:04:11.837955Z).
- Article captured 2026-11-11T04:03:38.846289Z · SHA-256 72a2591a329e5fa79e426e59d08be1c6876492e6b1f9ce45dd978f838dbb2d9a · Text extracted from the article's HTML.
- Policy SHA-256 927167a248dd2b3cbe61929929b456f758e4b800a3753b0996c6d9ae0b1dbb76 · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not reproduce the throughput, WAL, index-size, clock-skew, or standby measurements or independently inspect their raw counters.
- We did not validate the benchmark's server comparisons or clone testing procedures.
- We did not inspect the article's chart images.
- We checked 5 SQL blocks with PostgreSQL 18 grammar. Those checks recorded no syntax errors. The pgbench block received separate source checks.
- We did not execute the SQL or pgbench examples or check deployment permissions, dependencies, setup, embedded SQL, or runtime effects.
- We did not verify pg_uuidv7 compatibility or its timestamp extraction function.
- We did not verify Linux cgroup accounting or a specific Snowflake generator implementation.
- We did not verify Aurora's full-page-write configuration, reproduce Aurora performance, or compare the modeled costs with an actual bill.
- We could not retrieve the cited Ants Aasma and Jeremy Schneider articles or the UUIDv7 commit page.
- We did not check release changes between November 5 and November 11, 2026.
- The article gives a publication date without a time. We list that date at midnight UTC.
- article target version: bound to the most-cited major; also named 17 (5×)
- source: postgres 18 was read at REL_18_6, its newest release when the article was published
- source: we did not check the article's claims about a linked GitLab project against its source code, because we keep no copy of it
- 5 fetched pages are not listed above, because our policy does not allow linking them.
- review: the findings were written by one model and reviewed independently by a different model.
- 6 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, one pinned source tree, and 18 fetched pages.
- 40 survived · 1 weakened · 0 withdrawn.
## Edition changes
- F1 · recalibrated.
- F2 · recalibrated.
- F3 · recalibrated.
- F4 · recalibrated.
- F5 · recalibrated.
- F6 · recalibrated.
- F7 · weakened.
- F8 · recalibrated.
- F9 · recalibrated.
- F10 · recalibrated.
- F11 · recalibrated.
- F12 · recalibrated.
- F13 · recalibrated.
- F14 · recalibrated.
- F15 · recalibrated.
- F16 · recalibrated.
- F17 · recalibrated.
- F18 · recalibrated.
- F19 · recalibrated.
- F20 · recalibrated.
- F21 · recalibrated.
- F22 · recalibrated.
- F23 · recalibrated.
- F24 · recalibrated.
- F25 · recalibrated.
- F26 · recalibrated.
- F27 · recalibrated.
- F28 · recalibrated.
- F29 · recalibrated.
- F30 · recalibrated.
- F31 · recalibrated.
- F32 · recalibrated.
- F33 · recalibrated.
- F34 · recalibrated.
- F35 · recalibrated.
- F36 · recalibrated.
- F37 · recalibrated.
- F38 · recalibrated.
- F39 · recalibrated.
- F40 · recalibrated.
- F41 · recalibrated.
## Revision history
- [Revision 1](https://pgtrue.postgres.ai/shared/brief/01a1c8ee-d00d-7834-ac6b-8a93c74e09b3?v=2) · this page · 2026-11-11 04:03 UTC · A · audited with v1.1.6
Article as first submitted. 40 accurate · 0 wrong · 1 caveat.
ElephantSeal: A. Open: central claim not checked.
Changes: First audit. Open: F1 “UUIDv4 foreign-key indexes need not behave like unique UUIDv4 primary keys.” (mostly accurate).