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

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org, "Jan Wieck" <JanWieck(at)yahoo(dot)com>
Subject: Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to
Date: 2006-08-21 17:15:43
Message-ID: e51f66da0608211015q4497c6f8i806856a2c1912701@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 8/21/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Marko Kreen" <markokr(at)gmail(dot)com> writes:
> > Dropping the pg_sync_txid() would be loss, because that means that
> > user cannot just dump and restore the data and just continue where
> > it left off. Maybe its not a problem for replication but for generic
> > queueing it would need delicate juggling when restoring backup.
>
> 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.

> There is another problem with pg_sync_txid, too: because it is willing
> to advance the extended XID counter in multiples of 4G XIDs, it turns
> wraparound of the extended counter from a never-will-happen scenario
> into something that could happen in a poorly-managed installation.
> If you've got to be prepared to cope with wraparound of the extended
> counter, then what the heck is the point at all? You might as well just
> work with XIDs as they stand.

Indeed. I also don't like that scenario.

> So I think pg_sync_txid is a bad idea. In the patch as committed,
> anyone who's really intent on munging the epoch can do it with
> pg_resetxlog, but there's not a provision for doing it short of that.

I like it. It is indeed better than having pg_dump issuing a function
call. This fully satisfactory.

--
marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-21 17:29:48 Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to
Previous Message Tom Lane 2006-08-21 17:05:13 Re: PostgreSQL on 64 bit Linux

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-21 17:29:48 Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to
Previous Message Bruce Momjian 2006-08-21 16:53:10 Re: psql 'none' as a HISTFILE special case