Update to PostgreSQL 9.2.0; add postgresql-plpython3

This commit is contained in:
Tom Lane 2012-09-10 11:15:54 -04:00
parent bd43a1efcc
commit 795d3d1431
9 changed files with 466 additions and 265 deletions

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
/postgresql-9.2.0.tar.bz2
/postgresql-9.2.0-US.pdf
/postgresql-9.1.5.tar.bz2 /postgresql-9.1.5.tar.bz2
/postgresql-9.1.5-US.pdf
/postgresql-9.0.8.tar.bz2

View File

@ -1,6 +1,6 @@
README.rpm-dist README.rpm-dist
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
Version 9.1, for the PostgreSQL 9.1 RPM set. Version 9.2, for the PostgreSQL 9.2 RPM set.
Devrim Gündüz <devrim@gunduz.org> Devrim Gündüz <devrim@gunduz.org>
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@ -23,9 +23,9 @@ This document exists to explain the layout of the RPMs for PostgreSQL, to
describe various RPM specifics, and to document special features found describe various RPM specifics, and to document special features found
in the RPMset. in the RPMset.
This document is written to be applicable to version 9.1 of PostgreSQL, This document is written to be applicable to version 9.2 of PostgreSQL,
which is the current version of the RPMs as of this writing. More to the which is the current version of the RPMs as of this writing. More to the
point, versions prior to 9.1 are not documented here. point, versions prior to 9.2 are not documented here.
This document is intended for use only with the RPMs supplied in Red Hat This document is intended for use only with the RPMs supplied in Red Hat
Enterprise Linux, CentOS and Fedora. Note that there are also "PGDG" Enterprise Linux, CentOS and Fedora. Note that there are also "PGDG"
@ -63,14 +63,15 @@ upgrading.
The user 'postgres' is created during installation of the server subpackage. The user 'postgres' is created during installation of the server subpackage.
This user by default is UID and GID 26. The user has the default shell set to This user by default is UID and GID 26. The user has the default shell set to
bash, and the home directory set to /var/lib/pgsql. This user also has no bash, and the home directory set to /var/lib/pgsql. This user also has no
default password. If you want to be able to su to it from a non-root account default password, so the only way to become this user is to su to it from root.
or login as 'postgres' you will need to set a password using passwd. If you want to be able to su to it from a non-root account or log in directly
as 'postgres' you will need to set a password using passwd.
UPGRADING AN INSTALLATION UPGRADING AN INSTALLATION
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
For a minor-version upgrade (such as 9.1.1 to 9.1.2), just install the For a minor-version upgrade (such as 9.2.1 to 9.2.2), just install the
new RPMs; there's usually nothing more to it than that. Upgrading new RPMs; there's usually nothing more to it than that. Upgrading
across a major release of PostgreSQL (for example, from 9.0.x to 9.1.x) across a major release of PostgreSQL (for example, from 9.1.x to 9.2.x)
requires more effort. requires more effort.
If you are upgrading across more than one major release of PostgreSQL If you are upgrading across more than one major release of PostgreSQL
@ -82,7 +83,7 @@ and run the dump file through psql to restore your data.
In some major releases, the RPMs also support in-place upgrade from the In some major releases, the RPMs also support in-place upgrade from the
immediately previous major release. Currently, you can upgrade in-place immediately previous major release. Currently, you can upgrade in-place
from 9.0.x to 9.1.x. This is much faster than a dump and reload. from 9.1.x to 9.2.x. This is much faster than a dump and reload.
To do an in-place upgrade: To do an in-place upgrade:
* shut down the old postmaster ("systemctl stop postgresql.service") * shut down the old postmaster ("systemctl stop postgresql.service")
* optionally make a backup of /var/lib/pgsql/data/ (recommended!) * optionally make a backup of /var/lib/pgsql/data/ (recommended!)
@ -115,9 +116,10 @@ postgresql-devel: Development libraries and include files
postgresql-test: The regression tests and associated files postgresql-test: The regression tests and associated files
postgresql-upgrade: Support files for upgrading from previous major version postgresql-upgrade: Support files for upgrading from previous major version
postgresql-docs: Extra documentation, such as the tutorial files postgresql-docs: Extra documentation, such as the tutorial files
postgresql-contrib: The contrib source tree, as well as selected binaries postgresql-contrib: Add-on loadable modules and programs
postgresql-plperl: PL/Perl procedural language postgresql-plperl: PL/Perl procedural language
postgresql-plpython: PL/Python procedural language postgresql-plpython: PL/Python procedural language (for Python 2)
postgresql-plpython3: PL/Python procedural language (for Python 3)
postgresql-pltcl: PL/Tcl procedural language postgresql-pltcl: PL/Tcl procedural language
You have to install postgresql and postgresql-libs to do anything. You have to install postgresql and postgresql-libs to do anything.
@ -145,7 +147,7 @@ However, the Red Hat / CentOS / Fedora RPM's install the files like
this: this:
Executables: /usr/bin Executables: /usr/bin
Libraries: /usr/lib (or /usr/lib64) Libraries: /usr/lib (or /usr/lib64 on 64-bit machines)
Documentation: /usr/share/doc/postgresql-docs-x.y.z/html Documentation: /usr/share/doc/postgresql-docs-x.y.z/html
Contrib documentation: /usr/share/doc/postgresql-contrib-x.y.z Contrib documentation: /usr/share/doc/postgresql-contrib-x.y.z
Source: not installed Source: not installed
@ -196,8 +198,8 @@ As an example, let us create a secondary postmaster called, creatively enough,
You will probably also want to do 'systemctl enable secondary.service' You will probably also want to do 'systemctl enable secondary.service'
so that the new postmaster is automatically started in future reboots. so that the new postmaster is automatically started in future reboots.
When doing a major-version upgrade of a secondary postmaster, mention the When doing a major-version upgrade of a secondary postmaster, add the
service name in the postgresql-setup command, for example 'postgresql-setup service name to the postgresql-setup command, for example 'postgresql-setup
upgrade secondary'. This will let postgresql-setup find the correct data upgrade secondary'. This will let postgresql-setup find the correct data
directory from the service file. directory from the service file.
@ -223,8 +225,8 @@ your database machine is up to the task.
To run the regression tests under the RPM installation, make sure that the To run the regression tests under the RPM installation, make sure that the
postmaster has been started (if not, su to root and do "systemctl start postmaster has been started (if not, su to root and do "systemctl start
postgresql.service"), cd to /usr/lib/pgsql/test/regress (or postgresql.service"), su to postgres, cd to /usr/lib/pgsql/test/regress
/usr/lib64/pgsql/test/regress on a 64-bit machine), su to postgres, (or /usr/lib64/pgsql/test/regress on a 64-bit machine),
and execute "make check". and execute "make check".
This command will start the regression tests and will both show the This command will start the regression tests and will both show the
results to the screen and store the results in the file regress.out. results to the screen and store the results in the file regress.out.
@ -235,8 +237,8 @@ find out whether the differences are actually significant. If you need help
interpreting the results, contact the pgsql-general list at interpreting the results, contact the pgsql-general list at
postgresql.org. postgresql.org.
After testing, say "make clean" to remove the files generated by the test After testing, run "make clean" to remove the files generated by the test
script. script. Then you can remove the postgresql-test RPM, if you wish.
STARTING POSTMASTER AUTOMATICALLY AT SYSTEM STARTUP STARTING POSTMASTER AUTOMATICALLY AT SYSTEM STARTUP
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -279,41 +281,52 @@ day of the week. You can adjust this by changing postgresql.conf settings.
REBUILDING FROM SOURCE RPM REBUILDING FROM SOURCE RPM
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
If your distribution is not supported by the binary RPMs from PostgreSQL.org, If your distribution is not supported by the binary RPMs from PostgreSQL.org,
you will need to rebuild from the source RPM. Download the .src.rpm for this you will need to rebuild from the source RPM.
release. You will need to be root to rebuild, unless you have set up
a non-root build environment (which is the recommended method anyway).
Install the source RPM with rpm -i, then cd to the rpm building area If you have not previously rebuilt any RPMs, set up the required environment:
(which is /usr/src/redhat by default). You will have to have a full make a work directory, say ~/rpmwork, then cd into it and do
development environment to rebuild the full RPM set. mkdir BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
Then make a file ~/.rpmmacros containing
%_topdir <full path to work directory here>
Download the postgresql .src.rpm for the release you want and place it in
the SRPMS subdirectory, then cd there and execute
rpmbuild --rebuild postgresql-nnn.src.rpm
The results will appear under the RPMS subdirectory.
You will have to have a full development environment to rebuild the RPM set.
If rpmbuild complains of lack of certain packages, install them and try
again. In some cases, you can disable features to avoid needing some
development packages, as detailed next.
This release of the RPMset includes the ability to conditionally build This release of the RPMset includes the ability to conditionally build
sets of packages. The parameters, their defaults, and the meanings are: sets of packages. The parameters, their defaults, and the meanings are:
beta 0 #build with cassert and do not strip the binaries beta 0 #build with cassert and do not strip the binaries
python 1 #build the postgresql-python package. runselftest 1 #do "make check" during the build
tcl 1 #build the postgresql-tcl package. test 1 #build the postgresql-test package
test 1 #build the postgresql-test package. upgrade 1 #build the postgresql-upgrade package
plpython 1 #build the PL/Python procedural language package. plpython 1 #build the PL/Python procedural language package
pltcl 1 #build the PL/Tcl procedural language package. plpython3 1 #build the PL/Python3 procedural language package
plperl 1 #build the PL/Perl procedural language package. pltcl 1 #build the PL/Tcl procedural language package
ssl 1 #use OpenSSL support. plperl 1 #build the PL/Perl procedural language package
kerberos 1 #use Kerberos 5 support. ssl 1 #build with OpenSSL support
nls 1 #build with national language support. kerberos 1 #build with Kerberos 5 support
ldap 1 #build with LDAP support. ldap 1 #build with LDAP support
pam 1 #build with PAM support. nls 1 #build with national language support
runselftest 1 #do "make check" during the build. pam 1 #build with PAM support
sdt 1 #build with SystemTap support. sdt 1 #build with SystemTap support
xml 1 #build with XML support xml 1 #build with XML support
pgfts 1 #build with --enable-thread-safety pgfts 1 #build with --enable-thread-safety
selinux 1 #build contrib/selinux
uuid 1 #build contrib/uuid-ossp uuid 1 #build contrib/uuid-ossp
To use these defines, invoke a rebuild like this: To use these defines, invoke a rebuild like this:
rpmbuild --rebuild --define 'python 0' --define 'tcl 0' \ rpmbuild --rebuild --define 'plpython 0' --define 'pltcl 0' \
--define 'test 0' --define 'runselftest 0' --define 'kerberos 0' \ --define 'test 0' --define 'runselftest 0' --define 'kerberos 0' \
postgresql-9.1.2-1.src.rpm postgresql-9.2.0-1.src.rpm
This line would disable the python, tcl, and test subpackages, disable the This line would disable the plpython, pltcl, and test subpackages, disable
regression test run during build, and disable kerberos support. the regression test run during build, and disable kerberos support.
You might need to disable runselftest if there is an installed version of You might need to disable runselftest if there is an installed version of
PostgreSQL that is a different major version from what you are trying to PostgreSQL that is a different major version from what you are trying to

