Christopher Browne cbbrowne at afilias.info
Thu Oct 3 08:38:44 PDT 2013
An issue recently came up where someone was preparing a mighty large
EXECUTE SCRIPT request, and bumped up against the limit that the statement
parser statically determines that a script can have, at maximum,
MAXSTATEMENTS statements, and sets the value of that to 1000.

I'm responsible for having set that value; would like to debate it a little
bit.

The relevant data structure is that
   int STMTS[MAXSTATEMENTS]
is used to indicate where the end of each statement is within the script
being processed by EXECUTE SCRIPT.

I took the naive approach of declaring STMTS[] statically.  Seeing as how
we have had exactly one complaint about the matter since 2006, I rather
think that this was an appropriate choice.

It would be some effort to switch to allocate dynamically; I wonder if it
is apropos to:

a) Leave things alone, as there have been very few complaints over the last
7 years.

b) Increase the value from 1000 to something moderately larger, as people
likely tend to have more RAM these days.

c) Go to the effort of dynamic allocation, so that arbitrarily large
scripts are supportable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20131003/b46cfe1c/attachment.htm 


More information about the Slony1-general mailing list