Nuno Santos nuno.santos
Mon Jul 18 11:16:46 PDT 2005
Thomas Pundt wrote:
> Hi,
> 
> On Wednesday 13 July 2005 18:11, Nuno Santos wrote:
> | After some trial and error I arrived to the following sequence of calls
> | to stored procedures:
> |
> | select _ns.ddlscript(1, 'create table public.t (f VARCHAR(20) PRIMARY
> | KEY);', 0);
> | select _ns.storeset(2, 'Temp set');
> | select _ns.setAddTable (2, 999, 'public.t', 't_pkey', 'New table');
> | select _ns.subscribeset(2, 1, 2, false);
> | select _ns.mergeset(1, 2);
> |
> | I'm using stored procedures because my goal is to add tables
> | programatically, using JDBC or ODBC.
> [...]
> | Seems like a concurrency bug.
> [...]
> | Is this really a bug or am I doing something wrong? I would also
> | appreciate any comments on the way I'm adding tables dynamically to a
> | set. I wasn't able to find any example of how to do it, so I'm not sure
> | if there isn't a better way.
> 
> I'd rather call it a concurrency bug with your procedure; you have to
> wait for the slave to acknowledge the operations. Slonik therefore 
> provides the "wait for event" command.

Ok, makes sense now. Is there a Slony stored procedure equivalent to the
'wait for event' command? I want to create a stored procedure for adding
a new table so the slonik command is of no use for me there. Of course I
can reimplement the code from slonik, but perhaps there is some other
way that I haven't discovered yet.

Another question, it seems to make sense to have a createTable() stored
procedure in Slon. Why doesn't such a function exist?

Cheers,
Nuno Santos



More information about the Slony1-general mailing list