Move test_fsync to /contrib.
authorBruce Momjian
Fri, 21 Jan 2011 17:47:54 +0000 (12:47 -0500)
committerBruce Momjian
Fri, 21 Jan 2011 17:47:54 +0000 (12:47 -0500)
contrib/pg_test_fsync/Makefile [new file with mode: 0644]
contrib/pg_test_fsync/test_fsync.c [moved from src/tools/fsync/test_fsync.c with 100% similarity]
doc/src/sgml/contrib.sgml
doc/src/sgml/filelist.sgml
doc/src/sgml/pgtestfsync.sgml [new file with mode: 0644]
src/tools/fsync/Makefile [deleted file]
src/tools/fsync/README [deleted file]

diff --git a/contrib/pg_test_fsync/Makefile b/contrib/pg_test_fsync/Makefile
new file mode 100644 (file)
index 0000000..22622a1
--- /dev/null
@@ -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
index d78847395e512aa905474b0658de10fd2040ea43..f5bd493543f4b7733933c512e957744af092fd14 100644 (file)
@@ -112,6 +112,7 @@ psql -d dbname -f SHAREDIR/contrib/module.sql
  &pgstandby;
  &pgstatstatements;
  &pgstattuple;
+ &pgtestfsync;
  &pgtrgm;
  &pgupgrade;
  &seg;
index aa2d801deb77375c4c622b3eaef6eca76ab67c0f..9d4cfc927ba23a82ff9e2322f8b546e638949c40 100644 (file)
 
 
 
+
 
 
 
diff --git a/doc/src/sgml/pgtestfsync.sgml b/doc/src/sgml/pgtestfsync.sgml
new file mode 100644 (file)
index 0000000..e4b7eca
--- /dev/null
@@ -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 [email protected]
+  
+
+
diff --git a/src/tools/fsync/Makefile b/src/tools/fsync/Makefile
deleted file mode 100644 (file)
index 44419ee..0000000
+++ /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 (file)
index fee9c62..0000000
+++ /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.
-