Hacker News new | ask | show | jobs
by anarazel 10 days ago
They're durable but not transactional.

1) If you do BEGIN; SELECT nextval('someseq'); ROLLBACK; the value from the rolled back transaction won't be reused, despite the rollback. That's quite crucial for performance, as otherwise concurrent transactions would not be able to get a sequence value until the first transaction commits/rolls back.

2) If you crash (PG or HW), some sequence values may never end up being used. For performance only every 32nd sequence advancement is WAL logged.