View File

@ -5,11 +5,11 @@ to doing it this way though, for example that the postmaster's port number
is visible in "ps" as part of its command line.) is visible in "ps" as part of its command line.)
diff -Naur postgresql-9.1.5.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-9.1.5/src/backend/utils/misc/postgresql.conf.sample diff -Naur postgresql-9.2rc1.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-9.2rc1/src/backend/utils/misc/postgresql.conf.sample
--- postgresql-9.1.5.orig/src/backend/utils/misc/postgresql.conf.sample 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/utils/misc/postgresql.conf.sample 2012-08-23 18:06:49.000000000 -0400
+++ postgresql-9.1.5/src/backend/utils/misc/postgresql.conf.sample 2012-08-17 11:37:03.400210802 -0400 +++ postgresql-9.2rc1/src/backend/utils/misc/postgresql.conf.sample 2012-09-01 21:57:55.498629897 -0400
@@ -61,6 +61,8 @@ @@ -61,6 +61,8 @@
# defaults to 'localhost', '*' = all # defaults to 'localhost'; use '*' for all
# (change requires restart) # (change requires restart)
#port = 5432 # (change requires restart) #port = 5432 # (change requires restart)
+# Note: In RHEL/Fedora installations, you can't set the port number here; +# Note: In RHEL/Fedora installations, you can't set the port number here;

View File

