pg_serial early wraparound

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_serial early wraparound
Date: 2016-11-08 22:07:42
Message-ID: CAEepm=3XfsTSxgEbEOmxu0QDiXy0o18NUg2nC89JZcCGE+XFPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hi hackers,

The SLRU managed by predicate.c can wrap around and overwrite data if
you have more than 1 billion active XIDs. That's because when SSI was
implemented, slru.c was limited to four digit segment names, which
implied a page limit that wasn't enough for pg_serial to have space
for every possible XID. We should probably rip that code out, because
SLRUs now support five digit segment names. Something like the
attached. I'll post a test script to demonstrate correct wraparound
behaviour around in time for one of the later CFs.

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
ssi-slru-wraparound-v1.patch application/octet-stream 3.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-11-08 22:28:51 Re: pgbench - allow backslash continuations in \set expressions
Previous Message Michael Paquier 2016-11-08 22:05:39 Re: Typo in event_trigger.c