Re: Mysterious table that exists but doesn't exist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Mysterious table that exists but doesn't exist
Дата
Msg-id 8832.1366146259@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Mysterious table that exists but doesn't exist  (Dale Fukami <dale.fukami@gmail.com>)
Ответы Re: Mysterious table that exists but doesn't exist
Список pgsql-general
Dale Fukami <dale.fukami@gmail.com> writes:
> I'm having a problem on a standby server (streaming replication) where a
> table seems to exist but is not queryable. Essentially a select statement
> (and drop/insert/etc) fails but \d and pg_tables show it exists. The table
> exists on the master (and is queryable) and replication is still working in
> that changes to the master table don't cause errors on the standby and
> changes to other tables are replicated and verified to be on the standby.

That's peculiar.  The most likely theories seem to be
(1) corruption in the standby's pg_class indexes, such that an index
    search for relname = 'tracked_deductibles' fails to find the row,
    although it is found by seqscans; or
(2) some type of visibility issue causing SnapshotNow operations to
    think the row is invalid, though it is valid to MVCC queries.

Either way, if it's working on the master, then you've had a replication
failure since the standby's files evidently don't match the master's.

What PG version is this (and which versions have been installed since
the replication was set up)?  Have you had any system-level crashes on
the standby?

> 2) If there were corruption or something in the data for that particular
> table on the standby only, would replication report a failure (i.e., be
> unable to apply the binary changes) or would the binary changes still just
> sort of happen overtop the bad data?

Depends.  It's not impossible that the corruption could magically
disappear, if there's a full-page update sent from the master that
overwrites whatever the problem is.  Incremental updates on the same
page would not make things better, of course, and could easily make them
worse.  It's unlikely that an incremental WAL replay operation would
notice a problem that evidently isn't being noticed by regular queries.

            regards, tom lane


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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Mysterious table that exists but doesn't exist
Следующее
От: Lee Hachadoorian
Дата:
Сообщение: SQL keywords are suddenly case sensitive