@ -9,10 +9,23 @@ files. We don't want that to happen because the BuildRequires for the
package don't include the necessary documentation tools. package don't include the necessary documentation tools.
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/client-auth.sgml postgresql-9.1.5/doc/src/sgml/client-auth.sgml diff -Naur postgresql-9.2rc1.orig/contrib/pg_upgrade/server.c postgresql-9.2rc1/contrib/pg_upgrade/server.c
--- postgresql-9.1.5.orig/doc/src/sgml/client-auth.sgml 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/contrib/pg_upgrade/server.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/client-auth.sgml 2012-09-06 11:53:55.188679276 -0400 +++ postgresql-9.2rc1/contrib/pg_upgrade/server.c 2012-09-06 12:06:22.425763034 -0400
@@ -831,7 +831,7 @@ @@ -197,7 +197,8 @@
snprintf(socket_string + strlen(socket_string),
sizeof(socket_string) - strlen(socket_string),
" -c %s='%s'",
- (GET_MAJOR_VERSION(cluster->major_version) < 903) ?
+ /* assume 9.1 build will not have unix_socket_directories patch */
+ (GET_MAJOR_VERSION(cluster->major_version) < 902) ?
"unix_socket_directory" : "unix_socket_directories",
cluster->sockdir);
#endif
diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/client-auth.sgml postgresql-9.2rc1/doc/src/sgml/client-auth.sgml
--- postgresql-9.2rc1.orig/doc/src/sgml/client-auth.sgml 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.2rc1/doc/src/sgml/client-auth.sgml 2012-09-06 12:06:22.426763044 -0400
@@ -838,7 +838,7 @@
<varname>unix_socket_permissions</varname> (and possibly <varname>unix_socket_permissions</varname> (and possibly
<varname>unix_socket_group</varname>) configuration parameters as <varname>unix_socket_group</varname>) configuration parameters as
described in <xref linkend="runtime-config-connection">. Or you described in <xref linkend="runtime-config-connection">. Or you
@ -21,10 +34,10 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/client-auth.sgml postgresql-9.1.5/
configuration parameter to place the socket file in a suitably configuration parameter to place the socket file in a suitably
restricted directory. restricted directory.
</para> </para>
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/config.sgml postgresql-9.1.5/doc/src/sgml/config.sgml diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/config.sgml postgresql-9.2rc1/doc/src/sgml/config.sgml
--- postgresql-9.1.5.orig/doc/src/sgml/config.sgml 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/config.sgml 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/config.sgml 2012-09-06 11:53:55.200679690 -0400 +++ postgresql-9.2rc1/doc/src/sgml/config.sgml 2012-09-06 12:06:22.428763063 -0400
@@ -417,17 +417,24 @@ @@ -453,17 +453,24 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -56,7 +69,7 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/config.sgml postgresql-9.1.5/doc/s
This parameter can only be set at server start. This parameter can only be set at server start.
</para> </para>
@@ -436,8 +443,8 @@ @@ -472,8 +479,8 @@
<literal>.s.PGSQL.<replaceable>nnnn</></literal> where <literal>.s.PGSQL.<replaceable>nnnn</></literal> where
<replaceable>nnnn</> is the server's port number, an ordinary file <replaceable>nnnn</> is the server's port number, an ordinary file
named <literal>.s.PGSQL.<replaceable>nnnn</>.lock</literal> will be named <literal>.s.PGSQL.<replaceable>nnnn</>.lock</literal> will be
@ -67,7 +80,7 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/config.sgml postgresql-9.1.5/doc/s
</para> </para>
<para> <para>
@@ -454,8 +461,8 @@ @@ -490,8 +497,8 @@
</indexterm> </indexterm>
<listitem> <listitem>
<para> <para>
@ -78,7 +91,7 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/config.sgml postgresql-9.1.5/doc/s
server.) In combination with the parameter server.) In combination with the parameter
<varname>unix_socket_permissions</varname> this can be used as <varname>unix_socket_permissions</varname> this can be used as
an additional access control mechanism for Unix-domain connections. an additional access control mechanism for Unix-domain connections.
@@ -478,7 +485,7 @@ @@ -514,7 +521,7 @@
</indexterm> </indexterm>
<listitem> <listitem>
<para> <para>
@ -87,7 +100,7 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/config.sgml postgresql-9.1.5/doc/s
sockets use the usual Unix file system permission set. sockets use the usual Unix file system permission set.
The parameter value is expected to be a numeric mode The parameter value is expected to be a numeric mode
specified in the format accepted by the specified in the format accepted by the
@@ -6417,7 +6424,7 @@ @@ -6606,7 +6613,7 @@
</row> </row>
<row> <row>
<entry><option>-k <replaceable>x</replaceable></option></entry> <entry><option>-k <replaceable>x</replaceable></option></entry>
@ -96,10 +109,10 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/config.sgml postgresql-9.1.5/doc/s
</row> </row>
<row> <row>
<entry><option>-l</option></entry> <entry><option>-l</option></entry>
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/app-postgres.html postgresql-9.1.5/doc/src/sgml/html/app-postgres.html diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/html/app-postgres.html postgresql-9.2rc1/doc/src/sgml/html/app-postgres.html
--- postgresql-9.1.5.orig/doc/src/sgml/html/app-postgres.html 2012-08-14 18:56:14.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/html/app-postgres.html 2012-09-05 13:24:03.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/html/app-postgres.html 2012-09-06 11:53:55.201679728 -0400 +++ postgresql-9.2rc1/doc/src/sgml/html/app-postgres.html 2012-09-06 12:06:22.429763072 -0400
@@ -531,11 +531,19 @@ @@ -574,11 +574,19 @@
CLASS="COMMAND" CLASS="COMMAND"
>postgres</TT >postgres</TT
> is to listen for > is to listen for
@ -121,9 +134,9 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/app-postgres.html postgresql-
</P </P
></DD ></DD
><DT ><DT
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/auth-methods.html postgresql-9.1.5/doc/src/sgml/html/auth-methods.html diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/html/auth-methods.html postgresql-9.2rc1/doc/src/sgml/html/auth-methods.html
--- postgresql-9.1.5.orig/doc/src/sgml/html/auth-methods.html 2012-08-14 18:55:57.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/html/auth-methods.html 2012-09-05 13:23:46.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/html/auth-methods.html 2012-09-06 11:53:55.201679728 -0400 +++ postgresql-9.2rc1/doc/src/sgml/html/auth-methods.html 2012-09-06 12:06:22.430763081 -0400
@@ -161,7 +161,7 @@ @@ -161,7 +161,7 @@
>. Or you >. Or you
could set the <TT could set the <TT
@ -133,10 +146,10 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/auth-methods.html postgresql-
> >
configuration parameter to place the socket file in a suitably configuration parameter to place the socket file in a suitably
restricted directory. restricted directory.
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/bookindex.html postgresql-9.1.5/doc/src/sgml/html/bookindex.html diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/html/bookindex.html postgresql-9.2rc1/doc/src/sgml/html/bookindex.html
--- postgresql-9.1.5.orig/doc/src/sgml/html/bookindex.html 2012-08-14 18:56:48.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/html/bookindex.html 2012-09-05 13:24:38.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/html/bookindex.html 2012-09-06 11:53:55.204679820 -0400 +++ postgresql-9.2rc1/doc/src/sgml/html/bookindex.html 2012-09-06 12:06:22.433763111 -0400
@@ -16893,7 +16893,7 @@ @@ -17236,7 +17236,7 @@
></DL ></DL
></DD ></DD
><DT ><DT
@ -145,9 +158,9 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/bookindex.html postgresql-9.1
<A <A
HREF="runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS" HREF="runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS"
>Connection Settings</A >Connection Settings</A
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/preventing-server-spoofing.html postgresql-9.1.5/doc/src/sgml/html/preventing-server-spoofing.html diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/html/preventing-server-spoofing.html postgresql-9.2rc1/doc/src/sgml/html/preventing-server-spoofing.html
--- postgresql-9.1.5.orig/doc/src/sgml/html/preventing-server-spoofing.html 2012-08-14 18:55:56.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/html/preventing-server-spoofing.html 2012-09-05 13:23:45.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/html/preventing-server-spoofing.html 2012-09-06 11:53:55.205679845 -0400 +++ postgresql-9.2rc1/doc/src/sgml/html/preventing-server-spoofing.html 2012-09-06 12:06:22.434763120 -0400
@@ -115,8 +115,8 @@ @@ -115,8 +115,8 @@
>local</TT >local</TT
> >
@ -159,9 +172,9 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/preventing-server-spoofing.ht
>) that has write permission only >) that has write permission only
for a trusted local user. This prevents a malicious user from creating for a trusted local user. This prevents a malicious user from creating
their own socket file in that directory. If you are concerned that their own socket file in that directory. If you are concerned that
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/runtime-config-connection.html postgresql-9.1.5/doc/src/sgml/html/runtime-config-connection.html diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/html/runtime-config-connection.html postgresql-9.2rc1/doc/src/sgml/html/runtime-config-connection.html
--- postgresql-9.1.5.orig/doc/src/sgml/html/runtime-config-connection.html 2012-08-14 18:55:56.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/html/runtime-config-connection.html 2012-09-05 13:23:45.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/html/runtime-config-connection.html 2012-09-06 11:53:55.205679845 -0400 +++ postgresql-9.2rc1/doc/src/sgml/html/runtime-config-connection.html 2012-09-06 12:06:22.435763129 -0400
@@ -274,24 +274,31 @@ @@ -274,24 +274,31 @@
></DD ></DD
><DT ><DT
@ -236,10 +249,10 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/runtime-config-connection.htm
sockets use the usual Unix file system permission set. sockets use the usual Unix file system permission set.
The parameter value is expected to be a numeric mode The parameter value is expected to be a numeric mode
specified in the format accepted by the specified in the format accepted by the
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/runtime-config-short.html postgresql-9.1.5/doc/src/sgml/html/runtime-config-short.html diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/html/runtime-config-short.html postgresql-9.2rc1/doc/src/sgml/html/runtime-config-short.html
--- postgresql-9.1.5.orig/doc/src/sgml/html/runtime-config-short.html 2012-08-14 18:55:57.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/html/runtime-config-short.html 2012-09-05 13:23:46.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/html/runtime-config-short.html 2012-09-06 11:53:55.206679864 -0400 +++ postgresql-9.2rc1/doc/src/sgml/html/runtime-config-short.html 2012-09-06 12:06:22.435763129 -0400
@@ -323,7 +323,7 @@ @@ -330,7 +330,7 @@
><TD ><TD
><TT ><TT
CLASS="LITERAL" CLASS="LITERAL"
@ -248,13 +261,13 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html/runtime-config-short.html pos
CLASS="REPLACEABLE" CLASS="REPLACEABLE"
><I ><I
>x</I >x</I
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/man1/postgres.1 postgresql-9.1.5/doc/src/sgml/man1/postgres.1 diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/man1/postgres.1 postgresql-9.2rc1/doc/src/sgml/man1/postgres.1
--- postgresql-9.1.5.orig/doc/src/sgml/man1/postgres.1 2012-08-14 18:57:43.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/man1/postgres.1 2012-09-05 13:25:37.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/man1/postgres.1 2012-09-06 11:53:55.206679864 -0400 +++ postgresql-9.2rc1/doc/src/sgml/man1/postgres.1 2012-09-06 12:06:22.436763138 -0400
@@ -180,8 +180,10 @@ @@ -195,8 +195,10 @@
.RS 4 .RS 4
Specifies the directory of the Unix\-domain socket on which Specifies the directory of the Unix\-domain socket on which
postgres \fBpostgres\fR
-is to listen for connections from client applications\&. The default is normally -is to listen for connections from client applications\&. The default is normally
-/tmp, but can be changed at build time\&. -/tmp, but can be changed at build time\&.
+is to listen for connections from client applications\&. The value can also be a comma\-separated list of directories\&. An empty value specifies not listening on any Unix\-domain sockets, in which case only TCP/IP sockets can be used to connect to the server\&. The default value is normally +is to listen for connections from client applications\&. The value can also be a comma\-separated list of directories\&. An empty value specifies not listening on any Unix\-domain sockets, in which case only TCP/IP sockets can be used to connect to the server\&. The default value is normally
@ -264,10 +277,10 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/man1/postgres.1 postgresql-9.1.5/d
.RE .RE
.PP .PP
\fB\-l\fR \fB\-l\fR
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/ref/postgres-ref.sgml postgresql-9.1.5/doc/src/sgml/ref/postgres-ref.sgml diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/ref/postgres-ref.sgml postgresql-9.2rc1/doc/src/sgml/ref/postgres-ref.sgml
--- postgresql-9.1.5.orig/doc/src/sgml/ref/postgres-ref.sgml 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/ref/postgres-ref.sgml 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/ref/postgres-ref.sgml 2012-09-06 11:53:55.207679890 -0400 +++ postgresql-9.2rc1/doc/src/sgml/ref/postgres-ref.sgml 2012-09-06 12:06:22.437763147 -0400
@@ -233,8 +233,14 @@ @@ -254,8 +254,14 @@
<para> <para>
Specifies the directory of the Unix-domain socket on which Specifies the directory of the Unix-domain socket on which
<command>postgres</command> is to listen for <command>postgres</command> is to listen for
@ -284,10 +297,10 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/ref/postgres-ref.sgml postgresql-9
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/runtime.sgml postgresql-9.1.5/doc/src/sgml/runtime.sgml diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/runtime.sgml postgresql-9.2rc1/doc/src/sgml/runtime.sgml
--- postgresql-9.1.5.orig/doc/src/sgml/runtime.sgml 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/runtime.sgml 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/runtime.sgml 2012-09-06 11:53:55.208679918 -0400 +++ postgresql-9.2rc1/doc/src/sgml/runtime.sgml 2012-09-06 12:06:22.438763157 -0400
@@ -1816,7 +1816,7 @@ @@ -1798,7 +1798,7 @@
<para> <para>
The simplest way to prevent spoofing for <literal>local</> The simplest way to prevent spoofing for <literal>local</>
connections is to use a Unix domain socket directory (<xref connections is to use a Unix domain socket directory (<xref
@ -296,9 +309,9 @@ diff -Naur postgresql-9.1.5.orig/doc/src/sgml/runtime.sgml postgresql-9.1.5/doc/
for a trusted local user. This prevents a malicious user from creating for a trusted local user. This prevents a malicious user from creating
their own socket file in that directory. If you are concerned that their own socket file in that directory. If you are concerned that
some applications might still reference <filename>/tmp</> for the some applications might still reference <filename>/tmp</> for the
diff -Naur postgresql-9.1.5.orig/src/backend/libpq/pqcomm.c postgresql-9.1.5/src/backend/libpq/pqcomm.c diff -Naur postgresql-9.2rc1.orig/src/backend/libpq/pqcomm.c postgresql-9.2rc1/src/backend/libpq/pqcomm.c
--- postgresql-9.1.5.orig/src/backend/libpq/pqcomm.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/libpq/pqcomm.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/backend/libpq/pqcomm.c 2012-09-06 11:53:55.209679942 -0400 +++ postgresql-9.2rc1/src/backend/libpq/pqcomm.c 2012-09-06 12:06:22.439763167 -0400
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
* StreamServerPort - Open postmaster's server port * StreamServerPort - Open postmaster's server port
* StreamConnection - Create new connection with client * StreamConnection - Create new connection with client
@ -508,10 +521,10 @@ diff -Naur postgresql-9.1.5.orig/src/backend/libpq/pqcomm.c postgresql-9.1.5/src
/* /*
* utime() is POSIX standard, utimes() is a common alternative. If we * utime() is POSIX standard, utimes() is a common alternative. If we
* have neither, there's no way to affect the mod or access time of * have neither, there's no way to affect the mod or access time of
diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-9.1.5/src/backend/postmaster/postmaster.c diff -Naur postgresql-9.2rc1.orig/src/backend/postmaster/postmaster.c postgresql-9.2rc1/src/backend/postmaster/postmaster.c
--- postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/postmaster/postmaster.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/backend/postmaster/postmaster.c 2012-09-06 11:53:55.210679959 -0400 +++ postgresql-9.2rc1/src/backend/postmaster/postmaster.c 2012-09-06 12:06:22.441763187 -0400
@@ -157,7 +157,9 @@ @@ -156,7 +156,9 @@
/* The socket number we are listening for connections on */ /* The socket number we are listening for connections on */
int PostPortNumber; int PostPortNumber;
@ -522,7 +535,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-
char *ListenAddresses; char *ListenAddresses;
/* /*
@@ -590,7 +592,7 @@ @@ -608,7 +610,7 @@
break; break;
case 'k': case 'k':
@ -531,7 +544,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-
break; break;
case 'l': case 'l':
@@ -848,7 +850,7 @@ @@ -852,7 +854,7 @@
/* Need a modifiable copy of ListenAddresses */ /* Need a modifiable copy of ListenAddresses */
rawstring = pstrdup(ListenAddresses); rawstring = pstrdup(ListenAddresses);
@ -540,7 +553,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-
if (!SplitIdentifierString(rawstring, ',', &elemlist)) if (!SplitIdentifierString(rawstring, ',', &elemlist))
{ {
/* syntax error in list */ /* syntax error in list */
@@ -864,12 +866,12 @@ @@ -868,12 +870,12 @@
if (strcmp(curhost, "*") == 0) if (strcmp(curhost, "*") == 0)
status = StreamServerPort(AF_UNSPEC, NULL, status = StreamServerPort(AF_UNSPEC, NULL,
(unsigned short) PostPortNumber, (unsigned short) PostPortNumber,
@ -555,7 +568,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-
ListenSocket, MAXLISTEN); ListenSocket, MAXLISTEN);
if (status == STATUS_OK) if (status == STATUS_OK)
@@ -888,7 +890,7 @@ @@ -892,7 +894,7 @@
curhost))); curhost)));
} }
@ -564,7 +577,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-
ereport(FATAL, ereport(FATAL,
(errmsg("could not create any TCP/IP sockets"))); (errmsg("could not create any TCP/IP sockets")));
@@ -935,13 +937,54 @@ @@ -939,13 +941,54 @@
#endif #endif
#ifdef HAVE_UNIX_SOCKETS #ifdef HAVE_UNIX_SOCKETS
@ -626,7 +639,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-
#endif #endif
/* /*
@@ -1529,15 +1572,15 @@ @@ -1435,15 +1478,15 @@
} }
/* /*
@ -645,10 +658,10 @@ diff -Naur postgresql-9.1.5.orig/src/backend/postmaster/postmaster.c postgresql-
last_touch_time = now; last_touch_time = now;
} }
} }
diff -Naur postgresql-9.1.5.orig/src/backend/tcop/postgres.c postgresql-9.1.5/src/backend/tcop/postgres.c diff -Naur postgresql-9.2rc1.orig/src/backend/tcop/postgres.c postgresql-9.2rc1/src/backend/tcop/postgres.c
--- postgresql-9.1.5.orig/src/backend/tcop/postgres.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/tcop/postgres.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/backend/tcop/postgres.c 2012-09-06 11:53:55.211679977 -0400 +++ postgresql-9.2rc1/src/backend/tcop/postgres.c 2012-09-06 12:06:22.442763197 -0400
@@ -3345,7 +3345,7 @@ @@ -3343,7 +3343,7 @@
break; break;
case 'k': case 'k':
@ -657,10 +670,10 @@ diff -Naur postgresql-9.1.5.orig/src/backend/tcop/postgres.c postgresql-9.1.5/sr
break; break;
case 'l': case 'l':
diff -Naur postgresql-9.1.5.orig/src/backend/utils/adt/varlena.c postgresql-9.1.5/src/backend/utils/adt/varlena.c diff -Naur postgresql-9.2rc1.orig/src/backend/utils/adt/varlena.c postgresql-9.2rc1/src/backend/utils/adt/varlena.c
--- postgresql-9.1.5.orig/src/backend/utils/adt/varlena.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/utils/adt/varlena.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/backend/utils/adt/varlena.c 2012-09-06 11:54:14.148859548 -0400 +++ postgresql-9.2rc1/src/backend/utils/adt/varlena.c 2012-09-06 12:06:39.209922137 -0400
@@ -2387,6 +2387,119 @@ @@ -2446,6 +2446,119 @@
} }
@ -780,9 +793,9 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/adt/varlena.c postgresql-9.1.
/***************************************************************************** /*****************************************************************************
* Comparison Functions used for bytea * Comparison Functions used for bytea
* *
diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.1.5/src/backend/utils/init/miscinit.c diff -Naur postgresql-9.2rc1.orig/src/backend/utils/init/miscinit.c postgresql-9.2rc1/src/backend/utils/init/miscinit.c
--- postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/utils/init/miscinit.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/backend/utils/init/miscinit.c 2012-09-06 11:53:55.213680015 -0400 +++ postgresql-9.2rc1/src/backend/utils/init/miscinit.c 2012-09-06 12:06:22.445763224 -0400
@@ -49,8 +49,8 @@ @@ -49,8 +49,8 @@
ProcessingMode Mode = InitProcessing; ProcessingMode Mode = InitProcessing;
@ -794,7 +807,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
@@ -648,32 +648,35 @@ @@ -640,32 +640,35 @@
*/ */
/* /*
@ -840,7 +853,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
bool isDDLock, const char *refName) bool isDDLock, const char *refName)
{ {
int fd; int fd;
@@ -899,12 +902,7 @@ @@ -891,12 +894,7 @@
DataDir, DataDir,
(long) MyStartTime, (long) MyStartTime,
PostPortNumber, PostPortNumber,
@ -854,7 +867,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
errno = 0; errno = 0;
if (write(fd, buffer, strlen(buffer)) != strlen(buffer)) if (write(fd, buffer, strlen(buffer)) != strlen(buffer))
@@ -942,9 +940,14 @@ @@ -934,9 +932,14 @@
} }
/* /*
@ -871,7 +884,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
} }
/* /*
@@ -953,41 +956,50 @@ @@ -945,41 +948,50 @@
* When this is called, we must have already switched the working * When this is called, we must have already switched the working
* directory to DataDir, so we can just use a relative path. This * directory to DataDir, so we can just use a relative path. This
* helps ensure that we are locking the directory we should be. * helps ensure that we are locking the directory we should be.
@ -933,7 +946,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
/* /*
* utime() is POSIX standard, utimes() is a common alternative; if we * utime() is POSIX standard, utimes() is a common alternative; if we
* have neither, fall back to actually reading the file (which only * have neither, fall back to actually reading the file (which only
@@ -1019,8 +1031,10 @@ @@ -1011,8 +1023,10 @@
* Add (or replace) a line in the data directory lock file. * Add (or replace) a line in the data directory lock file.
* The given string should not include a trailing newline. * The given string should not include a trailing newline.
* *
@ -946,7 +959,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
*/ */
void void
AddToDataDirLockFile(int target_line, const char *str) AddToDataDirLockFile(int target_line, const char *str)
@@ -1028,8 +1042,10 @@ @@ -1020,8 +1034,10 @@
int fd; int fd;
int len; int len;
int lineno; int lineno;
@ -959,7 +972,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
fd = open(DIRECTORY_LOCK_FILE, O_RDWR | PG_BINARY, 0); fd = open(DIRECTORY_LOCK_FILE, O_RDWR | PG_BINARY, 0);
if (fd < 0) if (fd < 0)
@@ -1040,7 +1056,7 @@ @@ -1032,7 +1048,7 @@
DIRECTORY_LOCK_FILE))); DIRECTORY_LOCK_FILE)));
return; return;
} }
@ -968,7 +981,7 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
if (len < 0) if (len < 0)
{ {
ereport(LOG, ereport(LOG,
@@ -1050,36 +1066,50 @@ @@ -1042,36 +1058,50 @@
close(fd); close(fd);
return; return;
} }
@ -1027,10 +1040,10 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/init/miscinit.c postgresql-9.
{ {
/* if write didn't set errno, assume problem is no disk space */ /* if write didn't set errno, assume problem is no disk space */
if (errno == 0) if (errno == 0)
diff -Naur postgresql-9.1.5.orig/src/backend/utils/misc/guc.c postgresql-9.1.5/src/backend/utils/misc/guc.c diff -Naur postgresql-9.2rc1.orig/src/backend/utils/misc/guc.c postgresql-9.2rc1/src/backend/utils/misc/guc.c
--- postgresql-9.1.5.orig/src/backend/utils/misc/guc.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/utils/misc/guc.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/backend/utils/misc/guc.c 2012-09-06 11:53:55.215680028 -0400 +++ postgresql-9.2rc1/src/backend/utils/misc/guc.c 2012-09-06 12:06:22.447763243 -0400
@@ -2867,14 +2867,18 @@ @@ -2894,14 +2894,18 @@
}, },
{ {
@ -1053,9 +1066,9 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/misc/guc.c postgresql-9.1.5/s
}, },
{ {
diff -Naur postgresql-9.1.5.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-9.1.5/src/backend/utils/misc/postgresql.conf.sample diff -Naur postgresql-9.2rc1.orig/src/backend/utils/misc/postgresql.conf.sample postgresql-9.2rc1/src/backend/utils/misc/postgresql.conf.sample
--- postgresql-9.1.5.orig/src/backend/utils/misc/postgresql.conf.sample 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/backend/utils/misc/postgresql.conf.sample 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/backend/utils/misc/postgresql.conf.sample 2012-09-06 11:53:55.216680035 -0400 +++ postgresql-9.2rc1/src/backend/utils/misc/postgresql.conf.sample 2012-09-06 12:06:22.447763243 -0400
@@ -65,7 +65,8 @@ @@ -65,7 +65,8 @@
# Note: Increasing max_connections costs ~400 bytes of shared memory per # Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction). # connection slot, plus lock space (see max_locks_per_transaction).
@ -1066,19 +1079,19 @@ diff -Naur postgresql-9.1.5.orig/src/backend/utils/misc/postgresql.conf.sample p
#unix_socket_group = '' # (change requires restart) #unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation #unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart) # (change requires restart)
diff -Naur postgresql-9.1.5.orig/src/bin/initdb/initdb.c postgresql-9.1.5/src/bin/initdb/initdb.c diff -Naur postgresql-9.2rc1.orig/src/bin/initdb/initdb.c postgresql-9.2rc1/src/bin/initdb/initdb.c
--- postgresql-9.1.5.orig/src/bin/initdb/initdb.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/bin/initdb/initdb.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/bin/initdb/initdb.c 2012-09-06 11:53:55.217680041 -0400 +++ postgresql-9.2rc1/src/bin/initdb/initdb.c 2012-09-06 12:06:22.448763252 -0400
@@ -947,7 +947,7 @@ @@ -979,7 +979,7 @@
setup_config(void) setup_config(void)
{ {
char **conflines; char **conflines;
- char repltok[100]; - char repltok[TZ_STRLEN_MAX + 100];
+ char repltok[MAXPGPATH]; + char repltok[MAXPGPATH];
char path[MAXPGPATH]; char path[MAXPGPATH];
const char *default_timezone;
fputs(_("creating configuration files ... "), stdout); @@ -1001,6 +1001,15 @@
@@ -968,6 +968,15 @@
n_buffers * (BLCKSZ / 1024)); n_buffers * (BLCKSZ / 1024));
conflines = replace_token(conflines, "#shared_buffers = 32MB", repltok); conflines = replace_token(conflines, "#shared_buffers = 32MB", repltok);
@ -1094,10 +1107,10 @@ diff -Naur postgresql-9.1.5.orig/src/bin/initdb/initdb.c postgresql-9.1.5/src/bi
#if DEF_PGPORT != 5432 #if DEF_PGPORT != 5432
snprintf(repltok, sizeof(repltok), "#port = %d", DEF_PGPORT); snprintf(repltok, sizeof(repltok), "#port = %d", DEF_PGPORT);
conflines = replace_token(conflines, "#port = 5432", repltok); conflines = replace_token(conflines, "#port = 5432", repltok);
diff -Naur postgresql-9.1.5.orig/src/bin/pg_ctl/pg_ctl.c postgresql-9.1.5/src/bin/pg_ctl/pg_ctl.c diff -Naur postgresql-9.2rc1.orig/src/bin/pg_ctl/pg_ctl.c postgresql-9.2rc1/src/bin/pg_ctl/pg_ctl.c
--- postgresql-9.1.5.orig/src/bin/pg_ctl/pg_ctl.c 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/bin/pg_ctl/pg_ctl.c 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/bin/pg_ctl/pg_ctl.c 2012-09-06 11:53:55.218680049 -0400 +++ postgresql-9.2rc1/src/bin/pg_ctl/pg_ctl.c 2012-09-06 12:06:22.449763262 -0400
@@ -519,7 +519,7 @@ @@ -521,7 +521,7 @@
hostaddr = optlines[LOCK_FILE_LINE_LISTEN_ADDR - 1]; hostaddr = optlines[LOCK_FILE_LINE_LISTEN_ADDR - 1];
/* /*
@ -1106,9 +1119,9 @@ diff -Naur postgresql-9.1.5.orig/src/bin/pg_ctl/pg_ctl.c postgresql-9.1.5/src/bi
* directories, libpq's host parameter must have a * directories, libpq's host parameter must have a
* leading slash to indicate a socket directory. So, * leading slash to indicate a socket directory. So,
* ignore sockdir if it's relative, and try to use TCP * ignore sockdir if it's relative, and try to use TCP
diff -Naur postgresql-9.1.5.orig/src/include/libpq/libpq.h postgresql-9.1.5/src/include/libpq/libpq.h diff -Naur postgresql-9.2rc1.orig/src/include/libpq/libpq.h postgresql-9.2rc1/src/include/libpq/libpq.h
--- postgresql-9.1.5.orig/src/include/libpq/libpq.h 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/include/libpq/libpq.h 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/include/libpq/libpq.h 2012-09-06 11:53:55.218680049 -0400 +++ postgresql-9.2rc1/src/include/libpq/libpq.h 2012-09-06 12:06:22.450763271 -0400
@@ -44,12 +44,12 @@ @@ -44,12 +44,12 @@
/* /*
* prototypes for functions in pqcomm.c * prototypes for functions in pqcomm.c
@ -1126,10 +1139,10 @@ diff -Naur postgresql-9.1.5.orig/src/include/libpq/libpq.h postgresql-9.1.5/src/
extern void pq_init(void); extern void pq_init(void);
extern void pq_comm_reset(void); extern void pq_comm_reset(void);
extern int pq_getbytes(char *s, size_t len); extern int pq_getbytes(char *s, size_t len);
diff -Naur postgresql-9.1.5.orig/src/include/miscadmin.h postgresql-9.1.5/src/include/miscadmin.h diff -Naur postgresql-9.2rc1.orig/src/include/miscadmin.h postgresql-9.2rc1/src/include/miscadmin.h
--- postgresql-9.1.5.orig/src/include/miscadmin.h 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/include/miscadmin.h 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/include/miscadmin.h 2012-09-06 11:53:55.219680061 -0400 +++ postgresql-9.2rc1/src/include/miscadmin.h 2012-09-06 12:06:22.450763271 -0400
@@ -370,7 +370,7 @@ @@ -411,7 +411,7 @@
* 2 data directory path * 2 data directory path
* 3 postmaster start timestamp (time_t representation) * 3 postmaster start timestamp (time_t representation)
* 4 port number * 4 port number
@ -1138,7 +1151,7 @@ diff -Naur postgresql-9.1.5.orig/src/include/miscadmin.h postgresql-9.1.5/src/in
* 6 first listen_address (IP address or "*"; empty if no TCP port) * 6 first listen_address (IP address or "*"; empty if no TCP port)
* 7 shared memory key (not present on Windows) * 7 shared memory key (not present on Windows)
* *
@@ -388,8 +388,9 @@ @@ -429,8 +429,9 @@
#define LOCK_FILE_LINE_SHMEM_KEY 7 #define LOCK_FILE_LINE_SHMEM_KEY 7
extern void CreateDataDirLockFile(bool amPostmaster); extern void CreateDataDirLockFile(bool amPostmaster);
@ -1150,10 +1163,10 @@ diff -Naur postgresql-9.1.5.orig/src/include/miscadmin.h postgresql-9.1.5/src/in
extern void AddToDataDirLockFile(int target_line, const char *str); extern void AddToDataDirLockFile(int target_line, const char *str);
extern void ValidatePgVersion(const char *path); extern void ValidatePgVersion(const char *path);
extern void process_shared_preload_libraries(void); extern void process_shared_preload_libraries(void);
diff -Naur postgresql-9.1.5.orig/src/include/postmaster/postmaster.h postgresql-9.1.5/src/include/postmaster/postmaster.h diff -Naur postgresql-9.2rc1.orig/src/include/postmaster/postmaster.h postgresql-9.2rc1/src/include/postmaster/postmaster.h
--- postgresql-9.1.5.orig/src/include/postmaster/postmaster.h 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/include/postmaster/postmaster.h 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/include/postmaster/postmaster.h 2012-09-06 11:53:55.219680061 -0400 +++ postgresql-9.2rc1/src/include/postmaster/postmaster.h 2012-09-06 12:06:22.451763281 -0400
@@ -20,7 +20,7 @@ @@ -19,7 +19,7 @@
extern int PostPortNumber; extern int PostPortNumber;
extern int Unix_socket_permissions; extern int Unix_socket_permissions;
extern char *Unix_socket_group; extern char *Unix_socket_group;
@ -1162,10 +1175,10 @@ diff -Naur postgresql-9.1.5.orig/src/include/postmaster/postmaster.h postgresql-
extern char *ListenAddresses; extern char *ListenAddresses;
extern bool ClientAuthInProgress; extern bool ClientAuthInProgress;
extern int PreAuthDelay; extern int PreAuthDelay;
diff -Naur postgresql-9.1.5.orig/src/include/utils/builtins.h postgresql-9.1.5/src/include/utils/builtins.h diff -Naur postgresql-9.2rc1.orig/src/include/utils/builtins.h postgresql-9.2rc1/src/include/utils/builtins.h
--- postgresql-9.1.5.orig/src/include/utils/builtins.h 2012-08-14 18:41:04.000000000 -0400 --- postgresql-9.2rc1.orig/src/include/utils/builtins.h 2012-09-05 01:08:30.000000000 -0400
+++ postgresql-9.1.5/src/include/utils/builtins.h 2012-09-06 11:53:55.220680072 -0400 +++ postgresql-9.2rc1/src/include/utils/builtins.h 2012-09-06 12:06:22.451763281 -0400
@@ -728,6 +728,8 @@ @@ -754,6 +754,8 @@
extern List *textToQualifiedNameList(text *textval); extern List *textToQualifiedNameList(text *textval);
extern bool SplitIdentifierString(char *rawstring, char separator, extern bool SplitIdentifierString(char *rawstring, char separator,
List **namelist); List **namelist);
@ -1174,13 +1187,13 @@ diff -Naur postgresql-9.1.5.orig/src/include/utils/builtins.h postgresql-9.1.5/s
extern Datum replace_text(PG_FUNCTION_ARGS); extern Datum replace_text(PG_FUNCTION_ARGS);
extern text *replace_text_regexp(text *src_text, void *regexp, extern text *replace_text_regexp(text *src_text, void *regexp,
text *replace_text, bool glob); text *replace_text, bool glob);
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/html-stamp postgresql-9.1.5/doc/src/sgml/html-stamp diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/html-stamp postgresql-9.2rc1/doc/src/sgml/html-stamp
--- postgresql-9.1.5.orig/doc/src/sgml/html-stamp 2012-08-14 18:56:48.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/html-stamp 2012-09-05 13:24:38.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/html-stamp 2012-09-06 11:53:55.220680072 -0400 +++ postgresql-9.2rc1/doc/src/sgml/html-stamp 2012-09-06 12:06:22.452763290 -0400
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+hack +hack
diff -Naur postgresql-9.1.5.orig/doc/src/sgml/man-stamp postgresql-9.1.5/doc/src/sgml/man-stamp diff -Naur postgresql-9.2rc1.orig/doc/src/sgml/man-stamp postgresql-9.2rc1/doc/src/sgml/man-stamp
--- postgresql-9.1.5.orig/doc/src/sgml/man-stamp 2012-08-14 18:57:47.000000000 -0400 --- postgresql-9.2rc1.orig/doc/src/sgml/man-stamp 2012-09-05 13:25:43.000000000 -0400
+++ postgresql-9.1.5/doc/src/sgml/man-stamp 2012-09-06 11:53:55.220680072 -0400 +++ postgresql-9.2rc1/doc/src/sgml/man-stamp 2012-09-06 12:06:22.452763290 -0400
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+hack +hack

View File

@ -1,52 +0,0 @@
Back-patch upstream's 9.2 patch to add support for setting oom_score_adj.
diff -Naur postgresql-9.1.4.orig/src/backend/postmaster/fork_process.c postgresql-9.1.4/src/backend/postmaster/fork_process.c
--- postgresql-9.1.4.orig/src/backend/postmaster/fork_process.c 2012-05-31 19:07:09.000000000 -0400
+++ postgresql-9.1.4/src/backend/postmaster/fork_process.c 2012-07-14 17:55:42.911859485 -0400
@@ -68,12 +68,40 @@
* process sizes *including shared memory*. (This is unbelievably
* stupid, but the kernel hackers seem uninterested in improving it.)
* Therefore it's often a good idea to protect the postmaster by
- * setting its oom_adj value negative (which has to be done in a
- * root-owned startup script). If you just do that much, all child
+ * setting its oom_score_adj value negative (which has to be done in a
+ * root-owned startup script). If you just do that much, all child
* processes will also be protected against OOM kill, which might not
- * be desirable. You can then choose to build with LINUX_OOM_ADJ
- * #defined to 0, or some other value that you want child processes to
- * adopt here.
+ * be desirable. You can then choose to build with
+ * LINUX_OOM_SCORE_ADJ #defined to 0, or to some other value that you
+ * want child processes to adopt here.
+ */
+#ifdef LINUX_OOM_SCORE_ADJ
+ {
+ /*
+ * Use open() not stdio, to ensure we control the open flags. Some
+ * Linux security environments reject anything but O_WRONLY.
+ */
+ int fd = open("/proc/self/oom_score_adj", O_WRONLY, 0);
+
+ /* We ignore all errors */
+ if (fd >= 0)
+ {
+ char buf[16];
+ int rc;
+
+ snprintf(buf, sizeof(buf), "%d\n", LINUX_OOM_SCORE_ADJ);
+ rc = write(fd, buf, strlen(buf));
+ (void) rc;
+ close(fd);
+ }
+ }
+#endif /* LINUX_OOM_SCORE_ADJ */
+
+ /*
+ * Older Linux kernels have oom_adj not oom_score_adj. This works
+ * similarly except with a different scale of adjustment values.
+ * If it's necessary to build Postgres to work with either API,
+ * you can define both LINUX_OOM_SCORE_ADJ and LINUX_OOM_ADJ.
*/
#ifdef LINUX_OOM_ADJ
{

62
postgresql-python3.patch Normal file
View File

@ -0,0 +1,62 @@
This won't be needed in 9.2.1 and later.
commit 770556d6c69c4edf219d4ace2e4fb29a1f2c35df
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat Sep 8 17:39:02 2012 -0400
Adjust PL/Python regression tests some more for Python 3.3.
Commit 2cfb1c6f77734db81b6e74bcae630f93b94f69be fixed some issues caused
by Python 3.3 choosing to iterate through dict entries in a different order
than before. But here's another one: the test cases adjusted here made two
bad entries in a dict and expected the one complained of would always be
the same.
Possibly this should be back-patched further than 9.2, but there seems
little point unless the earlier fix is too.
diff --git a/src/pl/plpython/expected/plpython_trigger.out b/src/pl/plpython/expected/plpython_trigger.out
index 4c46b2b..25060b0 100644
--- a/src/pl/plpython/expected/plpython_trigger.out
+++ b/src/pl/plpython/expected/plpython_trigger.out
@@ -476,7 +476,7 @@ DROP TRIGGER stupid_trigger6 ON trigger_test;
-- TD keys not corresponding to row columns
CREATE FUNCTION stupid7() RETURNS trigger
AS $$
- TD["new"] = {'a': 'foo', 'b': 'bar'}
+ TD["new"] = {'v': 'foo', 'a': 'bar'}
return "MODIFY";
$$ LANGUAGE plpythonu;
CREATE TRIGGER stupid_trigger7
@@ -490,7 +490,7 @@ DROP TRIGGER stupid_trigger7 ON trigger_test;
-- Unicode variant
CREATE FUNCTION stupid7u() RETURNS trigger
AS $$
- TD["new"] = {u'a': 'foo', u'b': 'bar'}
+ TD["new"] = {u'v': 'foo', u'a': 'bar'}
return "MODIFY"
$$ LANGUAGE plpythonu;
CREATE TRIGGER stupid_trigger7
diff --git a/src/pl/plpython/sql/plpython_trigger.sql b/src/pl/plpython/sql/plpython_trigger.sql
index 2a4859f..9727f44 100644
--- a/src/pl/plpython/sql/plpython_trigger.sql
+++ b/src/pl/plpython/sql/plpython_trigger.sql
@@ -253,7 +253,7 @@ DROP TRIGGER stupid_trigger6 ON trigger_test;
CREATE FUNCTION stupid7() RETURNS trigger
AS $$
- TD["new"] = {'a': 'foo', 'b': 'bar'}
+ TD["new"] = {'v': 'foo', 'a': 'bar'}
return "MODIFY";
$$ LANGUAGE plpythonu;
@@ -270,7 +270,7 @@ DROP TRIGGER stupid_trigger7 ON trigger_test;
CREATE FUNCTION stupid7u() RETURNS trigger
AS $$
- TD["new"] = {u'a': 'foo', u'b': 'bar'}
+ TD["new"] = {u'v': 'foo', u'a': 'bar'}
return "MODIFY"
$$ LANGUAGE plpythonu;

View File

@ -16,29 +16,38 @@ This patch must be applied after postgresql-multi-sockets.patch, at
least until 9.3 when that will be part of the upstream package. least until 9.3 when that will be part of the upstream package.
diff -Naur postgresql-9.1.4.sockets/contrib/pg_upgrade/server.c postgresql-9.1.4/contrib/pg_upgrade/server.c diff -Naur postgresql-9.2.0.sockets/contrib/pg_upgrade/test.sh postgresql-9.2.0/contrib/pg_upgrade/test.sh
--- postgresql-9.1.4.sockets/contrib/pg_upgrade/server.c 2012-05-31 19:07:09.000000000 -0400 --- postgresql-9.2.0.sockets/contrib/pg_upgrade/test.sh 2012-09-06 17:26:17.000000000 -0400
+++ postgresql-9.1.4/contrib/pg_upgrade/server.c 2012-08-12 22:43:10.388873678 -0400 +++ postgresql-9.2.0/contrib/pg_upgrade/test.sh 2012-09-06 18:13:18.178092176 -0400
@@ -179,11 +179,14 @@ @@ -62,10 +62,14 @@
*/ rm -rf "$logdir"
snprintf(cmd, sizeof(cmd), mkdir "$logdir"
SYSTEMQUOTE "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" "
- "-o \"-p %d %s\" start >> \"%s\" 2>&1" SYSTEMQUOTE,
+ "-o \"-p %d %s %s\" start >> \"%s\" 2>&1" SYSTEMQUOTE,
cluster->bindir, output_filename, cluster->pgdata, cluster->port,
(cluster->controldata.cat_ver >=
BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ? "-b" :
"-c autovacuum=off -c autovacuum_freeze_max_age=2000000000",
+ /* assume 9.1 builds will have newer socket directory */
+ (GET_MAJOR_VERSION(cluster->major_version) < 901) ?
+ "-c unix_socket_directory=/var/run/postgresql" : "",
output_filename);
/* +# we want the Unix sockets in $temp_root
diff -Naur postgresql-9.1.4.sockets/src/backend/utils/misc/guc.c postgresql-9.1.4/src/backend/utils/misc/guc.c +PGHOST=$temp_root
--- postgresql-9.1.4.sockets/src/backend/utils/misc/guc.c 2012-08-12 20:35:22.559682963 -0400 +export PGHOST
+++ postgresql-9.1.4/src/backend/utils/misc/guc.c 2012-08-12 20:35:55.071983609 -0400 +
@@ -2874,7 +2874,7 @@ set -x
$oldbindir/initdb
-$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -w
+$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -o "-c unix_socket_directories='$PGHOST'" -w
if "$MAKE" -C "$oldsrc" installcheck; then
pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
if [ "$newsrc" != "$oldsrc" ]; then
@@ -108,7 +112,7 @@
pg_upgrade -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir"
-pg_ctl start -l "$logdir/postmaster2.log" -w
+pg_ctl start -l "$logdir/postmaster2.log" -o "-c unix_socket_directories='$PGHOST'" -w
if [ $testhost = Msys ] ; then
cmd /c analyze_new_cluster.bat
diff -Naur postgresql-9.2.0.sockets/src/backend/utils/misc/guc.c postgresql-9.2.0/src/backend/utils/misc/guc.c
--- postgresql-9.2.0.sockets/src/backend/utils/misc/guc.c 2012-09-06 18:12:36.458693394 -0400
+++ postgresql-9.2.0/src/backend/utils/misc/guc.c 2012-09-06 18:13:18.181092327 -0400
@@ -2901,7 +2901,7 @@
}, },
&Unix_socket_directories, &Unix_socket_directories,
#ifdef HAVE_UNIX_SOCKETS #ifdef HAVE_UNIX_SOCKETS
@ -47,10 +56,10 @@ diff -Naur postgresql-9.1.4.sockets/src/backend/utils/misc/guc.c postgresql-9.1.
#else #else
"", "",
#endif #endif
diff -Naur postgresql-9.1.4.sockets/src/bin/initdb/initdb.c postgresql-9.1.4/src/bin/initdb/initdb.c diff -Naur postgresql-9.2.0.sockets/src/bin/initdb/initdb.c postgresql-9.2.0/src/bin/initdb/initdb.c
--- postgresql-9.1.4.sockets/src/bin/initdb/initdb.c 2012-08-12 20:35:22.561682693 -0400 --- postgresql-9.2.0.sockets/src/bin/initdb/initdb.c 2012-09-06 18:12:36.460693488 -0400
+++ postgresql-9.1.4/src/bin/initdb/initdb.c 2012-08-12 20:35:55.073983799 -0400 +++ postgresql-9.2.0/src/bin/initdb/initdb.c 2012-09-06 18:13:18.183092471 -0400
@@ -970,7 +970,7 @@ @@ -1003,7 +1003,7 @@
#ifdef HAVE_UNIX_SOCKETS #ifdef HAVE_UNIX_SOCKETS
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'", snprintf(repltok, sizeof(repltok), "#unix_socket_directories = '%s'",
@ -59,10 +68,10 @@ diff -Naur postgresql-9.1.4.sockets/src/bin/initdb/initdb.c postgresql-9.1.4/src
#else #else
snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''"); snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''");
#endif #endif
diff -Naur postgresql-9.1.4.sockets/src/include/pg_config_manual.h postgresql-9.1.4/src/include/pg_config_manual.h diff -Naur postgresql-9.2.0.sockets/src/include/pg_config_manual.h postgresql-9.2.0/src/include/pg_config_manual.h
--- postgresql-9.1.4.sockets/src/include/pg_config_manual.h 2012-05-31 19:07:09.000000000 -0400 --- postgresql-9.2.0.sockets/src/include/pg_config_manual.h 2012-09-06 17:26:17.000000000 -0400
+++ postgresql-9.1.4/src/include/pg_config_manual.h 2012-08-12 20:35:55.073983799 -0400 +++ postgresql-9.2.0/src/include/pg_config_manual.h 2012-09-06 18:13:18.183092471 -0400
@@ -141,7 +141,7 @@ @@ -144,7 +144,7 @@
* here's where to twiddle it. You can also override this at runtime * here's where to twiddle it. You can also override this at runtime
* with the postmaster's -k switch. * with the postmaster's -k switch.
*/ */
@ -71,10 +80,10 @@ diff -Naur postgresql-9.1.4.sockets/src/include/pg_config_manual.h postgresql-9.
/* /*
* The random() function is expected to yield values between 0 and * The random() function is expected to yield values between 0 and
diff -Naur postgresql-9.1.4.sockets/src/test/regress/pg_regress.c postgresql-9.1.4/src/test/regress/pg_regress.c diff -Naur postgresql-9.2.0.sockets/src/test/regress/pg_regress.c postgresql-9.2.0/src/test/regress/pg_regress.c
--- postgresql-9.1.4.sockets/src/test/regress/pg_regress.c 2012-05-31 19:07:09.000000000 -0400 --- postgresql-9.2.0.sockets/src/test/regress/pg_regress.c 2012-09-06 17:26:17.000000000 -0400
+++ postgresql-9.1.4/src/test/regress/pg_regress.c 2012-08-12 20:38:43.933609334 -0400 +++ postgresql-9.2.0/src/test/regress/pg_regress.c 2012-09-06 18:13:18.184092537 -0400
@@ -781,7 +781,7 @@ @@ -772,7 +772,7 @@
if (hostname != NULL) if (hostname != NULL)
doputenv("PGHOST", hostname); doputenv("PGHOST", hostname);
else else
@ -83,7 +92,7 @@ diff -Naur postgresql-9.1.4.sockets/src/test/regress/pg_regress.c postgresql-9.1
unsetenv("PGHOSTADDR"); unsetenv("PGHOSTADDR");
if (port != -1) if (port != -1)
{ {
@@ -2240,7 +2240,7 @@ @@ -2233,7 +2233,7 @@
*/ */
header(_("starting postmaster")); header(_("starting postmaster"));
snprintf(buf, sizeof(buf), snprintf(buf, sizeof(buf),

View File

@ -35,6 +35,7 @@
%{!?test:%global test 1} %{!?test:%global test 1}
%{!?upgrade:%global upgrade 1} %{!?upgrade:%global upgrade 1}
%{!?plpython:%global plpython 1} %{!?plpython:%global plpython 1}
%{!?plpython3:%global plpython3 1}
%{!?pltcl:%global pltcl 1} %{!?pltcl:%global pltcl 1}
%{!?plperl:%global plperl 1} %{!?plperl:%global plperl 1}
%{!?ssl:%global ssl 1} %{!?ssl:%global ssl 1}
@ -51,9 +52,9 @@
Summary: PostgreSQL client programs Summary: PostgreSQL client programs
Name: postgresql Name: postgresql
%global majorversion 9.1 %global majorversion 9.2
Version: 9.1.5 Version: 9.2.0
Release: 2%{?dist} Release: 1%{?dist}
# The PostgreSQL license is very similar to other MIT licenses, but the OSI # The PostgreSQL license is very similar to other MIT licenses, but the OSI
# recognizes it as an independent license, so we do as well. # recognizes it as an independent license, so we do as well.
@ -67,8 +68,8 @@ Url: http://www.postgresql.org/
# This SRPM includes a copy of the previous major release, which is needed for # This SRPM includes a copy of the previous major release, which is needed for
# in-place upgrade of an old database. In most cases it will not be critical # in-place upgrade of an old database. In most cases it will not be critical
# that this be kept up with the latest minor release of the previous series. # that this be kept up with the latest minor release of the previous series.
%global prevversion 9.0.8 %global prevversion 9.1.5
%global prevmajorversion 9.0 %global prevmajorversion 9.1
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
# The PDF file is generated by generate-pdf.sh, which see for comments # The PDF file is generated by generate-pdf.sh, which see for comments
@ -93,10 +94,10 @@ Source15: postgresql-bashprofile
Patch1: rpm-pgsql.patch Patch1: rpm-pgsql.patch
Patch2: postgresql-logging.patch Patch2: postgresql-logging.patch
Patch3: postgresql-perl-rpath.patch Patch3: postgresql-perl-rpath.patch
Patch4: postgresql-oom_score_adj.patch Patch4: postgresql-config-comment.patch
Patch5: postgresql-multi-sockets.patch Patch5: postgresql-multi-sockets.patch
Patch6: postgresql-var-run-socket.patch Patch6: postgresql-var-run-socket.patch
Patch7: postgresql-config-comment.patch Patch7: postgresql-python3.patch
BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk
BuildRequires: perl(ExtUtils::Embed), perl-devel BuildRequires: perl(ExtUtils::Embed), perl-devel
@ -107,6 +108,10 @@ BuildRequires: systemd-units
BuildRequires: python-devel BuildRequires: python-devel
%endif %endif
%if %plpython3
BuildRequires: python3-devel
%endif
%if %pltcl %if %pltcl
BuildRequires: tcl-devel BuildRequires: tcl-devel
%endif %endif
@ -265,14 +270,26 @@ Install this if you want to write database functions in Perl.
%if %plpython %if %plpython
%package plpython %package plpython
Summary: The Python procedural language for PostgreSQL Summary: The Python2 procedural language for PostgreSQL
Group: Applications/Databases Group: Applications/Databases
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: %{name}-server%{?_isa} = %{version}-%{release}
%description plpython %description plpython
The postgresql-plpython package contains the PL/Python procedural language, The postgresql-plpython package contains the PL/Python procedural language,
which is an extension to the PostgreSQL database server. which is an extension to the PostgreSQL database server.
Install this if you want to write database functions in Python. Install this if you want to write database functions in Python 2.
%endif
%if %plpython3
%package plpython3
Summary: The Python3 procedural language for PostgreSQL
Group: Applications/Databases
Requires: %{name}-server%{?_isa} = %{version}-%{release}
%description plpython3
The postgresql-plpython3 package contains the PL/Python3 procedural language,
which is an extension to the PostgreSQL database server.
Install this if you want to write database functions in Python 3.
%endif %endif
%if %pltcl %if %pltcl
@ -282,7 +299,7 @@ Group: Applications/Databases
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: %{name}-server%{?_isa} = %{version}-%{release}
%description pltcl %description pltcl
The postgresql-plptcl package contains the PL/Tcl procedural language, The postgresql-pltcl package contains the PL/Tcl procedural language,
which is an extension to the PostgreSQL database server. which is an extension to the PostgreSQL database server.
Install this if you want to write database functions in Tcl. Install this if you want to write database functions in Tcl.
%endif %endif
@ -346,6 +363,85 @@ CFLAGS="$CFLAGS -DLINUX_OOM_SCORE_ADJ=0"
# CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` # CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" `
# %%endif # %%endif
# plpython requires separate configure/build runs to build against python 2
# versus python 3. Our strategy is to do the python 3 run first, then make
# distclean and do it again for the "normal" build. Note that the installed
# Makefile.global will reflect the python 2 build, which seems appropriate
# since that's still considered the default plpython version.
%if %plpython3
export PYTHON=/usr/bin/python3
# These configure options must match main build
%configure --disable-rpath \
%if %beta
--enable-debug \
--enable-cassert \
%endif
%if %plperl
--with-perl \
%endif
%if %pltcl
--with-tcl \
--with-tclconfig=%{_libdir} \
%endif
%if %plpython3
--with-python \
%endif
%if %ldap
--with-ldap \
%endif
%if %ssl
--with-openssl \
%endif
%if %pam
--with-pam \
%endif
%if %kerberos
--with-krb5 \
--with-gssapi \
%endif
%if %uuid
--with-ossp-uuid \
%endif
%if %xml
--with-libxml \
--with-libxslt \
%endif
%if %nls
--enable-nls \
%endif
%if %sdt
--enable-dtrace \
%endif
%if %selinux
--with-selinux \
%endif
--with-system-tzdata=/usr/share/zoneinfo \
--datadir=/usr/share/pgsql
# Fortunately we don't need to build much except plpython itself
cd src/backend
make submake-errcodes
cd ../..
cd src/pl/plpython
make %{?_smp_mflags} all
cd ..
# save built form in a directory that "make distclean" won't touch
cp -a plpython plpython3
cd ../..
# must also save this version of Makefile.global for later
cp src/Makefile.global src/Makefile.global.python3
make distclean
%endif
unset PYTHON
# Normal (not python3) build begins here
%configure --disable-rpath \ %configure --disable-rpath \
%if %beta %if %beta
--enable-debug \ --enable-debug \
@ -409,6 +505,24 @@ rm -f src/tutorial/GNUmakefile
pushd src/pl pushd src/pl
make MAX_CONNECTIONS=5 check make MAX_CONNECTIONS=5 check
popd popd
%if %plpython3
# must install Makefile.global that selects python3
mv src/Makefile.global src/Makefile.global.save
cp src/Makefile.global.python3 src/Makefile.global
touch -r src/Makefile.global.save src/Makefile.global
# because "make check" does "make install" on the whole tree,
# we must temporarily install plpython3 as src/pl/plpython,
# since that is the subdirectory src/pl/Makefile knows about
mv src/pl/plpython src/pl/plpython2
mv src/pl/plpython3 src/pl/plpython
pushd src/pl/plpython
make MAX_CONNECTIONS=5 check
popd
# and clean up our mess
mv src/pl/plpython src/pl/plpython3
mv src/pl/plpython2 src/pl/plpython
mv -f src/Makefile.global.save src/Makefile.global
%endif
pushd contrib pushd contrib
make MAX_CONNECTIONS=5 check make MAX_CONNECTIONS=5 check
popd popd
@ -442,6 +556,16 @@ rm -f src/tutorial/GNUmakefile
make DESTDIR=$RPM_BUILD_ROOT install-world make DESTDIR=$RPM_BUILD_ROOT install-world
%if %plpython3
mv src/Makefile.global src/Makefile.global.save
cp src/Makefile.global.python3 src/Makefile.global
touch -r src/Makefile.global.save src/Makefile.global
pushd src/pl/plpython3
make DESTDIR=$RPM_BUILD_ROOT install
popd
mv -f src/Makefile.global.save src/Makefile.global
%endif
# multilib header hack; note pg_config.h is installed in two places! # multilib header hack; note pg_config.h is installed in two places!
# we only apply this to known Red Hat multilib arches, per bug #177564 # we only apply this to known Red Hat multilib arches, per bug #177564
case `uname -i` in case `uname -i` in
@ -522,6 +646,7 @@ install -m 644 %{SOURCE15} $RPM_BUILD_ROOT/var/lib/pgsql/.bash_profile
rm bin/dropuser rm bin/dropuser
rm bin/ecpg rm bin/ecpg
rm bin/initdb rm bin/initdb
rm bin/pg_basebackup
rm bin/pg_config rm bin/pg_config
rm bin/pg_controldata rm bin/pg_controldata
rm bin/pg_dump rm bin/pg_dump
@ -568,7 +693,6 @@ install -m 644 %{SOURCE15} $RPM_BUILD_ROOT/var/lib/pgsql/.bash_profile
%endif %endif
# Fix some more documentation # Fix some more documentation
# gzip doc/internals.ps
cp %{SOURCE8} README.rpm-dist cp %{SOURCE8} README.rpm-dist
mv $RPM_BUILD_ROOT%{_docdir}/pgsql/html doc mv $RPM_BUILD_ROOT%{_docdir}/pgsql/html doc
rm -rf $RPM_BUILD_ROOT%{_docdir}/pgsql rm -rf $RPM_BUILD_ROOT%{_docdir}/pgsql
@ -578,6 +702,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
%if !%upgrade %if !%upgrade
rm -f $RPM_BUILD_ROOT%{_bindir}/pg_upgrade rm -f $RPM_BUILD_ROOT%{_bindir}/pg_upgrade
rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/pg_upgrade_support.so rm -f $RPM_BUILD_ROOT%{_libdir}/pgsql/pg_upgrade_support.so
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/pg_upgrade.*
%endif %endif
# initialize file lists # initialize file lists
@ -588,6 +713,7 @@ cp /dev/null devel.lst
cp /dev/null plperl.lst cp /dev/null plperl.lst
cp /dev/null pltcl.lst cp /dev/null pltcl.lst
cp /dev/null plpython.lst cp /dev/null plpython.lst
cp /dev/null plpython3.lst
%if %nls %if %nls
%find_lang ecpg-%{majorversion} %find_lang ecpg-%{majorversion}
@ -622,6 +748,11 @@ cat plpgsql-%{majorversion}.lang >>server.lst
%find_lang plpython-%{majorversion} %find_lang plpython-%{majorversion}
cat plpython-%{majorversion}.lang >>plpython.lst cat plpython-%{majorversion}.lang >>plpython.lst
%endif %endif
%if %plpython3
# plpython3 shares message files with plpython
%find_lang plpython-%{majorversion}
cat plpython-%{majorversion}.lang >>plpython3.lst
%endif
%if %pltcl %if %pltcl
%find_lang pltcl-%{majorversion} %find_lang pltcl-%{majorversion}
cat pltcl-%{majorversion}.lang >>pltcl.lst cat pltcl-%{majorversion}.lang >>pltcl.lst
@ -746,6 +877,7 @@ fi
%{_datadir}/pgsql/extension/refint* %{_datadir}/pgsql/extension/refint*
%{_datadir}/pgsql/extension/seg* %{_datadir}/pgsql/extension/seg*
%{_datadir}/pgsql/extension/tablefunc* %{_datadir}/pgsql/extension/tablefunc*
%{_datadir}/pgsql/extension/tcn*
%{_datadir}/pgsql/extension/test_parser* %{_datadir}/pgsql/extension/test_parser*
%{_datadir}/pgsql/extension/timetravel* %{_datadir}/pgsql/extension/timetravel*
%{_datadir}/pgsql/extension/tsearch2* %{_datadir}/pgsql/extension/tsearch2*
@ -785,6 +917,7 @@ fi
%{_libdir}/pgsql/refint.so %{_libdir}/pgsql/refint.so
%{_libdir}/pgsql/seg.so %{_libdir}/pgsql/seg.so
%{_libdir}/pgsql/tablefunc.so %{_libdir}/pgsql/tablefunc.so
%{_libdir}/pgsql/tcn.so
%{_libdir}/pgsql/test_parser.so %{_libdir}/pgsql/test_parser.so
%{_libdir}/pgsql/timetravel.so %{_libdir}/pgsql/timetravel.so
%{_libdir}/pgsql/tsearch2.so %{_libdir}/pgsql/tsearch2.so
@ -809,8 +942,16 @@ fi
%{_bindir}/pg_archivecleanup %{_bindir}/pg_archivecleanup
%{_bindir}/pg_standby %{_bindir}/pg_standby
%{_bindir}/pg_test_fsync %{_bindir}/pg_test_fsync
%{_bindir}/pg_test_timing
%{_bindir}/pgbench %{_bindir}/pgbench
%{_bindir}/vacuumlo %{_bindir}/vacuumlo
%{_mandir}/man1/oid2name.*
%{_mandir}/man1/pg_archivecleanup.*
%{_mandir}/man1/pg_standby.*
%{_mandir}/man1/pg_test_fsync.*
%{_mandir}/man1/pg_test_timing.*
%{_mandir}/man1/pgbench.*
%{_mandir}/man1/vacuumlo.*
%{_mandir}/man3/dblink* %{_mandir}/man3/dblink*
%doc contrib/spi/*.example %doc contrib/spi/*.example
@ -832,6 +973,7 @@ fi
%{_bindir}/pg_basebackup %{_bindir}/pg_basebackup
%{_bindir}/pg_controldata %{_bindir}/pg_controldata
%{_bindir}/pg_ctl %{_bindir}/pg_ctl
%{_bindir}/pg_receivexlog
%{_bindir}/pg_resetxlog %{_bindir}/pg_resetxlog
%{_bindir}/postgres %{_bindir}/postgres
%{_bindir}/postmaster %{_bindir}/postmaster
@ -841,6 +983,7 @@ fi
%{_mandir}/man1/pg_basebackup.* %{_mandir}/man1/pg_basebackup.*
%{_mandir}/man1/pg_controldata.* %{_mandir}/man1/pg_controldata.*
%{_mandir}/man1/pg_ctl.* %{_mandir}/man1/pg_ctl.*
%{_mandir}/man1/pg_receivexlog.*
%{_mandir}/man1/pg_resetxlog.* %{_mandir}/man1/pg_resetxlog.*
%{_mandir}/man1/postgres.* %{_mandir}/man1/postgres.*
%{_mandir}/man1/postmaster.* %{_mandir}/man1/postmaster.*
@ -887,6 +1030,7 @@ fi
%{_bindir}/pg_upgrade %{_bindir}/pg_upgrade
%{_libdir}/pgsql/pg_upgrade_support.so %{_libdir}/pgsql/pg_upgrade_support.so
%{_libdir}/pgsql/postgresql-%{prevmajorversion} %{_libdir}/pgsql/postgresql-%{prevmajorversion}
%{_mandir}/man1/pg_upgrade.*
%endif %endif
%if %plperl %if %plperl
@ -907,10 +1051,17 @@ fi
%if %plpython %if %plpython
%files plpython -f plpython.lst %files plpython -f plpython.lst
%{_datadir}/pgsql/extension/plpython* %{_datadir}/pgsql/extension/plpythonu*
%{_datadir}/pgsql/extension/plpython2*
%{_libdir}/pgsql/plpython2.so %{_libdir}/pgsql/plpython2.so
%endif %endif
%if %plpython3
%files plpython3 -f plpython3.lst
%{_datadir}/pgsql/extension/plpython3*
%{_libdir}/pgsql/plpython3.so
%endif
%if %test %if %test
%files test %files test
%defattr(-,postgres,postgres) %defattr(-,postgres,postgres)
@ -919,6 +1070,11 @@ fi
%endif %endif
%changelog %changelog
* Mon Sep 10 2012 Tom Lane <tgl@redhat.com> 9.2.0-1
- Update to PostgreSQL 9.2.0 (major version bump);
in-place upgrade support now works from 9.1.x as the previous version
- Add postgresql-plpython3 subpackage with PL/Python built against Python 3
* Tue Aug 28 2012 Tom Lane <tgl@redhat.com> 9.1.5-2 * Tue Aug 28 2012 Tom Lane <tgl@redhat.com> 9.1.5-2
- Remove unnecessary ldconfig calls in pre/post triggers - Remove unnecessary ldconfig calls in pre/post triggers
Resolves: #849344 Resolves: #849344

View File

@ -1,3 +1,3 @@
8c4c32a4abe8cf61b02c8366181ede50 postgresql-9.2.0.tar.bz2
38951718e05922310a0397e2dcbf9330 postgresql-9.2.0-US.pdf
c784decb60615aa94c6a31601bc6ffd2 postgresql-9.1.5.tar.bz2 c784decb60615aa94c6a31601bc6ffd2 postgresql-9.1.5.tar.bz2
c497cce8d81a733200584e653c9177f5 postgresql-9.1.5-US.pdf
0e830b0f6538e04b788c3208060256ef postgresql-9.0.8.tar.bz2