Steve Singer ssinger_pg at sympatico.ca
Thu Dec 29 13:08:08 PST 2011
On Thu, 29 Dec 2011, Mike Wilson wrote:

> For the "upgrade functions();" slonik function, where is the DDL for the 
> actual upgrade called from?  Is it the slony1_funcs.sql file or is it 
> compiled directly into slonik?

It comes from the .sql file on the machine slonik is on from the share path 
of which slonik was compliled against.

So if I compile slony with the --pgconfigdir=/usr/local/pgsql8.4/bin option 
and the pg_config binary in that directory says that the postgresql share 
directory is /usr/local/pgsql8.4/share  then it will pull the files from 
there.


>
> I'm having a problem upgrading my slony 2.0.7 cluster.  I've followed the 
> instructions and have verified that the new version of Slony is installed 
> (bins, lib, various SQL files) yet when I use the upgrade functions 
> command in a slonik script I can see it is applying DDL from the 2.0.7 
> version.  I'm pulling my hair out trying to figure out where it is finding 
> the old versions of these commands.  I figured if I knew where it was 
> actually getting these commands from I could figure out my problems.
>
> Just in case you wondering, I've diff'd all of the Slony related SQL in 
> the PG share directory with the versions in the Slony 2.1.0 directory. 
> They are indeed the binaries and lib from the 2.1.0 compile.  slonik -v 
> returns "slonik version 2.1.0".  I've confirmed that the .so is identical 
> to the version I compiled in the 2.1.0 directory.  And finally, I moved 
> the old PG directory (with Slony 2.0.7) out of the way.  When I run the 
> upgrade functions command though I still see it installing a function 
> SlonyVersionPatchLevel where it is returning 7 for 2.0.7 instead of 0 for 
> 2.1.0.  The upgrade functions commands also doesn't return any errors 
> (return val 0), but when I attempt to run slon it complains that the 
> schema is from a previous version 2.0.7.  I can't figure out where the 
> upgrade functions command is finding the Slony 2.0.7 DDL instead of the 
> 2.1.0 version.
>
> Is this upgrade DDL compiled into the slonik binary or does it reference 
> it somehow on the file system?  Could how I compile it be telling it to 
> look somewhere outside the PG installation directory?

The slony1_funcs.sql is not compiled into slonik, the path to that file IS 
compiled into slonik.

--with-pgsharedir option to configure when building slony can tell slony to 
use a different SHARE directory (which is where it gets slony1_funcs.sql 
from).




> Mike Wilson
> Predicate Logic
> Cell: (310) 600-8777
> SkypeID: lycovian
>
>
>
>
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
>



More information about the Slony1-general mailing list