HotStandby vs. flatfile updates

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: HotStandby vs. flatfile updates
Date: 2009-02-11 14:49:24
Message-ID: FA792E2899B619C3B5BF80FE@teje
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm currently facing with a strange behavior during HotStandby Testing.
That's what i'm actually doing:

MASTER:

CREATE DATABASE foo;
<do something in there, e.g. restoring a dump>

<wait until xlog segments get consumed by standby node (using
archive_timeout)>

STANDBY:

postgres=# SELECT oid, datname FROM pg_database;
oid | datname
-------+-----------
1 | template1
11561 | template0
11562 | postgres
16384 | test
16390 | test2
17872 | bernd
17873 | foo

$ psql foo
DEBUG: forked new backend, pid=19967 socket=7
FATAL: database "foo" does not exist

$ cat standby/global/pg_database
"template1" 1 1663 666
"template0" 11561 1663 666
"postgres" 11562 1663 666
"test" 16384 1663 666
"test2" 16390 1663 666
"bernd" 17872 1663 666

Obviously, the pg_database file wasn't updated. I've traced through the
recovery process a little bit and i see BuildFlatFile() called during
xact_redo_commit(), however, write_database_file() doesn't write out the
new database records. Funny thing: the same happened to the database
"bernd" before, so it seems to me the new database record is not visible to
write_database_file() during redo?

--
Thanks

Bernd

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-02-11 14:50:34 Re: Re: [COMMITTERS] pgsql: Update autovacuum to use reloptions instead of a system catalog,
Previous Message D'Arcy J.M. Cain 2009-02-11 14:49:21 Re: A deprecation policy