forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb24a029
committed
Attached is a patch that provides *VERY* limited support for multiple
slaveservers. I haven't tested it very well, so use at your own risk (and Irecommend against using it in production).Basically, I have a central database server that has 4 summary tablesinsideit replicated to a remote slave (these database tables are for my mailserverauthentication, so these are replicated to another server tuned for manyconnections, and so I don't have postgres connections opened straight tomyback-end database server).Unfortunately, I also wanted to implement a replication database serverforhot-backups. I realized, too late, that the replication process isprettygreedy and will try to replicate all tables marked as a"MasterAddTable".To make a long story, I made a patch to RServ.pm and Replicate thatallows youto specify, on the command line, a list of tables that you want toreplicate...it'll ignore all others.I haven't finished, since this has to be integrated with CleanLog forinstance, but this should (and does) suffice for the moment.I have yet to test it with two slaves, but at least my mail serverreplicationdatabase now works (it was failing every time it tried to replicate, foravariety of reasons).Anyone have any suggestions on how to improve on this? (or, if someonemorefamiliar with this code wants to take the ball and run with it, you'rewelcome to).--Michael A Nachbaur <mike@nachbaur.com>1 parente1be2ee commitb24a029
2 files changed
+19
-5
lines changedLines changed: 16 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 |
| |
56 | 60 |
| |
57 | 61 |
| |
| |||
232 | 236 |
| |
233 | 237 |
| |
234 | 238 |
| |
235 |
| - | |
| 239 | + | |
236 | 240 |
| |
237 | 241 |
| |
238 | 242 |
| |
| |||
274 | 278 |
| |
275 | 279 |
| |
276 | 280 |
| |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
277 | 286 |
| |
278 | 287 |
| |
279 | 288 |
| |
| |||
302 | 311 |
| |
303 | 312 |
| |
304 | 313 |
| |
305 |
| - | |
| 314 | + | |
306 | 315 |
| |
307 | 316 |
| |
308 | 317 |
| |
| |||
336 | 345 |
| |
337 | 346 |
| |
338 | 347 |
| |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
339 | 352 |
| |
340 | 353 |
| |
341 | 354 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| 35 | + | |
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
| |||
56 | 57 |
| |
57 | 58 |
| |
58 | 59 |
| |
59 |
| - | |
| 60 | + | |
60 | 61 |
| |
61 | 62 |
| |
62 | 63 |
| |
| |||
68 | 69 |
| |
69 | 70 |
| |
70 | 71 |
| |
71 |
| - | |
| 72 | + | |
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
|
0 commit comments
Comments
(0)