Обсуждение: Replication through WAL
Is there an easy way to read the WAL files generated by Postgres? I'm looking into writting a replication deamon for postgres and think that the WAL files are the best way to know what has happened to the db and what has to be replicated. I have a roughed out idea of how to code it up but the only thing I'm really wrestling with is how read the WAL files. Can anyone give me some pointers. I've looked at all the xlog* code and have a basic understading of how it works, but not a real good one. Any help on this would be appreciated. Thanks
> Is there an easy way to read the WAL files generated by Postgres? I'm > looking into writting a replication deamon for postgres and think that > the WAL files are the best way to know what has happened to the db and > what has to be replicated. I have a roughed out idea of how to code it > up but the only thing I'm really wrestling with is how read the WAL > files. Can anyone give me some pointers. I've looked at all the xlog* > code and have a basic understading of how it works, but not a real good > one. Any help on this would be appreciated. Thanks Many believe WAL will be the basis for further replication features. We will discuss this as part of 7.2 development in a few weeks. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
Bruce Momjian wrote: Okay, would it be helpful if I made a few suggestions on things that I as a user/tool developer of postgres might find helpful? > > > Is there an easy way to read the WAL files generated by Postgres? I'm > > looking into writting a replication deamon for postgres and think that > > the WAL files are the best way to know what has happened to the db and > > what has to be replicated. I have a roughed out idea of how to code it > > up but the only thing I'm really wrestling with is how read the WAL > > files. Can anyone give me some pointers. I've looked at all the xlog* > > code and have a basic understading of how it works, but not a real good > > one. Any help on this would be appreciated. Thanks > > Many believe WAL will be the basis for further replication features. > We will discuss this as part of 7.2 development in a few weeks. > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html
> Bruce Momjian wrote: > Okay, would it be helpful if I made a few suggestions on things that I > as a user/tool developer of postgres might find helpful? Not sure. I recommend hanging around, and when the discussion starts, you can add things. > > > > > > Is there an easy way to read the WAL files generated by Postgres? I'm > > > looking into writting a replication deamon for postgres and think that > > > the WAL files are the best way to know what has happened to the db and > > > what has to be replicated. I have a roughed out idea of how to code it > > > up but the only thing I'm really wrestling with is how read the WAL > > > files. Can anyone give me some pointers. I've looked at all the xlog* > > > code and have a basic understading of how it works, but not a real good > > > one. Any help on this would be appreciated. Thanks > > > > Many believe WAL will be the basis for further replication features. > > We will discuss this as part of 7.2 development in a few weeks. > > > > -- > > Bruce Momjian | http://candle.pha.pa.us > > pgman@candle.pha.pa.us | (610) 853-3000 > > + If your life is a hard drive, | 830 Blythe Avenue > > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/users-lounge/docs/faq.html > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026