Strange issues with 9.2 pg_basebackup & replication

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Strange issues with 9.2 pg_basebackup & replication
Дата
Msg-id 4FB005D3.1090802@agliodbs.com
обсуждение исходный текст
Ответы Re: Strange issues with 9.2 pg_basebackup & replication  (Josh Berkus <josh@agliodbs.com>)
Re: Strange issues with 9.2 pg_basebackup & replication  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
Doing some beta testing, managed to produce this issue using the daily
snapshot from Tuesday:

1. Created master server, loaded it with a couple dummy databases.

2. Created standby server.

3. Did pg_basebackup -x stream on standby server

4. Started standby server.

5. Realized I'd forgotten to create a recovery.conf.  Shut down the
standby server, wrote a recovery.conf, and restarted it.

6. Standby server looked normal and appeared to be replicating.  Master
server showed it as replicating:

postgres=# select * from pg_stat_replication;pid  | usesysid |  usename   | application_name |  client_addr   |
client_hostname | client_port |  backend_start         |   state   | sent_location | write_location |
flush_location | replay_location
| sync_priority | sync_state
------+----------+------------+------------------+----------------+-----------------+-------------+------
-------------------------+-----------+---------------+----------------+----------------+-----------------
+---------------+------------1278 |    16393 | replicator | walreceiver      | ###.###.61.227 |           |       45391
|2012-
 
05-13 18:44:18.603122+00 | streaming | 0/70000B8     | 0/70000B8      |
0/70000B8      | 0/70000E0
|             0 | async

7. Did a "create table" on the master server, creating an empty table.

8. Got this fatal error on the standby server:

LOG:  record with incorrect prev-link 0/70000B8 at 0/70000E0
LOG:  record with incorrect prev-link 0/70000B8 at 0/70000E0

... this error message repeated every 5s.


Either the swap of the standby into proper standby mode should have been
OK (since there were no writes on the master or the standby in that
time), or it should have failed immediately.  Clearly there's something
broken here.

Note that I more-or-less did the same test on 9.1, and it didn't break
in this way.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Foreign keys in pgbench
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Strange issues with 9.2 pg_basebackup & replication