Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound
Дата
Msg-id CAH2-WzkiL=32Dz_ftiabgUeqiOmMUM+7=DB+bRHfpwANY7tS0w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound  (Peter Geoghegan <pg@bowt.ie>)
Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-hackers
On Mon, May 1, 2023 at 5:34 AM John Naylor <john.naylor@enterprisedb.com> wrote:
> Well, since you have a placeholder "xidStopLimit mode" in your other patch, I'll confine my response to there.
Inventing"modes" seems like an awkward thing to backpatch, not to mention moving the goalposts. My modest goal here is
quitelimited: to stop lying to our users about "not accepting commands", and change tragically awful advice into
sensibleadvice. 

I can't argue with that.

> Here's my new idea:
>
> -HINT:  To avoid a database shutdown, [...]
> +HINT:  To prevent XID generation failure, [...]
>
> Actually, I like "allocation" better, but the v8 patch now has "generation" simply because one MXID message already
has"generate" and I did it that way before thinking too hard. I'd be okay with either one as long as it's consistent. 

WFM.

> Granted. Whatever form your rewrite ends up in, it could make a lot of sense to then backpatch a few localized
corrections.I wouldn't even object to including a few substitutions of s/wraparound failure/allocation failure/  where
appropriate.Let's see how that shakes out first. 

Makes sense.

> > > I think the docs would do well to have ordered steps for recovering from both XID and MXID exhaustion.
> >
> > I had planned to address this with my ongoing work on the "Routine
> > Vacuuming" docs, but I think that you're right about the necessity of
> > addressing it as part of this patch.
>
> 0003 is now a quick-and-dirty attempt at that, only in the docs. The MXID part is mostly copy-pasted from the XID
part,just to get something together. I'd like to abbreviate that somehow. 

Yeah, the need to abbreviate statements about MultiXact IDs by saying
that they work analogously to XIDs in some particular respect
is...another thing that makes this tricky.

I don't think that Multis are fundamentally different to XIDs. I
believe that the process through which VACUUM establishes its
OldestMXact cutoff can be pessimistic compared to OldestXmin, but I
don't think that it changes the guidance you'll need to give here.
VACUUM should always be able to advance relminmxid right up until
OldestMXact, if that's what the user insists on. For example, VACUUM
FREEZE sometimes allocates new Multis, just to be able to do that.

Obviously there are certain things that can hold back OldestMXact by a
wildly excessive amount. But I don't think that there is anything that
can hold back OldestMXact by a wildly excessive amount that won't more
or less do the same thing to OldestXmin.

--
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Autogenerate some wait events code and documentation
Следующее
От: shveta malik
Дата:
Сообщение: Re: Support logical replication of DDLs