1

I have server with 4 bases on in. WAL registers changes in all databases. But if i want to rollback or rollforward changes in 1 database, excluding 3 others - how is it possible?

WesternTune
  • 199
  • 1
  • 1
  • 8

2 Answers2

4

No, not possible. The WAL segments hold all changes for all databases in a single cluster.

If you are looking for replication of a single database using WAL, your have to create a seperate cluster for this database. Use initdb to create a second cluster and a different data directory, start this second cluster and you're done, you now have two clusters running on a single (virtual) machine.

Another option would be Slony.

Frank Heikens
  • 117,544
  • 24
  • 142
  • 135
0

In a manner of speaking, and depending on if you mean databases within a cluster, or separate database servers when you say "1 database excluding 3 others". If you have a machine with a PITR image that isn't applying change logs as they come in, but just sitting them in the corner until you do a recovery, you can pick the point (txid) at which to stop the recovery. It's not simple and easy to know exactly which transaction you want to stop at though. But those changes affect all dbs on that server.

Scott Marlowe
  • 8,490
  • 3
  • 23
  • 21