From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Streaming replication, some small issues |
Date: | 2009-12-08 08:30:59 |
Message-ID: | 4B1E0EC3.8020902@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
A couple of small issues spotted while reviewing the streaming
replication patch:
- Because sentPtr is initialized to zeros, GetOldestWALSendPointer will
return zero before a just-launched WAL sender has sent its first
message. That can lead to WAL files that are still needed by another
standby to be deleted prematurely.
- If a WAL file is not found in the master for some reason, standby goes
into an infinite loop retrying it:
ERROR: could not read xlog records: FATAL: could not open file
"pg_xlog/000000010000000000000000" (log file 0, segment 0): No such file
or directory
ERROR: could not read xlog records: FATAL: could not open file
"pg_xlog/000000010000000000000000" (log file 0, segment 0): No such file
or directory
ERROR: could not read xlog records: FATAL: could not open file
"pg_xlog/000000010000000000000000" (log file 0, segment 0): No such file
or directory
...
- It's possible to shut down master, change max_wal_senders to 0,
restart and do an operation like CLUSTER which then skips WAL-logging.
Then shutdown, change max_wal_senders back to non-zero. All this while
the standby is running. Leads to a corrupt standby.
I've also pushed a couple of small cosmetic changes to replication
branch at git://git.postgresql.org/git/users/heikki/postgres.git
I'll continue reviewing...
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Zdenek Kotala | 2009-12-08 10:10:44 | Re: [patch] executor and slru dtrace probes |
Previous Message | marcin mank | 2009-12-08 07:37:23 | Re: bug: fuzzystrmatch levenshtein is wrong |