Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to
Дата
Msg-id e51f66da0608211110kda30ed0v417eceb1cbcdf8b5@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 8/21/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Marko Kreen" <markokr@gmail.com> writes:
> > On 8/21/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> I'm not following the point here.  Dump and restore has never intended
> >> to preserve the transaction counter, so why should it preserve
> >> high-order bits of the transaction counter?
>
> > Thus it guarantees that any new issued large txid's will be larger
> > than existing ones in tables.  Thus code can depend on monotonous
> > growth.
>
> Within a single installation, sure, but I don't buy that we ought to try
> to preserve XIDs across installations.

I think you are right in the respect that we should not do it
automatically.

But now that the long xids may end up in data tables, user may have the
need dump/restore it in another installation.  If the application
is eg. Slony like queue, that depends on xid growth, user needs to
be able to bump epoch or application level support for migration.
If he has neither, he needs basically to extract old contents by hand
(as app would not work reliably) and reset everything.

Probably the right thing would be for application have a functions
"we moved, fix everything".  But bumping epoch is such a simple
way of fixing it that it should still be available.

And pg_resetxlog is fine for that.  Espacially as using it signals
"It's dangerous what you are doing!"

-- 
marko


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL on 64 bit Linux
Следующее
От: "Gregory Maxwell"
Дата:
Сообщение: Re: Replication