Thread: HotStandby vs. flatfile updates
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 | template111561 | template011562 | postgres16384 | test16390 | test217872 | bernd17873 | 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
Hi Bernd, On Wed, Feb 11, 2009 at 03:49:24PM +0100, Bernd Helmle wrote: > I'm currently facing with a strange behavior during HotStandby Testing. > That's what i'm actually doing: it seems that this was a known bug ("snapshot bug"), which as noted in http://wiki.postgresql.org/wiki/Hot_Standby#Resolved_Items.2FIssues was fixed in version 9h. We actually checked that this particular bug had been fixed, using the test whose "summary" you can find below. Probably you are running an old version: it's not your fault, since in the same page I can read that 9g is the last published version (I know that Simon is having some difficulties with git). Thank you for testing, Dr. Gianni Ciolli - 2ndQuadrant Italia PostgreSQL Training, Services and Support gianni.ciolli@2ndquadrant.it | www.2ndquadrant.it ---8<------8<------8<------8<------8<------8<------8<------8<------8<--- STANDBY: try to connect to database "foo" (fails) PRIMARY: create database foo STANDBY: wait for propagation, then connect to database foo, and issue a simple query; PRIMARY; drop database foo STANDBY: wait for propagation, then try connect to database foo (fails)
On Wed, 2009-02-11 at 19:48 +0100, Gianni Ciolli wrote: > Probably you are running an old version: it's not your fault, since in > the same page I can read that 9g is the last published version (I know > that Simon is having some difficulties with git). I did publish v9h to Hackers on 27 Jan, but did not put a new version onto the Wiki at that time. Sorry Bernd. I am having a few git issues, so new patch out as soon as I can loosen the grip of my now favourite repo system. -- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support
--On Mittwoch, Februar 11, 2009 19:27:51 +0000 Simon Riggs <simon@2ndQuadrant.com> wrote: > I did publish v9h to Hackers on 27 Jan, but did not put a new version > onto the Wiki at that time. Sorry Bernd. > Great! I just thought its worth reporting it. Sorry for the noise and missing the new patch version. > I am having a few git issues, so new patch out as soon as I can loosen > the grip of my now favourite repo system. Heh, had my issues here, too ;) -- Thanks Bernd