> I have two quick observations:
> 
> == LOAD semantics ==
> 
> LOAD now means different things depending on which user runs it, which
> can be quite problematic for scripting. For instance in the following
> scenario, where we have two modules with the same name living in
> different directories:
> 
> $ LIBDIR=$(pg_config --pkglibdir)
> $ cp $LIBDIR/passwordcheck.so $LIBDIR/demo.so
> $ cp $LIBDIR/auto_explain.so  $LIBDIR/plugins/demo.so

I think we just need to avoid doing something like this: different libraries
with the same name.

> == error message ==
> 
> The error message now says something else (different sqlstates?):
> 
> postgres=> LOAD 'pg_stat_statements';
> ERROR:  could not access file "$libdir/plugins/pg_stat_statements": No
> such file or directory
> 
> Without the patch:
> 
> postgres=> LOAD 'pg_stat_statements';
> ERROR:  access to library "pg_stat_statements" is not allowed
> 
> I believe that this kind of error reclassification might confuse
> monitoring tools -- IMO not a blocker, but must be well justified.

The behavior of "local_preload_libraries" also like this. So I think it's
ok if we document the auto expand of "$libdir/plugins/" clearly.

--
Regards,
ChangAo Chen

Reply via email to