Someone just pointed out to me that Active Data Guard is an extra cost option with Oracle. Please point this out to your IT Manager!
Oracle suggests the following benefits for Active Data Guard
- Increase performance—Offload unpredictable workloads to an up-to-date replica of the production database
- Simplify operations—Eliminate management complexity that accompanies traditional replication solutions
- Eliminate compromise—The reporting replica is up to date and online at all times, which is not possible with traditional storage mirroring technology
- Reduce cost—An Oracle Active Data Guard physical standby database can also provide disaster recovery and/or serve as a test database—no additional storage or servers required
I think DB2's HADR option would be the equivalent. Although I think it goes a bit further than a simply "hot standby" as it is more a cluster solution than a (hot) standby solution.
ReplyDeleteOracle had "Hot Standby" since 8i. they just renamed it to "x Data Guard" in 11g. One thing to note is that or version is "better" because you don't need to stop replaying logs while running queries.
ReplyDeleteOracle introduced Data Guard in Oracle8i, which allowed a physical standby against which you could run queries if you chose to halt recovery of new changes. Oracle 11g allows queries while recovery is in progress, as Hot Standby allows. Both the Oracle and Hot Standby implementations can have conflicts between queries and recovery, and so both can suffer the "snapshot too old" error. Oracle provides only one mechanism to control this, which is to extend the size of the Undo tablespace. Overall, the Hot Standby feature is broadly similar, though the internal implementation for PostgreSQL is completely original. We're not copying Oracle, it has always been "obvious" that we would one day be able to run queries against the standby, although the implementation was very far from obvious.
ReplyDeleteDB2 does provide log shipping using HADR but it is not possible to run queries against the standby server.
Still, slony replication doesn't suffer from "snapshot too old" error.
ReplyDeleteI wonder also, does the Oracle's solution require you to copy whole data/ directory upfront to the slave ? Or is it done automagically ?
It probably also cares about shipping the logs over its own protocol, which makes management easy.
Copying whole database from Primary to Standby server is Step 1 of creating a Physical Standby database using Oracle Data Guard. Oracle doesn't do this automagically, nor does PostgreSQL because we both wish to provide flexibility and allow a variety of mechanisms for making the base backup.
ReplyDeleteThere are advantages and disadvantages to both logical and physical replication techniques and both will remain useful for many years to come, in different circumstances.
This feature is awesome but won't be on par with Oracle Dataguard until it works with synchronous log shipping (synchronous replication).
ReplyDeleteSimon,
ReplyDeleteby the third option they mean utilising Flashback database option on standby. The feature allows you to open read write standby, apply changes and by using minimum sets of commands to flashback database to previous state (so you can test applying some scripts as in Test Env and switch back to "DR mode" without rebuild). Still DG has other nice things :
1) Broker + Observer mode
2) the advised mode for Oracle DG is "LGWR ASYNC" in which log writer process sends data to standby asynchronusly (w/o using intermediate archive logs)
3) Automatic gaps fetching code (FAL)
(yes, I'm Oracle guy :)).
Good to have comments from non-Postgres people, thanks.
ReplyDeleteFlashback is a good feature, but I wonder whether many people really use it like that in conjunction with DG. It's not anything anyone has asked for as-yet, but let's see.
Streaming replication will give us (2) and (3), plus synch rep.