Fri Jun 27 13:02:05 PDT 2008
- Previous message: [Slony1-general] execute script doesn't work
- Next message: [Slony1-general] Initial release candidate for Slony-I 2.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Mark Steben" <msteben at autorevenue.com> writes: > <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40"> > > <head> > <meta http-equiv=Content-Type content="text/html; charset=koi8-r"> > <meta name=Generator content="Microsoft Word 11 (filtered medium)"> > <!--[if !mso]> > <style> > v\:* {behavior:url(#default#VML);} > o\:* {behavior:url(#default#VML);} > w\:* {behavior:url(#default#VML);} > .shape {behavior:url(#default#VML);} > </style> > <![endif]--><o:SmartTagType > namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address"/> > <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" > name="Street"/> > <!--[if !mso]> > <style> > st1\:*{behavior:url(#default#ieooui) } > </style> > <![endif]--> > <style> > <!-- > /* Font Definitions */ > @font-face > {font-family:"Franklin Gothic Medium"; > panose-1:2 11 6 3 2 1 2 2 2 4;} > @font-face > {font-family:Webdings; > panose-1:5 3 1 2 1 5 9 6 7 3;} > @font-face > {font-family:"Wingdings 2"; > panose-1:5 2 1 2 1 5 7 7 7 7;} > /* Style Definitions */ > p.MsoNormal, li.MsoNormal, div.MsoNormal > {margin:0in; > margin-bottom:.0001pt; > font-size:12.0pt; > font-family:"Times New Roman";} > a:link, span.MsoHyperlink > {color:blue; > text-decoration:underline;} > a:visited, span.MsoHyperlinkFollowed > {color:purple; > text-decoration:underline;} > span.EmailStyle17 > {mso-style-type:personal-compose; > font-family:"Times New Roman"; > color:windowtext; > font-weight:normal; > font-style:normal; > text-decoration:none none;} > @page Section1 > {size:8.5in 11.0in; > margin:1.0in 1.25in 1.0in 1.25in;} > div.Section1 > {page:Section1;} > --> > </style> > <!--[if gte mso 9]><xml> > <o:shapedefaults v:ext="edit" spidmax="1027" /> > </xml><![endif]--><!--[if gte mso 9]><xml> > <o:shapelayout v:ext="edit"> > <o:idmap v:ext="edit" data="1" /> > </o:shapelayout></xml><![endif]--> > </head> > > <body lang=EN-US link=blue vlink=purple> > > <div class=Section1> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'><o:p> </o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>Very basic question from a very new slony user<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>I am running slony 1.2.14. <o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'> Very simple configuration – 1 master 1 slave<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'> Both running postgres 8.2.5. <o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>I have slony working, successfully replicating seven tables.<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>I also have successfully run some of the monitoring scripts<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'> (E.G. TEST_SLONY_STATE-DBI. PL)<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>Now I want to simply add a column to one of the tables.<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>Documentation states it is ‘essential ‘ to run EXECUTE > SCRIPT <o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'> On the origin node when changing table schemas. <o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>Trying to get it working through slonik. Not sure if I am using slonik > correctly.<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'><o:p> </o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>This is the script and the result:<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'><o:p> </o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>slonik <<_EOF_<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>> execute script (<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>> set id = 1,<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>> filename = '/home/postgres/add.insert.date.to.agents',<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>> event node = 1<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>> );<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'>> _EOF_<o:p></o:p></span></font></p> > > <p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: > 12.0pt'><stdin>:1: ERROR: syntax error at or near execute<o:p></o:p></span></font></p> The problem here is that every slonik script needs to start with the "preamble" portion, that is, it must start with: a) Declaration of the cluster CLUSTER NAME = something; b) Declarations of how slonik can reach the nodes. If the command is accessing node #1, then it must at least have... NODE 1 ADMIN CONNINFO = 'dsn for accessing node 1, maybe dbname=mydb host=host1 port=5432'; Any script that doesn't begin with "CLUSTER NAME" (or a reference to a file *containing* "CLUSTER NAME") will error out in this fashion. -- (reverse (concatenate 'string "moc.enworbbc" "@" "enworbbc")) http://linuxfinances.info/info/rdbms.html "There is nothing in the world more helpless and irresponsible and depraved than a man in the depths of an ether binge." -- Dr. Hunter S. Thompson
- Previous message: [Slony1-general] execute script doesn't work
- Next message: [Slony1-general] Initial release candidate for Slony-I 2.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list