[csw-devel] SF.net SVN: gar:[16655] csw/mgar/pkg/postgresql/branches/postgresql-8. 3-raos

guengel at users.sourceforge.net guengel at users.sourceforge.net
Mon Jan 2 21:52:56 CET 2012


Revision: 16655
          http://gar.svn.sourceforge.net/gar/?rev=16655&view=rev
Author:   guengel
Date:     2012-01-02 20:52:56 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------
postgresql/branches/postgresql-8.3-raos: Added section about migrating from CSWpostgresql. Location of log file can be configured now.

Modified Paths:
--------------
    csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/Makefile
    csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/README.CSW
    csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl
    csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/postgresql.conf.tmpl

Modified: csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/Makefile
===================================================================
--- csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/Makefile	2012-01-02 20:32:42 UTC (rev 16654)
+++ csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/Makefile	2012-01-02 20:52:56 UTC (rev 16655)
@@ -118,6 +118,10 @@
 PGDOCDIR		= $(datadir)/doc/$(NAME)/$(BASE_VERSION_NODOT)
 PGLOCALSTATEDIR_BASE	= $(localstatedir)/$(NAME)
 PGDATA			= $(PGLOCALSTATEDIR_BASE)/$(BASE_VERSION_NODOT)
+# This variable has been introduced for using in EXPANDVARS files
+PGNAMEVERSIONED		= $(NAME)$(BASE_VERSION_NODOT)
+# This variable has been introduced for using in EXPANDVARS files
+PGNAME_VERSIONED	= $(NAME)-$(BASE_VERSION_NODOT)
 # Those BIN_NAMES_* are used both, for package creation and alternatives
 BIN_NAMES_SERVER	= initdb ipcclean pg_controldata pg_ctl pg_resetxlog postmaster postgres
 BIN_NAMES_DEVEL		= ecpg pg_config

Modified: csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/README.CSW
===================================================================
--- csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/README.CSW	2012-01-02 20:32:42 UTC (rev 16654)
+++ csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/README.CSW	2012-01-02 20:52:56 UTC (rev 16655)
@@ -7,17 +7,35 @@
 
 OpenCSW's PostgreSQL allows for parallel installation of different
 PostgreSQL versions. Therefore, the binaries have appended the
-PostgreSQL version, e.g. PostgreSQL's @VERSION@ `psql' is named
+PostgreSQL version number, e.g. PostgreSQL's @VERSION@ `psql' is named
 `psql- at BASE_VERSION_NODOT@'. The same holds for manpages.
 
 The notable exception to this are development files. Development files
 are only available for the latest PostgreSQL version provided by
-OpenCSW and have no version appended.
+OpenCSW and have no version number appended.
 
 Please see also `Starting the PostgreSQL Server' below for caveat on
 running multiple PostgreSQL servers in parallel.
 
 
+Migrating from CSWpostgresql
+----------------------------
+
+CSWpostgresql has been superseeded by CSW at NAME@@BASE_VERSION_NODOT at .
+It is possible to have CSWpostgresql and CSW at NAME@@BASE_VERSION_NODOT@
+installed on the same system, though. Please refer to `Starting the
+PostgreSQL Server' below for more information on how to run multiple
+PostgreSQL instances on the same system.
+
+In order to migrate from CSWpostgresql to CSW at NAME@@BASE_VERSION_NODOT@,
+create a full dump of the CSWpostgresql database cluster as
+described in
+
+ http://www.postgresql.org/docs/@BASE_VERSION@/static/migration.html
+
+and transfer it to the CSW at NAME@@BASE_VERSION_NODOT@ database cluster.
+
+
 32/64-bit Binaries
 ------------------
 
@@ -56,7 +74,7 @@
 
  @sysconfdir@/postgresql- at BASE_VERSION_NODOT@.conf
 
-and the database server will not be started, allowing for
+and the database server will not be started, thus allowing for
 post-installation customization.
 
 In order to start the PostgreSQL server you can either use
@@ -91,13 +109,15 @@
 ------------------------------------
 
 Configuration of the server start-up options is done through a
-user-configuration file, `@sysconfdir@/postgresql- at BASE_VERSION_NODOT@.conf'.
-A sample template has been provided for you at `/etc/opt/csw/postgresql- at BASE_VERSION_NODOT@.conf.CSW'.
+user-configuration file, `@sysconfdir@/postgresql- at BASE_VERSION_NODOT@.conf', regardless of
+whether Solaris SMF or System V-style initialization is used.
 
-This file also defines the location of the PostgreSQL database
-cluster in `PGDATA', which is by default `/var/opt/csw/postgresql/@BASE_VERSION_NODOT@'.
+This file also defines the location of the PostgreSQL database cluster
+in `PGDATA', which is by default
 
+ /var/opt/csw/postgresql/@BASE_VERSION_NODOT@
 
+
 Initializing the Database Cluster
 ---------------------------------
 
@@ -112,7 +132,12 @@
 When installing PostgreSQL for the first time, the database cluster
 will be initialized using default values.
 
+Please note, that when changing the memory model of the server
+binaries, i.e. from 32-bit to 64-bit or vice versa, you have to
+re-initialize the database cluster (see also `32/64-bit Binaries'
+above).
 
+
 --
 That's all folks.
 

