Re: Corrupted sequences

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Corrupted sequences
Дата
Msg-id Pine.LNX.4.33.0303141341420.24048-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: Corrupted sequences  ("scott.marlowe" <scott.marlowe@ihs.com>)
Ответы Re: Corrupted sequences  (Francisco Reyes <lists@natserv.com>)
Список pgsql-general
On Fri, 14 Mar 2003, scott.marlowe wrote:

> On Fri, 14 Mar 2003, Francisco Reyes wrote:
>
> > Got 2 corrupted sequences, that I have discovered so far, and fixed them
> > with 'setval'. Is there a way to check all sequences in a database?
> > Something simmilar to reindex but for sequences?
> >
> >
> > Running 7.2.4 (at my ISP so don't have a choice there..)
>
> You need to demand that your service providers test their hardware.  When
> things randomly get corrupted in Postgresql it is about 95% of the time or
> more that you have either a bad disk or bad memory.  Postgresql is good,
> but it can't overcome broken hardware.

The first could be a problem.  Are you sure the sequence was being used to
update the table you were inserting it into?  I.e. was the table loaded by
bulk load, so the sequence was set right?  or has it been updated properly
by "insert into table (field1,field2,id) values ('a','b',DEFAULT)"

The second is normal.  currval has no value within a tranaction until
after setval or nextval.

In those cases, your sequences aren't corrupted, they're just incorrect
because they weren't accessed the right way to stay in sync with the
table.


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: The folding of unquoted names to lower case in PostgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: The folding of unquoted names to lower case in PostgreSQL