pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
docs: outdated reference to recursive expression evaluation
4+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2018-12-10 0f9fd7419a 001bb9f3ed 62999b9325 e60122b54d 552c310ba4 3af726a1f3  Add stack depth checks to key recursive functions in backend/nodes/*.c.
  2018-12-10 e28649a67f  Doc: remove obsolete reference to recursive expression evaluation.
* docs: outdated reference to recursive expression evaluation
@ 2018-12-08 12:21 John Naylor <jcnaylor@gmail.com>
  2018-12-08 16:30 ` Re: docs: outdated reference to recursive expression evaluation Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: John Naylor @ 2018-12-08 12:21 UTC (permalink / raw)
  To: pgsql-hackers

In confg.sgml, in the section about max_stack_depth, there's this sentence:

"The safety margin is needed because the stack depth is not checked in
every routine in the server, but only in key potentially-recursive
routines such as expression evaluation."

Since the change in expression evaluation in v10, there's probably a
better example of recursive routines, but I'm not sure what that would
be.

-John Naylor




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: docs: outdated reference to recursive expression evaluation
  2018-12-08 12:21 docs: outdated reference to recursive expression evaluation John Naylor <jcnaylor@gmail.com>
@ 2018-12-08 16:30 ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-12-10 14:55   ` Re: docs: outdated reference to recursive expression evaluation John Naylor <jcnaylor@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2018-12-08 16:30 UTC (permalink / raw)
  To: John Naylor <jcnaylor@gmail.com>; +Cc: pgsql-hackers

John Naylor <jcnaylor@gmail.com> writes:
> In confg.sgml, in the section about max_stack_depth, there's this sentence:
> "The safety margin is needed because the stack depth is not checked in
> every routine in the server, but only in key potentially-recursive
> routines such as expression evaluation."

> Since the change in expression evaluation in v10, there's probably a
> better example of recursive routines, but I'm not sure what that would
> be.

We could say "expression compilation" and it'd still be valid.  Or just
drop the last four words altogether.  I don't think we want to expend the
verbiage to be more precise here, since it's only a tangential point.

BTW, while looking at this I noted that copyfuncs.c has a
check_stack_depth call but outfuncs, readfuncs, equalfuncs don't.
Surely that's not good.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: docs: outdated reference to recursive expression evaluation
  2018-12-08 12:21 docs: outdated reference to recursive expression evaluation John Naylor <jcnaylor@gmail.com>
  2018-12-08 16:30 ` Re: docs: outdated reference to recursive expression evaluation Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-12-10 14:55   ` John Naylor <jcnaylor@gmail.com>
  2018-12-10 15:44     ` Re: docs: outdated reference to recursive expression evaluation Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: John Naylor @ 2018-12-10 14:55 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers

On 12/8/18, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> John Naylor <jcnaylor@gmail.com> writes:
>> In confg.sgml, in the section about max_stack_depth, there's this
>> sentence:
>> "The safety margin is needed because the stack depth is not checked in
>> every routine in the server, but only in key potentially-recursive
>> routines such as expression evaluation."
>
>> Since the change in expression evaluation in v10, there's probably a
>> better example of recursive routines, but I'm not sure what that would
>> be.
>
> We could say "expression compilation" and it'd still be valid.  Or just
> drop the last four words altogether.  I don't think we want to expend the
> verbiage to be more precise here, since it's only a tangential point.

I'm inclined to agree. If you like, here's a patch to leave out the example.

-John Naylor

Attachments:

remove-reference-to-expr-eval.patch (text/x-patch, 1.2K) download diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index fc4f17be41..4a7121a51f 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1675,12 +1675,11 @@ include_dir 'conf.d' enforced by the kernel (as set by <literal>ulimit -s</literal> or local equivalent), less a safety margin of a megabyte or so. The safety margin is needed because the stack depth is not checked in every - routine in the server, but only in key potentially-recursive routines - such as expression evaluation. The default setting is two - megabytes (<literal>2MB</literal>), which is conservatively small and - unlikely to risk crashes. However, it might be too small to allow - execution of complex functions. Only superusers can change this - setting. + routine in the server, but only in key potentially-recursive routines. + The default setting is two megabytes (<literal>2MB</literal>), which + is conservatively small and unlikely to risk crashes. However, + it might be too small to allow execution of complex functions. + Only superusers can change this setting. </para> <para>
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: docs: outdated reference to recursive expression evaluation
  2018-12-08 12:21 docs: outdated reference to recursive expression evaluation John Naylor <jcnaylor@gmail.com>
  2018-12-08 16:30 ` Re: docs: outdated reference to recursive expression evaluation Tom Lane <tgl@sss.pgh.pa.us>
  2018-12-10 14:55   ` Re: docs: outdated reference to recursive expression evaluation John Naylor <jcnaylor@gmail.com>
@ 2018-12-10 15:44     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2018-12-10 15:44 UTC (permalink / raw)
  To: John Naylor <jcnaylor@gmail.com>; +Cc: pgsql-hackers

John Naylor <jcnaylor@gmail.com> writes:
> On 12/8/18, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> We could say "expression compilation" and it'd still be valid.  Or just
>> drop the last four words altogether.  I don't think we want to expend the
>> verbiage to be more precise here, since it's only a tangential point.

> I'm inclined to agree. If you like, here's a patch to leave out the example.

Pushed to HEAD (didn't seem worth back-patching, though).

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2018-12-10 15:44 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-08 12:21 docs: outdated reference to recursive expression evaluation John Naylor <jcnaylor@gmail.com>
2018-12-08 16:30 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-12-10 14:55   ` John Naylor <jcnaylor@gmail.com>
2018-12-10 15:44     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox