$ uname -a
Darwin joel-jacobsons-macbook-pro-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

$ tar xjf postgresql-8.4.3.tar.bz2

$ patch < pg_stat_transaction/
INSTALL                          README                           pg_stat_transaction-8.4.3.patch  test/                            

$ patch -p0 < pg_stat_transaction/pg_stat_transaction-8.4.3.patch 
patching file postgresql-8.4.3/doc/src/sgml/monitoring.sgml
patching file postgresql-8.4.3/src/backend/catalog/system_views.sql
patching file postgresql-8.4.3/src/backend/postmaster/pgstat.c
patching file postgresql-8.4.3/src/backend/utils/adt/pgstatfuncs.c
patching file postgresql-8.4.3/src/include/catalog/pg_proc.h
patching file postgresql-8.4.3/src/include/pgstat.h

./configure --prefix=/usr/local/pgsql
make
make install
cd /usr/local/pgsql
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

# This is necessary to make the functions pg_stat_get_transaction_function_* work:
echo "track_functions = pl" >> /usr/local/pgsql/data/postgresql.conf

/usr/local/pgsql/bin/pg_ctl -D ./data start
/usr/local/pgsql/bin/createdb test
cd pg_stat_transaction/test
/usr/local/pgsql/bin/psql test -f run.sql > run.out.my

# Should produce the output of run.out843 or run.out90b1