Modified: csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl
===================================================================
--- csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl	2012-01-02 20:32:42 UTC (rev 16654)
+++ csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl	2012-01-02 20:52:56 UTC (rev 16655)
@@ -32,6 +32,7 @@
 [ -z "${SHUTDOWNMODE}" ] && SHUTDOWNMODE=fast
 [ -z "${PGENCODING}" ] && PGENCODING=UTF8
 [ -z "${PGSUPERUSER}" ] && PGSUPERUSER=postgres
+[ -z "${PGLOGOUTPUT}" ] && PGLOGOUTPUT=${PGDATA}/postgresql.log
 
 if [ -n "${SERVEROPTS}" ]
 then
@@ -64,16 +65,16 @@
 	 echo "Starting PostgreSQL..."
 	 if [ -n "${SERVEROPTS}" ]
 	 then
-	     su postgres -c "${PGCTL} start -D ${PGDATA} -l ${PGDATA}/postgresql.log -o '${SERVEROPTS}'"
+	     su postgres -c "${PGCTL} start -D ${PGDATA} -l ${PGLOGOUTPUT} -o '${SERVEROPTS}'"
 	 else
-	     su postgres -c "${PGCTL} start -D ${PGDATA} -l ${PGDATA}/postgresql.log"
+	     su postgres -c "${PGCTL} start -D ${PGDATA} -l ${PGLOGOUTPUT}"
 	 fi
       fi
       ;;
 
 stop)
      echo "Stopping PostgreSQL database..."
-     su postgres -c "${PGCTL} stop -D ${PGDATA} -l ${PGDATA}/postgresql.log -m ${SHUTDOWNMODE}"
+     su postgres -c "${PGCTL} stop -D ${PGDATA} -l ${PGLOGOUTPUT} -m ${SHUTDOWNMODE}"
      true  # The previous command fails when there's no .pid file
      ;;
 
@@ -81,15 +82,15 @@
      echo "Restarting PostgreSQL database..."
      if [ -n "${SERVEROPTS}" ]
      then
-	 su postgres -c "${PGCTL} restart -D ${PGDATA} -l ${PGDATA}/postgresql.log -m ${SHUTDOWNMODE} -o '${SERVEROPTS}'"
+	 su postgres -c "${PGCTL} restart -D ${PGDATA} -l ${PGLOGOUTPUT} -m ${SHUTDOWNMODE} -o '${SERVEROPTS}'"
      else
-	 su postgres -c "${PGCTL} restart -D ${PGDATA} -l ${PGDATA}/postgresql.log -m ${SHUTDOWNMODE}"
+	 su postgres -c "${PGCTL} restart -D ${PGDATA} -l ${PGLOGOUTPUT} -m ${SHUTDOWNMODE}"
      fi
      ;;
 
 reload)
      echo "Reloading PostgreSQL database..."
-     su postgres -c "${PGCTL} reload -D ${PGDATA} -l ${PGDATA}/postgresql.log"
+     su postgres -c "${PGCTL} reload -D ${PGDATA} -l ${PGLOGOUTPUT}"
      ;;
 
 status)

Modified: csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/postgresql.conf.tmpl
===================================================================
--- csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/postgresql.conf.tmpl	2012-01-02 20:32:42 UTC (rev 16654)
+++ csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/postgresql.conf.tmpl	2012-01-02 20:52:56 UTC (rev 16655)
@@ -1,35 +1,37 @@
-# Example PostgreSQL server configuration file.
+# This is a shell script fragment.
 # 
-# Provided by the OpenCSW package of PostgreSQL.  This file is read by the
-# /etc/opt/csw/init.d/cswpostgres startup script, and can be used to override
-# the defaults.
+# This file is sourced by the /etc/opt/csw/init.d/csw at PGNAME_VERSIONED@
+# startup script, and can be used to override the defaults.
 #
 # Please use alternatives to choose between 32/64bit version of the
-# server (See also @docdir@/@NAME@@BASE_VERSION_NODOT at _server/README.CSW)
+# server (See also @docdir@/@PGNAMEVERSIONED at _server/README.CSW)
 
 # The location of the data directory.
+#
 # Default: @PGDATA@
 PGDATA=@PGDATA@
 
-# The shutdown mode used
+# Specifies the shutdown mode. mode can be smart, fast, or immediate,
+# or the first letter of one of these three.
 #
-# Shutdown modes are:
-#  smart       quit after all clients have disconnected
-#  fast        quit directly, with proper shutdown
-#  immediate   quit without complete shutdown; will lead to recovery on restart
-#
 # Default: fast
-SHUTDOWNMODE=fast
+#SHUTDOWNMODE=fast
 
+# Append the server log output to filename. If the file does not
+# exist, it is created. The umask is set to 077, so access to the log
+# file from other users is disallowed by default
+#
+# Default: ${PGDATA}/postgresql.log
+#PGLOGOUTPUT=${PGDATA}/postgresql.log
+
 # Additional options to pass to postmaster.
 #
 # Please note: it is no longer necessary to pass the '-o' option.
 #
 # SERVEROPTS="-i"
 
-
 ##
-## The following options are used by initdb when initializing the
+## The following variables are used by initdb when initializing the
 ## database cluster
 ##
 
@@ -41,7 +43,7 @@
 #  http://www.postgresql.org/docs/@BASE_VERSION@/static/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED
 #
 # Default: UTF8
-PGENCODING=UTF8
+#PGENCODING=UTF8
 
 # The locale used to initialize the database cluster.
 #
@@ -58,4 +60,4 @@
 # name is different.
 #
 # Default: postgres
-PGSUPERUSER=postgres
+#PGSUPERUSER=postgres

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list