简体   繁体   中英

Replication of postgres database at table level

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM