Обсуждение: How to manually force a transaction wraparound

Поиск
Список
Период
Сортировка

How to manually force a transaction wraparound

От
Eric Ridge
Дата:
I want to force my database to wraparound, just to see what happens.  How can I do this without consuming a few billion transactions?

My google-fu is failing me.  :(

Thanks for your time!

eric

Re: How to manually force a transaction wraparound

От
Thomas Munro
Дата:
On Sat, Apr 30, 2016 at 10:48 AM, Eric Ridge <eebbrr@gmail.com> wrote:
> I want to force my database to wraparound, just to see what happens.  How
> can I do this without consuming a few billion transactions?

Take a look at the script repro-bogus-subtrans-error-wraparound.sh
from this email:

http://www.postgresql.org/message-id/CAEepm=3z0EoLpo5wTUwseM38kbq+Gjp8xXiuLJkUqpM-SW7kAw@mail.gmail.com

That used pg_resetxlog -x $XID $PGDATA, but needed to do several hops
stop/pg_resetxlog/start hops to get all the way around the xid clock.

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


Re: How to manually force a transaction wraparound

От
Andrew Sullivan
Дата:
On Sat, Apr 30, 2016 at 02:16:48PM +1200, Thomas Munro wrote:
> Take a look at the script repro-bogus-subtrans-error-wraparound.sh
> from this email:

I wonder whether something like this (and other "beat it up" kinds of
tools) ought to be in contrib/ or in some sort of well-known project
location.  It seems that they're the sort of thing that could be
useful to DBAs and data service managers who are trying to prove that
Postgres is Just Fine.

Maybe this should go to -advocacy?  (I no longer subscribe there and
can't contribute to the work, but I can report that I've been in the
sort of long, boring speculative conversation that could have been
shut down quickly with this kind of data.)

A

--
Andrew Sullivan
ajs@crankycanuck.ca


Re: How to manually force a transaction wraparound

От
Eric Ridge
Дата:
On Fri, Apr 29, 2016 at 10:16 PM Thomas Munro <thomas.munro@enterprisedb.com> wrote:
On Sat, Apr 30, 2016 at 10:48 AM, Eric Ridge <eebbrr@gmail.com> wrote:
> I want to force my database to wraparound, just to see what happens.  How
> can I do this without consuming a few billion transactions?

Take a look at the script repro-bogus-subtrans-error-wraparound.sh
from this email:

http://www.postgresql.org/message-id/CAEepm=3z0EoLpo5wTUwseM38kbq+Gjp8xXiuLJkUqpM-SW7kAw@mail.gmail.com

That used pg_resetxlog -x $XID $PGDATA, but needed to do several hops
stop/pg_resetxlog/start hops to get all the way around the xid clock.

Thanks Thomas.  I ended up figuring out something similar after I read the docs on pg_resetxlog.

It did something interesting to two of my local databases, but I was able to figure out what I wanted to know.

Thanks again!

eric