Hello everyone,
The scene : Currently, we r using, Postgresql v 7.3, on RedHat 9 machines.
We provide a hot standby at all times for the Primary server.
So, we have to maintain a duplicate of the entire database. The problem arises, when the standby boots.
I wanted to know, whenever the standby boots up, what all files shud it copy frm the Primary. All files, under the data directory?? Viz., global, base, clog and xlog?
Yes - all files.
What are those pg_internal.init, pgstat.stat files? What's the difference between global and base directories?
The "base" directory is the main data store - you can see what the numbers refer to by using the oid2name utility in contrib/
If the async feature is used on the primary, shud we copy on the xlog and clog files onto the backup as well?
What is the "async feature"?
As of now, we shut down postmaster, on the Primary whenever the standby boots up, and then copy all the above said files, from the primary to the standby.
Duz this ensure, all data is written onto the disk b4 postmaster shut downs?
Provided the postmaster shuts down cleanly, and you've synced to disk then all should be OK.
Quite a few times, I have encountered errors, like, xlogflush is not satisfied,
bogus attribute number for <some num , eg. -2>, catalog is missing, cache lookup failed.
One of 4 things could be at fault: 1. Files aren't being sync'ed to disk 2. You aren't copying the right files 3. The versions of PG don't match 4. The platforms you are running on are different (e.g. Sun-Sparc vs x86)
It might be worth looking at "slony" to run a replication setup, rather than copying files.
-- Richard Huxton Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)