Re: Data loss, vacuum, transaction wrap-around - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Data loss, vacuum, transaction wrap-around
Date
Msg-id 19990.1108752220@sss.pgh.pa.us
Whole thread Raw
In response to Re: Data loss, vacuum, transaction wrap-around  (pgsql@mohawksoft.com)
Responses Re: Data loss, vacuum, transaction wrap-around  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
pgsql@mohawksoft.com writes:
> More suggestions:
> (1) At startup, postmaster checks for an XID, if it is close to a problem,
> force a vacuum.

Useless to a system that's run 24x7; also presumes the existence of a
complete solution anyway (since getting the postmaster to find that out
is the hard part).

> (2) At "sig term" shutdown, can the postmaster start a vacuum?

Certainly not.  We have to assume that SIGTERM means we are under a
short-term sentence of death from init.  And if it's a manual stop
it doesn't sound much better: the sort of DBA that needs this "feature"
is likely to decide he should kill -9 the postmaster because it's taking
too long to shut down.

> (3) When the XID count goes past the "trip wire" can it spontaneously
> issue a vacuum?

Only in the database you're connected to, which very likely isn't where
the problem is.  Moreover, having N backends all decide they need to do
this at once doesn't sound like a winner.  Furthermore, this still
presumes the existence of the hard part of the solution, which is
knowing where the trip point is.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Data loss, vacuum, transaction wrap-around
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Data loss, vacuum, transaction wrap-around