packages: postgresql/postgresql.spec, postgresql/postgresql-pg_perm_setloca...
radek
radek at pld-linux.org
Wed Jul 8 20:32:31 CEST 2009
Author: radek Date: Wed Jul 8 18:32:31 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- release 3: postgresql-pg_perm_setlocale.patch (index corruption with plperl)
---- Files affected:
packages/postgresql:
postgresql.spec (1.429 -> 1.430) , postgresql-pg_perm_setlocale.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/postgresql/postgresql.spec
diff -u packages/postgresql/postgresql.spec:1.429 packages/postgresql/postgresql.spec:1.430
--- packages/postgresql/postgresql.spec:1.429 Mon Jul 6 14:13:05 2009
+++ packages/postgresql/postgresql.spec Wed Jul 8 20:32:26 2009
@@ -26,7 +26,7 @@
Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件
Name: postgresql
Version: %{mver}.0
-Release: 2
+Release: 3
License: BSD
Group: Applications/Databases
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/%{name}-%{version}.tar.bz2
@@ -41,6 +41,7 @@
Patch3: %{name}-ac_version.patch
Patch4: %{name}-disable_horology_test.patch
Patch5: %{name}-pg_ctl-fix.patch
+Patch6: %{name}-pg_perm_setlocale.patch
URL: http://www.postgresql.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -766,6 +767,7 @@
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
tar xzf doc/man*.tar.gz
@@ -1217,6 +1219,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.430 2009/07/08 18:32:26 radek
+- release 3: postgresql-pg_perm_setlocale.patch (index corruption with plperl)
+
Revision 1.429 2009/07/06 12:13:05 radek
- release 2: package more contribs, BR: ossp-uuid-devel
- rm -rf the html docs
================================================================
Index: packages/postgresql/postgresql-pg_perm_setlocale.patch
diff -u /dev/null packages/postgresql/postgresql-pg_perm_setlocale.patch:1.1
--- /dev/null Wed Jul 8 20:32:31 2009
+++ packages/postgresql/postgresql-pg_perm_setlocale.patch Wed Jul 8 20:32:26 2009
@@ -0,0 +1,45 @@
+From bfb56a2ad7b489c04bfc90628e0cb3766763ecca Mon Sep 17 00:00:00 2001
+From: Heikki Linnakangas <heikki at enterprisedb.com>
+Date: Wed, 8 Jul 2009 17:53:32 +0000
+Subject: [PATCH] Need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup.
+ Otherwise, the LC_CTYPE/COLLATE setting gets reverted when using plperl, which
+ leads to incorrect query results and index corruption.
+
+This was accidentally broken in the per-database locale patch in 8.4. Pointed
+out by Andrew Gierth.
+---
+ src/backend/utils/init/postinit.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
+index 6b98bed..327ba7c 100644
+--- a/src/backend/utils/init/postinit.c
++++ b/src/backend/utils/init/postinit.c
+@@ -44,6 +44,7 @@
+ #include "utils/acl.h"
+ #include "utils/flatfiles.h"
+ #include "utils/guc.h"
++#include "utils/pg_locale.h"
+ #include "utils/plancache.h"
+ #include "utils/portal.h"
+ #include "utils/relcache.h"
+@@ -247,14 +248,14 @@ CheckMyDatabase(const char *name, bool am_superuser)
+ collate = NameStr(dbform->datcollate);
+ ctype = NameStr(dbform->datctype);
+
+- if (setlocale(LC_COLLATE, collate) == NULL)
++ if (pg_perm_setlocale(LC_COLLATE, collate) == NULL)
+ ereport(FATAL,
+ (errmsg("database locale is incompatible with operating system"),
+ errdetail("The database was initialized with LC_COLLATE \"%s\", "
+ " which is not recognized by setlocale().", collate),
+ errhint("Recreate the database with another locale or install the missing locale.")));
+
+- if (setlocale(LC_CTYPE, ctype) == NULL)
++ if (pg_perm_setlocale(LC_CTYPE, ctype) == NULL)
+ ereport(FATAL,
+ (errmsg("database locale is incompatible with operating system"),
+ errdetail("The database was initialized with LC_CTYPE \"%s\", "
+--
+1.6.3.1
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/postgresql/postgresql.spec?r1=1.429&r2=1.430&f=u
More information about the pld-cvs-commit
mailing list