diff options
author | Bruce Momjian | 2011-01-21 17:47:54 +0000 |
---|---|---|
committer | Bruce Momjian | 2011-01-21 17:47:54 +0000 |
commit | 606a3d54fcd053c31e52886f4c69848a68777480 (patch) | |
tree | f0af5beb1ff87de93d89f213daed96faca5c527f | |
parent | 8aea1373d8f88bf389def1af10d06f1e67e25249 (diff) |
Move test_fsync to /contrib.
-rw-r--r-- | contrib/pg_test_fsync/Makefile | 23 | ||||
-rw-r--r-- | contrib/pg_test_fsync/test_fsync.c (renamed from src/tools/fsync/test_fsync.c) | 0 | ||||
-rw-r--r-- | doc/src/sgml/contrib.sgml | 1 | ||||
-rw-r--r-- | doc/src/sgml/filelist.sgml | 1 | ||||
-rw-r--r-- | doc/src/sgml/pgtestfsync.sgml | 70 | ||||
-rw-r--r-- | src/tools/fsync/Makefile | 25 | ||||
-rw-r--r-- | src/tools/fsync/README | 25 |
7 files changed, 95 insertions, 50 deletions
diff --git a/contrib/pg_test_fsync/Makefile b/contrib/pg_test_fsync/Makefile new file mode 100644 index 00000000000..22622a19493 --- /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 index 9c829ba541d..9c829ba541d 100644 --- a/src/tools/fsync/test_fsync.c +++ b/contrib/pg_test_fsync/test_fsync.c diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml index d78847395e5..f5bd493543f 100644 --- a/doc/src/sgml/contrib.sgml +++ b/doc/src/sgml/contrib.sgml @@ -112,6 +112,7 @@ psql -d dbname -f <replaceable>SHAREDIR</>/contrib/<replaceable>module</>.sql &pgstandby; &pgstatstatements; &pgstattuple; + &pgtestfsync; &pgtrgm; &pgupgrade; &seg; diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index aa2d801deb7..9d4cfc927ba 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -124,6 +124,7 @@ <!entity pgstandby SYSTEM "pgstandby.sgml"> <!entity pgstatstatements SYSTEM "pgstatstatements.sgml"> <!entity pgstattuple SYSTEM "pgstattuple.sgml"> +<!entity pgtestfsync SYSTEM "pgtestfsync.sgml"> <!entity pgtrgm SYSTEM "pgtrgm.sgml"> <!entity pgupgrade SYSTEM "pgupgrade.sgml"> <!entity seg SYSTEM "seg.sgml"> diff --git a/doc/src/sgml/pgtestfsync.sgml b/doc/src/sgml/pgtestfsync.sgml new file mode 100644 index 00000000000..e4b7ecaaa3e --- /dev/null +++ b/doc/src/sgml/pgtestfsync.sgml @@ -0,0 +1,70 @@ +<!-- doc/src/sgml/pgtestfsync.sgml --> + +<sect1 id="pgtestfsync"> + <title>pg_test_fsync</title> + + <indexterm zone="pgtestfsync"> + <primary>pg_test_fsync</primary> + </indexterm> + + <para> + <application>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. + </para> + + <sect2> + <title>Usage</title> + + <sect2> + <title><application>pg_test_fsync</> Options</title> + + <para> + <application>pg_test_fsync</application> accepts the following command-line arguments: + + <variablelist> + + <varlistentry> + <term><option>-f</option></term> + <term><option>--filename</option></term> + <listitem> + <para> + Specifies the filename for test. The file should be in the + same file system as the <filename>pg_xlog</> directory. + <filename>/pg_xlog</> contains the <acronym>WAL</> files.) + The default is <filename>test_fsync.out</> in the current + directory. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-o</option></term> + <term><option>--ops-per-test</option></term> + <listitem> + <para> + Specifies the number of operations per test. The more operations + per test, the greater the test's accuracy. The default is + 2000. + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + + </sect2> + + <sect2> + <title>Author</title> + + <para> + Bruce Momjian <email>[email protected]</email> + </para> + </sect2> + +</sect1> diff --git a/src/tools/fsync/Makefile b/src/tools/fsync/Makefile deleted file mode 100644 index 44419eef49a..00000000000 --- 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 fee9c62a185..00000000000 --- 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. - |