Advance xmin aggressively on Read Commit isolation level

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Advance xmin aggressively on Read Commit isolation level
Date: 2020-11-06 08:48:28
Message-ID: CAKU4AWreydwCJsK0P1iCsPvpFf9dfAbS2BsphdPnJK=XmPJxog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Since the impact of the long transaction is huge in postgresql, for example
a long transaction by incident, tables may become very huge and it can't
become small again even the transaction is completed unless a vacuum full
is used.

I have 2 ideas about this. One is in the Read Committed level, we can
advance xmin
aggressively. suppose it started at t1, and complete a query at t2. the
xmin should
be t1 currently. Can we advance the xmin to t2 since it is read committed
level,
The data older than t2 will never be used? Another one is can we force to
clean
up the old tuples which are older than xxx? If users want to access that,
we can just raise errors. Oracle uses this strategy and the error code is
ORA-01555.

--
Best Regards
Andy Fan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2020-11-06 08:53:45 Re: Advance xmin aggressively on Read Commit isolation level
Previous Message Heikki Linnakangas 2020-11-06 08:42:15 Re: Protect syscache from bloating with negative cache entries