I am just wondering whether it would be possible to replicate only a table in a postgres database with another database instance. For example, lets say that I have a postgres instance running at hostA and another instance at hostB. Lets say i have a relation called "user" in a database called "database1" in hostA and i want to replicate this with a different database called "database2" at hostB. How can we go about it?

share|improve this question

20% accept rate
feedback

1 Answer

up vote 5 down vote accepted

Slony-I can do this: http://slony.info/documentation/2.1/preface.html#INTRODUCTION

But Slony might be quite an overhead if it's really only a single table.

For just a single table you could write a trigger that updates the table on the other host through DbLink.

share|improve this answer
feedback

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.