Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Also, how do I find the current xlog segment position. Is it one of
> these fields shown by pg_controldata?
"latest checkpoint location" should do.
BTW, if your script is relying on pg_resetxlog to be available, best to
ensure that it's there before you do anything irreversible ...
regards, tom lane