PGDay Paris 2026 focused heavily on PostgreSQL 18’s September 2025 release and the practical impact of native UUID v7 support on production deployments. Sessions ranged from migration strategies for existing uuid-ossp installations to performance benchmarks comparing UUID v4, v7, and ULID as primary keys at scale. The event brought together PostgreSQL engineers from across Europe and served as a follow-up to the earlier discussions at PGConf.EU 2024 and PGConf US 2025.
Key topics covered
Native uuidv7() — zero extension setup — Before PostgreSQL 18, UUID v7 required either the pg_uuidv7 extension or application-layer generation. PostgreSQL 18 ships uuidv7() built in:
-- No CREATE EXTENSION needed in PostgreSQL 18
SELECT uuidv7();
-- → 018fbe3a-4c5d-7000-8abc-0123456789ab
-- Column default
ALTER TABLE orders ALTER COLUMN id SET DEFAULT uuidv7();
-- Extract timestamp from UUID v7
SELECT uuid_extract_timestamp('018fbe3a-4c5d-7000-8abc-0123456789ab');
-- → 2025-06-15 14:23:55.997+00
uuid_extract_timestamp() was a highlight of the session — it makes UUID v7’s embedded timestamp queryable directly from SQL without application-layer decoding. See Time Precision for the 48-bit millisecond detail.
B-tree performance benchmark results
Sessions presented live benchmarks on a 500M-row orders table comparing INSERT and range-query performance:
| Key type | 500M-row INSERT time | Range scan (last 1h) |
|---|---|---|
| BIGSERIAL | 1× (baseline) | 1× (baseline) |
| UUID v4 | 3.2× slower | Full table scan |
| UUID v7 | 1.4× slower | 1.1× (near baseline) |
| ULID | 1.5× slower | 1.2× |
UUID v7 was 2.3× faster than UUID v4 at INSERT and enabled index-only range scans that UUID v4 could not. See UUID v4 vs v7 and UUID v7 Performance Benchmarks for the full methodology.
Migrating from uuid-ossp
-- Step 1: Install pg_uuidv7 on PG 14–17 (bridge period)
CREATE EXTENSION IF NOT EXISTS pg_uuidv7;
-- Step 2: Migrate column defaults
ALTER TABLE orders ALTER COLUMN id SET DEFAULT uuidv7();
ALTER TABLE order_items ALTER COLUMN id SET DEFAULT uuidv7();
ALTER TABLE customers ALTER COLUMN id SET DEFAULT uuidv7();
-- Step 3: On PG 18, drop the extension (built-in takes over)
-- DROP EXTENSION pg_uuidv7; -- optional cleanup
-- Existing rows are unchanged — uuid column stores v4 and v7 identically
See Zero-Downtime UUID Migration for the full dual-write strategy.
uuid_extract_timestamp() use cases
-- Find orders created in the last 24 hours using only the primary key
SELECT * FROM orders
WHERE uuid_extract_timestamp(id) > now() - interval '24 hours'
ORDER BY id;
-- Age of the oldest unprocessed order
SELECT now() - uuid_extract_timestamp(MIN(id)) AS oldest_pending_age
FROM orders
WHERE status = 'pending';
These queries use the primary key index with an index-only scan — no created_at column or secondary index is needed. See UUID in Databases for the full B-tree index analysis.
Related events
- PGConf.EU 2024 — UUID v7 in PostgreSQL
- PGConf US 2025 — UUID v7
- FOSDEM 2025 — UUID in Open Source Databases
Further reading
- PostgreSQL 18 Ships Native UUID v7
- UUID v4 vs v7 — B-tree performance
- UUID v7 Performance Benchmarks
- Zero-Downtime UUID Migration
- Time Precision — UUID v7 millisecond timestamp
External references
- PGDay Paris — official site
- PostgreSQL 18 — UUID functions
- pg_uuidv7 — extension for PG 14–17
- RFC 9562 — UUID standard
Frequently asked questions
What UUID v7 features does PostgreSQL 18 add natively?
PostgreSQL 18 adds uuidv7() as a built-in function, returning a UUID v7 value with a 48-bit Unix millisecond timestamp. It also adds uuidv4() as an alias for the existing gen_random_uuid(), and uuid_extract_timestamp(uuid) to extract the timestamp from a UUID v7 value. No extension is required — these functions are available immediately after upgrading. See PostgreSQL 18 Ships Native UUID v7.
How do I migrate from uuid-ossp to PostgreSQL 18's native UUID functions?
Replace uuid_generate_v4() column defaults with gen_random_uuid() or uuidv4(). Replace any uuid_generate_v1() usage with uuidv7(). The uuid-ossp extension can remain installed — there is no conflict with the built-in functions. Run ALTER TABLE orders ALTER COLUMN id SET DEFAULT uuidv7(); for each table you want to migrate. Existing rows are unchanged. See Zero-Downtime UUID Migration.