From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Dan Langille <dan(at)langille(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: could not truncate directory "pg_subtrans": apparent wraparound |
Date: | 2015-06-05 23:03:04 |
Message-ID: | CAEepm=3HG2EuFGHrj+Mo5N01-mh9DLBvgk-3eku932OMs1ywVA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jun 6, 2015 at 10:12 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Sat, Jun 6, 2015 at 9:45 AM, Dan Langille <dan(at)langille(dot)org> wrote:
>> I noticed this today on my 9.4.2 server running on FreeBSD 10.1:
>>
>> Jun 5 18:59:40 slocum postgres[986]: [3957-1] LOG: could not truncate directory "pg_subtrans": apparent wraparound
>>
>> Looking at a post from 2010, Tom Lane suggest this information was useful:
>>
>> [root(at)slocum:/usr/local/pgsql/data/pg_subtrans] # ls -l
>> total 1
>> -rw------- 1 pgsql pgsql 8192 Jun 5 19:04 0032
>>
>> This not not a high throughput server.
>
> It looks like subtrantransactions may have a fencepost error similar
> to multixacts, described here:
>
> http://www.postgresql.org/message-id/CAEepm=0DqAtnM=23OQ44BbnwvN3g6+DXx+s5g4JRBP-VY8gEwQ@mail.gmail.com
>
> I will try to repro this.
My idea was that if I could get oldestXact == next XID in
TruncateSUBSTRANS, then TransactionIdToPage(oldestXact) for a value of
oldestXact that happens to be immediately after a page boundary (so
that xid % 2048 == 0) might give page number that is >=
latest_page_number, causing SimpleLruTruncate to print that message.
But I can't figure out how to get next XID == oldest XID, because
vacuumdb --freeze --all consumes xids itself, so in my first attempt
at this, next XID is always 3 ahead of the oldest XID when a
checkpoint is run.
--
Thomas Munro
http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Flower | 2015-06-05 23:11:46 | Re: Is it possible to have a "fast-write" Index? |
Previous Message | Peter Geoghegan | 2015-06-05 22:21:50 | Re: Further issues with jsonb semantics, documentation |