Bug 152 - Command line argument to only echo DDL on failure
Summary: Command line argument to only echo DDL on failure
Status: RESOLVED FIXED
Alias: None
Product: Slony-I
Classification: Unclassified
Component: slonik (show other bugs)
Version: devel
Hardware: PC Linux
: low enhancement
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2010-08-25 20:12 UTC by Stuart Bishop
Modified: 2011-01-27 11:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Bishop 2010-08-25 20:12:45 UTC
Currently, slonik echos DDL being run via EXECUTE SCRIPT. This makes scripts very noisy and thus more difficult to identify success/fail status of a process from logs.

It would be great if slonik had a quiet mode, where its output was just your echo statements if things are working fine.

On failure, I'd like to see the slonik script output.

On failure I'd like to see failed DDL output.

This is useful if the scripts are being generated on the fly.

I'm not sure if this is better expressed by a single option or by a combination of options.
Comment 1 Christopher Browne 2010-08-26 08:50:13 UTC
I wonder if this suggests having a 'status' that can be set.

-----------------------
cluster name = foo;
node 1 admin conninfo='something';
node 2 admin conninfo='something else';

output ddl;

execute script (stuff...);

output nothing;

execute script (more stuff...)

output all;

execute script (still more stuff...)

-----------------------

Adding a keyword or three like this is not terribly difficult; the question is of what they should control.  If we have an answer that's relatively simple and which seems elegant, then it's likely a good answer.  The above isn't quite that.
Comment 2 Christopher Browne 2010-12-09 10:51:44 UTC
Actually, I suggest another approach...

When I modified DDL script processing, the printf() statements that you're observing were really part of my debugging infrastructure, when I was verifying that all was being handled properly.

It may be readily argued that these statements should simply be removed.

To that end, I have a branch that makes just such a change...

https://github.com/cbbrowne/slony1-engine/tree/bug152

Minor patch involved:
https://github.com/cbbrowne/slony1-engine/commit/10dd7d4f44a17211f0aa4885c3128c5edb1f22d5
Comment 3 Steve Singer 2011-01-27 10:12:18 UTC
This change looks fine to commit against master.