Re: pgsql/src/backend/commands sequence.c

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)postgresql(dot)org
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src/backend/commands sequence.c
Date: 2002-01-11 19:22:34
Message-ID: 200201111922.g0BJMYv04788@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

> Log message:
> Fix sequence creation to set the t_xmin of a sequence's tuple to
> FrozenTransactionId, not the XID of the creating transaction. Without
> this it's possible for a reference to a long-gone CLOG record to occur,
> per Christian Meunier's bug report of 10-Jan-02. Worse, the sequence
> tuple would become invisible to SELECTs after 2 billion transactions.

Can you remind me why sequences are different from normal tables in the
regard?

> Since the fix is applied during sequence creation it does not help
> existing databases, unless you drop and recreate every sequence.
> However, we intend to force initdb for 7.2RC1 anyway, to fix a pg_proc
> error, so I see no need to do more for this problem.

This eliminates allowing an SQL query to fix the problems with pg_proc
--- pg_upgrade, because there was an int4->int8 change in sequences,
will properly set the new XID if it is used on older databases.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message tgl 2002-01-11 20:07:04 pgsql/src/backend/utils/time tqual.c
Previous Message tgl 2002-01-11 18:16:08 pgsql/src/backend/commands sequence.c