I've been testing the current status of instrumentation function
integration in pgsql8.1 and found the result quite frustrating.
Only pg_reload_conf and pg_postmaster_start_time (formerly
pg_postmaster_starttime) are implemented in a way comparable to the
admin package (pg_logfile_rotate does work now, when calling
pg_rotate_logfile; this needed backend support that wasn't present in 8.0).
All other functions are either omitted completely, or stripped down to
near or complete unusability:
The file functions, if present at all, don't accept absolute paths, even
if the log directory is addressed. pg_read_file isn't a replacement for
pg_file_read for this reason.
pg_ls_dir lost its second bool parameter.
pg_stat_file isn't implemented, although announced by Bruce. This makes
pg_file_length impossible.
Naming:
While only an annoying source of unnecessary work, the example of
pg_stat_file (if it would exist) shows how arbitrary the change of names
is: it follows the pattern of pg_stat_% statistics functions.
Consequently, only a small fraction of the 8.0 admin package will be
obsoleted for 8.1.
sigh...
Regards,
Andreas
PS AFAICS we now could add pg_terminate_backend safely too, IIRC the
on-exit lock tables cleanup is corrected now.