Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > intercepting WA...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 12 Topic 9440 of 10966
Post > Topic >>

intercepting WAL writes

by mike@[EMAIL PROTECTED] ("Mike") May 28, 2008 at 07:11 PM

This is a multipart message in MIME format.

------=_NextPart_000_004B_01C8C0F6.A19EDD10
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello,

 

I'm new to the core PostgreSQL code, so pardon the question if the answer
is
really obvious, and I'm just missing it, but I've got a relatively large
web
application that uses PostgreSQL as a back-end database, and we're heavily
using memcached to cache frequently accessed data.

 

I'm looking at modifying PostgreSQL (in some way) to push changes directly
to our memcache servers, in hopes of moving towards a system where only
writes are actually sent to the databases, and reads are exclusively sent
to
the memcache servers.

 

I'm guessing that I could intercept the WAL writes, and use this
information
to push out to my memcache servers, similar to a replication model.

 

Can somebody point to the most logical place in the code to intercept the
WAL writes? (just a rough direction would be enough)- or if this doesn't
make sense at all, another suggestion on where to get the data? (I'm
trying
to avoid doing it using triggers).

 

Thanks,

 

Mike


------=_NextPart_000_004B_01C8C0F6.A19EDD10
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
=
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @[EMAIL PROTECTED]
 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
..MsoChpDefault
	{mso-style-type:ex****t-only;}
@[EMAIL PROTECTED]
 Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'>Hello,<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt'>I&#8217;m new to =
the core PostgreSQL
code, so pardon the question if the answer is really obvious, and =
I&#8217;m just
missing it, but I&#8217;ve got a relatively large web application that =
uses PostgreSQL
as a back-end database, and we&#8217;re heavily using memcached to cache =
frequently
accessed data.<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt'>I&#8217;m looking =
at
modifying PostgreSQL (in some way) to push changes directly to our =
memcache
servers, in hopes of moving towards a system where only writes are =
actually
sent to the databases, and reads are exclusively sent to the memcache =
servers.<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt'>I&#8217;m guessing =
that I
could intercept the WAL writes, and use this information to push out to =
my
memcache servers, similar to a replication model.<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt'>Can somebody point =
to the
most logical place in the code to intercept the WAL writes? (just a =
rough
direction would be enough)- or if this doesn&#8217;t make sense at all, =
another
suggestion on where to get the data? (I&#8217;m trying to avoid doing it =
using
triggers).<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'>Thanks,<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'>Mike<o:p></o:p></span></p>

</div>

</body>

</html>

------=_NextPart_000_004B_01C8C0F6.A19EDD10--
 




 12 Posts in Topic:
intercepting WAL writes
mike@[EMAIL PROTECTED] (  2008-05-28 19:11:28 
Re: intercepting WAL writes
jonah.harris@[EMAIL PROTE  2008-05-28 19:46:44 
Re: intercepting WAL writes
mike@[EMAIL PROTECTED] (  2008-05-28 20:30:22 
Re: intercepting WAL writes
pgsql@[EMAIL PROTECTED]   2008-05-28 17:25:24 
Re: intercepting WAL writes
jonah.harris@[EMAIL PROTE  2008-05-28 20:43:05 
Re: intercepting WAL writes
mike@[EMAIL PROTECTED] (  2008-05-28 21:47:22 
Re: intercepting WAL writes
mike@[EMAIL PROTECTED] (  2008-05-29 17:43:32 
Re: intercepting WAL writes
tgl@[EMAIL PROTECTED] (T  2008-05-29 18:18:07 
Re: intercepting WAL writes
koichi.szk@[EMAIL PROTECT  2008-05-29 12:28:15 
Re: intercepting WAL writes
hannu@[EMAIL PROTECTED]   2008-05-29 09:57:53 
Re: intercepting WAL writes
simon@[EMAIL PROTECTED]   2008-05-29 21:01:40 
Re: intercepting WAL writes
mweilguni@[EMAIL PROTECTE  2008-06-03 11:43:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 12:16:29 CST 2008.