Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f374a9d

Browse files
committed
Change clusterdb and vacuumdb into C programs.
1 parent eab5d64 commit f374a9d

File tree

10 files changed

+552
-389
lines changed

10 files changed

+552
-389
lines changed

doc/src/sgml/maintenance.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.22 2003/03/25 16:15:37 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.23 2003/06/18 12:19:11 petere Exp $
33
-->
44

55
<chapter id="maintenance">
@@ -136,7 +136,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.22 2003/03/25 16:15:37
136136
<command>VACUUM</> once a day at a low-usage time of day, supplemented
137137
by more frequent vacuuming of heavily-updated tables if necessary.
138138
(If you have multiple databases in a cluster, don't forget to
139-
vacuum each one; the <filename>vacuumdb</> script may be helpful.)
139+
vacuum each one; the program <filename>vacuumdb</> may be helpful.)
140140
Use plain <command>VACUUM</>, not <command>VACUUM FULL</>, for routine
141141
vacuuming for space recovery.
142142
</para>

doc/src/sgml/ref/clusterdb.sgml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.9 2003/03/24 14:32:51 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.10 2003/06/18 12:19:11 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -41,16 +41,13 @@ PostgreSQL documentation
4141
</para>
4242

4343
<para>
44-
<application>clusterdb</application> is a shell script wrapper around the
45-
backend command
46-
<xref linkend="SQL-CLUSTER" endterm="sql-cluster-title"> via
47-
the <productname>PostgreSQL</productname> interactive terminal
48-
<xref linkend="APP-PSQL">. There is no effective
49-
difference between clustering databases via this or other methods.
50-
<application>psql</application> must be found by the script and
51-
a database server must be running at the targeted host. Also, any default
52-
settings and environment variables available to <application>psql</application>
53-
and the <application>libpq</application> front-end library do apply.
44+
<application>clusterdb</application> is a wrapper around the SQL
45+
command <xref linkend="SQL-CLUSTER" endterm="sql-cluster-title">.
46+
There is no effective difference between clustering databases via
47+
this or other methods. The database server must be running at the
48+
targeted host. Also, any default settings and environment
49+
variables used by the <application>libpq</application> front-end
50+
library will apply.
5451
</para>
5552

5653
</refsect1>

doc/src/sgml/ref/dropuser.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.25 2003/05/26 17:50:09 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.26 2003/06/18 12:19:11 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -37,13 +37,13 @@ PostgreSQL documentation
3737
</para>
3838

3939
<para>
40-
<application>dropuser</application> is a shell script wrapper
41-
around the <acronym>SQL</acronym> command <xref
42-
linkend="SQL-DROPUSER" endterm="SQL-DROPUSER-title">. The database
43-
server must be running on the targeted host. There
44-
is nothing special about removing users via this or other
45-
methods. Also, any default settings and environment variables
46-
used by the <application>libpq</application> front-end library will apply.
40+
<application>dropuser</application> is a wrapper around the
41+
<acronym>SQL</acronym> command <xref linkend="SQL-DROPUSER"
42+
endterm="SQL-DROPUSER-title">. The database server must be running
43+
on the targeted host. There is nothing special about removing
44+
users via this or other methods. Also, any default settings and
45+
environment variables used by the <application>libpq</application>
46+
front-end library will apply.
4747
</para>
4848
</refsect1>
4949

doc/src/sgml/ref/vacuumdb.sgml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.28 2003/03/24 14:32:51 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.29 2003/06/18 12:19:11 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -48,16 +48,13 @@ PostgreSQL documentation
4848
</para>
4949

5050
<para>
51-
<application>vacuumdb</application> is a shell script wrapper around the
52-
backend command
53-
<xref linkend="SQL-VACUUM" endterm="SQL-VACUUM-title"> via
54-
the <productname>PostgreSQL</productname> interactive terminal
55-
<xref linkend="APP-PSQL">. There is no effective
56-
difference between vacuuming databases via this or other methods.
57-
<application>psql</application> must be found by the script and
58-
a database server must be running at the targeted host. Also, any default
59-
settings and environment variables available to <application>psql</application>
60-
and the <application>libpq</application> front-end library do apply.
51+
<application>vacuumdb</application> is a wrapper around the SQL
52+
command <xref linkend="SQL-VACUUM" endterm="SQL-VACUUM-title">.
53+
There is no effective difference between vacuuming databases via
54+
this or other methods. The database server must be running at the
55+
targeted host. Also, any default settings and environment
56+
variables used by the <application>libpq</application> front-end
57+
library will apply.
6158
</para>
6259

6360

src/bin/scripts/Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.20 2003/04/16 05:23:55 tgl Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.21 2003/06/18 12:19:11 petere Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

1212
subdir = src/bin/scripts
1313
top_builddir = ../../..
1414
include $(top_builddir)/src/Makefile.global
1515

16-
SCRIPTS := vacuumdb clusterdb
17-
PROGRAMS = createdb createlang createuser dropdb droplang dropuser
16+
PROGRAMS = createdb createlang createuser dropdb droplang dropuser clusterdb vacuumdb
1817

1918
override CPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir) $(CPPFLAGS)
2019

@@ -30,6 +29,8 @@ createuser: createuser.o common.o dumputils.o sprompt.o $(top_builddir)/src/back
3029
dropdb: dropdb.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
3130
droplang: droplang.o common.o sprompt.o print.o mbprint.o
3231
dropuser: dropuser.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
32+
clusterdb: clusterdb.o common.o dumputils.o sprompt.o $(top_builddir)/src/backend/parser/keywords.o
33+
vacuumdb: vacuumdb.o common.o sprompt.o
3334

3435
dumputils.c sprompt.c : % : $(top_srcdir)/src/bin/pg_dump/%
3536
rm -f $@ && $(LN_S) $< .
@@ -49,14 +50,14 @@ install: all installdirs
4950
$(INSTALL_PROGRAM) droplang$(X) $(DESTDIR)$(bindir)/droplang$(X)
5051
$(INSTALL_PROGRAM) createuser$(X) $(DESTDIR)$(bindir)/createuser$(X)
5152
$(INSTALL_PROGRAM) dropuser$(X) $(DESTDIR)$(bindir)/dropuser$(X)
52-
$(INSTALL_SCRIPT) $(srcdir)/clusterdb $(DESTDIR)$(bindir)/clusterdb
53-
$(INSTALL_SCRIPT) $(srcdir)/vacuumdb $(DESTDIR)$(bindir)/vacuumdb
53+
$(INSTALL_PROGRAM) clusterdb$(X) $(DESTDIR)$(bindir)/clusterdb$(X)
54+
$(INSTALL_PROGRAM) vacuumdb$(X) $(DESTDIR)$(bindir)/vacuumdb$(X)
5455

5556
installdirs:
5657
$(mkinstalldirs) $(DESTDIR)$(bindir)
5758

5859
uninstall:
59-
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS) $(addsuffix $(X), $(PROGRAMS)))
60+
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(addsuffix $(X), $(PROGRAMS)))
6061

6162

6263
clean distclean maintainer-clean:

src/bin/scripts/clusterdb

Lines changed: 0 additions & 168 deletions
This file was deleted.

0 commit comments

Comments
 (0)