From 606a3d54fcd053c31e52886f4c69848a68777480 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 21 Jan 2011 12:47:54 -0500 Subject: [PATCH] Move test_fsync to /contrib. --- contrib/pg_test_fsync/Makefile | 23 ++++++ .../pg_test_fsync}/test_fsync.c | 0 doc/src/sgml/contrib.sgml | 1 + doc/src/sgml/filelist.sgml | 1 + doc/src/sgml/pgtestfsync.sgml | 70 +++++++++++++++++++ src/tools/fsync/Makefile | 25 ------- src/tools/fsync/README | 25 ------- 7 files changed, 95 insertions(+), 50 deletions(-) create mode 100644 contrib/pg_test_fsync/Makefile rename {src/tools/fsync => contrib/pg_test_fsync}/test_fsync.c (100%) create mode 100644 doc/src/sgml/pgtestfsync.sgml delete mode 100644 src/tools/fsync/Makefile delete mode 100644 src/tools/fsync/README diff --git a/contrib/pg_test_fsync/Makefile b/contrib/pg_test_fsync/Makefile new file mode 100644 index 0000000000..22622a1949 --- /dev/null +++ b/contrib/pg_test_fsync/Makefile @@ -0,0 +1,23 @@ +# +# Makefile for test_fsync +# +# contrib/test_fsync/Makefile + +PGFILEDESC = "test_fsync - test various disk sync methods" +PGAPPICON = win32 + +PROGRAM = test_fsync +OBJS = test_fsync.o + +PG_LIBS = $(libpq_pgport) + +ifdef USE_PGXS +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) +else +subdir = contrib/test_fsync +top_builddir = ../.. +include $(top_builddir)/src/Makefile.global +include $(top_srcdir)/contrib/contrib-global.mk +endif diff --git a/src/tools/fsync/test_fsync.c b/contrib/pg_test_fsync/test_fsync.c similarity index 100% rename from src/tools/fsync/test_fsync.c rename to contrib/pg_test_fsync/test_fsync.c diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml index d78847395e..f5bd493543 100644 --- a/doc/src/sgml/contrib.sgml +++ b/doc/src/sgml/contrib.sgml @@ -112,6 +112,7 @@ psql -d dbname -f SHAREDIR/contrib/module.sql &pgstandby; &pgstatstatements; &pgstattuple; + &pgtestfsync; &pgtrgm; &pgupgrade; &seg; diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index aa2d801deb..9d4cfc927b 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -124,6 +124,7 @@ + diff --git a/doc/src/sgml/pgtestfsync.sgml b/doc/src/sgml/pgtestfsync.sgml new file mode 100644 index 0000000000..e4b7ecaaa3 --- /dev/null +++ b/doc/src/sgml/pgtestfsync.sgml @@ -0,0 +1,70 @@ + + + + pg_test_fsync + + + pg_test_fsync + + + + pg_test_fsync is intended to give you a reasonable + idea of what the fastest fsync_method is on your specific system, + as well as supplying diagnostic information in the event of an + identified I/O problem. However, differences shown by test_fsync + might not make any difference in real database throughput, especially + since many database servers are not speed-limited by their transaction + logs. + + + + Usage + + + <application>pg_test_fsync</> Options + + + pg_test_fsync accepts the following command-line arguments: + + + + + + + + + Specifies the filename for test. The file should be in the + same file system as the pg_xlog directory. + /pg_xlog contains the WAL files.) + The default is test_fsync.out in the current + directory. + + + + + + + + + + Specifies the number of operations per test. The more operations + per test, the greater the test's accuracy. The default is + 2000. + + + + + + + + + + + Author + + + Bruce Momjian bruce@momjian.us + + + + diff --git a/src/tools/fsync/Makefile b/src/tools/fsync/Makefile deleted file mode 100644 index 44419eef49..0000000000 --- a/src/tools/fsync/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -#------------------------------------------------------------------------- -# -# Makefile for src/tools/fsync -# -# Copyright (c) 2003-2011, PostgreSQL Global Development Group -# -# src/tools/fsync/Makefile -# -#------------------------------------------------------------------------- - -subdir = src/tools/fsync -top_builddir = ../../.. -include $(top_builddir)/src/Makefile.global - -override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) - -OBJS= test_fsync.o - -all: submake-libpq submake-libpgport test_fsync - -test_fsync: test_fsync.o $(libpq_builddir)/libpq.a - $(CC) $(CFLAGS) test_fsync.o $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) - -clean distclean maintainer-clean: - rm -f test_fsync$(X) $(OBJS) diff --git a/src/tools/fsync/README b/src/tools/fsync/README deleted file mode 100644 index fee9c62a18..0000000000 --- a/src/tools/fsync/README +++ /dev/null @@ -1,25 +0,0 @@ -test_fsync -========== - -This program tests fsync. The tests are described as part of the program output. - - Usage: test_fsync [option...] - -Options: - -f, --filename specify filename for test - -o, --ops-per-test operations per test - -test_fsync is intended to give you a reasonable idea of what the fastest -fsync_method is on your specific system, as well as supplying diagnostic -information in the event of an identified I/O problem. However, -differences shown by test_fsync might not make any difference in real -database throughput, especially since many database servers are not -speed-limited by their transaction logs. - -The output filename defaults to test_fsync.out in the current directory. -test_fsync should be run in the same filesystem as your transaction log -directory (pg_xlog). - -Operations per test defaults to 2000. Increase this to get more accurate -measurements. -