Replication through WAL

Started by Chad La Joieabout 25 years ago4 messageshackers
Jump to latest
#1Chad La Joie
clajoie@vt.edu

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

#2Bruce Momjian
bruce@momjian.us
In reply to: Chad La Joie (#1)
Re: 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

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
#3Chad La Joie
clajoie@vt.edu
In reply to: Bruce Momjian (#2)
Re: Replication through WAL

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?

Show quoted text

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

#4Bruce Momjian
bruce@momjian.us
In reply to: Chad La Joie (#3)
Re: Re: Replication through WAL

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, Pennsylvania 19026