1 |
patrick 10/02/26 15:48:29 |
2 |
|
3 |
Added: postgresql-9.0-common.patch |
4 |
postgresql-9.0-makefile.patch |
5 |
postgresql-9.0-server.patch postgresql.init-9.0 |
6 |
postgresql.conf-9.0 |
7 |
Log: |
8 |
Bump to 9.0_alpha4 |
9 |
(Portage version: 2.2_rc63/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.1 dev-db/postgresql-server/files/postgresql-9.0-common.patch |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql-9.0-common.patch?rev=1.1&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql-9.0-common.patch?rev=1.1&content-type=text/plain |
16 |
|
17 |
Index: postgresql-9.0-common.patch |
18 |
=================================================================== |
19 |
=== configure.in |
20 |
================================================================== |
21 |
--- configure.in 2009-06-27 02:14:47.000000000 +0200 |
22 |
+++ configure.in 2009-07-09 15:05:02.000000000 +0200 |
23 |
@@ -19,10 +19,6 @@ |
24 |
|
25 |
AC_INIT([PostgreSQL], [9.0alpha4], [pgsql-bugs@××××××××××.org]) |
26 |
|
27 |
-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required. |
28 |
-Untested combinations of 'autoconf' and PostgreSQL versions are not |
29 |
-recommended. You can remove the check from 'configure.in' but it is then |
30 |
-your responsibility whether the result works or not.])]) |
31 |
AC_COPYRIGHT([Copyright (c) 1996-2010, PostgreSQL Global Development Group]) |
32 |
AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) |
33 |
AC_CONFIG_AUX_DIR(config) |
34 |
=== src/include/storage/s_lock.h |
35 |
================================================================== |
36 |
--- src/include/storage/s_lock.h 2009-01-01 18:24:01.000000000 +0100 |
37 |
+++ src/include/storage/s_lock.h 2009-07-09 15:03:08.000000000 +0200 |
38 |
@@ -298,6 +298,29 @@ |
39 |
|
40 |
#endif /* __s390__ || __s390x__ */ |
41 |
|
42 |
+#if defined(__sh__) |
43 |
+#define HAS_TEST_AND_SET |
44 |
+ |
45 |
+typedef unsigned char slock_t; |
46 |
+ |
47 |
+#define TAS(lock) tas(lock) |
48 |
+ |
49 |
+static __inline__ int |
50 |
+tas(volatile slock_t *lock) |
51 |
+{ |
52 |
+ register int _res = 1; |
53 |
+ |
54 |
+ __asm__ __volatile__( |
55 |
+ "tas.b @%1\n\t" |
56 |
+ "movt %0\n\t" |
57 |
+ "xor #1,%0" |
58 |
+: "=z"(_res) |
59 |
+: "r"(lock) |
60 |
+: "t","memory"); |
61 |
+ return _res; |
62 |
+} |
63 |
+ |
64 |
+#endif /* __sh__ */ |
65 |
|
66 |
#if defined(__sparc__) /* Sparc */ |
67 |
#define HAS_TEST_AND_SET |
68 |
=== src/makefiles/Makefile.darwin |
69 |
================================================================== |
70 |
--- src/makefiles/Makefile.darwin 2008-11-14 11:22:47.000000000 +0100 |
71 |
+++ src/makefiles/Makefile.darwin 2009-07-09 15:07:11.000000000 +0200 |
72 |
@@ -5,7 +5,15 @@ |
73 |
CFLAGS_SL = |
74 |
|
75 |
ifdef PGXS |
76 |
+ifdef PGXS_IN_SERVER |
77 |
+ifndef PGXS_WITH_SERVER |
78 |
+BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres |
79 |
+else |
80 |
+BE_DLLLIBS= -bundle_loader ${PGXS_WITH_SERVER} |
81 |
+endif |
82 |
+else |
83 |
BE_DLLLIBS= -bundle_loader $(bindir)/postgres |
84 |
+endif |
85 |
else |
86 |
BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres |
87 |
endif |
88 |
|
89 |
|
90 |
|
91 |
1.1 dev-db/postgresql-server/files/postgresql-9.0-makefile.patch |
92 |
|
93 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql-9.0-makefile.patch?rev=1.1&view=markup |
94 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql-9.0-makefile.patch?rev=1.1&content-type=text/plain |
95 |
|
96 |
Index: postgresql-9.0-makefile.patch |
97 |
=================================================================== |
98 |
--- GNUmakefile.in.old 2010-01-22 17:07:56.574071514 +0100 |
99 |
+++ GNUmakefile.in 2010-01-22 17:08:13.644073319 +0100 |
100 |
@@ -9,7 +9,6 @@ |
101 |
include $(top_builddir)/src/Makefile.global |
102 |
|
103 |
all: |
104 |
- $(MAKE) -C doc all |
105 |
$(MAKE) -C src all |
106 |
$(MAKE) -C config all |
107 |
@echo "All of PostgreSQL successfully made. Ready to install." |
108 |
@@ -18,7 +17,6 @@ |
109 |
$(MAKE) -C doc $@ |
110 |
|
111 |
install: |
112 |
- $(MAKE) -C doc $@ |
113 |
$(MAKE) -C src $@ |
114 |
$(MAKE) -C config $@ |
115 |
@echo "PostgreSQL installation complete." |
116 |
|
117 |
|
118 |
|
119 |
1.1 dev-db/postgresql-server/files/postgresql-9.0-server.patch |
120 |
|
121 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql-9.0-server.patch?rev=1.1&view=markup |
122 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql-9.0-server.patch?rev=1.1&content-type=text/plain |
123 |
|
124 |
Index: postgresql-9.0-server.patch |
125 |
=================================================================== |
126 |
diff -Naur postgresql-8.5alpha3.orig/contrib/adminpack/Makefile postgresql-8.5alpha3/contrib/adminpack/Makefile |
127 |
--- postgresql-8.5alpha3.orig/contrib/adminpack/Makefile 2007-11-11 00:59:50.000000000 +0100 |
128 |
+++ postgresql-8.5alpha3/contrib/adminpack/Makefile 2009-07-09 18:10:56.000000000 +0200 |
129 |
@@ -1,7 +1,7 @@ |
130 |
# $PostgreSQL: pgsql/contrib/adminpack/Makefile,v 1.6 2007/11/10 23:59:50 momjian Exp $ |
131 |
|
132 |
MODULE_big = adminpack |
133 |
-PG_CPPFLAGS = -I$(libpq_srcdir) |
134 |
+PG_CPPFLAGS = -I$(libpq_srcdir) -I../../src/include/ |
135 |
DATA_built = adminpack.sql |
136 |
DATA = uninstall_adminpack.sql |
137 |
OBJS = adminpack.o |
138 |
diff -Naur postgresql-8.5alpha3.orig/contrib/dblink/Makefile postgresql-8.5alpha3/contrib/dblink/Makefile |
139 |
--- postgresql-8.5alpha3.orig/contrib/dblink/Makefile 2007-11-11 00:59:50.000000000 +0100 |
140 |
+++ postgresql-8.5alpha3/contrib/dblink/Makefile 2009-07-09 22:22:02.000000000 +0200 |
141 |
@@ -1,7 +1,7 @@ |
142 |
# $PostgreSQL: pgsql/contrib/dblink/Makefile,v 1.15 2007/11/10 23:59:50 momjian Exp $ |
143 |
|
144 |
MODULE_big = dblink |
145 |
-PG_CPPFLAGS = -I$(libpq_srcdir) |
146 |
+PG_CPPFLAGS = -I$(libpq_srcdir) -I../../src/include/ |
147 |
OBJS = dblink.o |
148 |
SHLIB_LINK = $(libpq) |
149 |
|
150 |
diff -Naur postgresql-8.5alpha3.orig/contrib/Makefile postgresql-8.5alpha3/contrib/Makefile |
151 |
--- postgresql-8.5alpha3.orig/contrib/Makefile 2009-03-26 00:20:01.000000000 +0100 |
152 |
+++ postgresql-8.5alpha3/contrib/Makefile 2009-07-09 18:13:23.000000000 +0200 |
153 |
@@ -23,23 +23,18 @@ |
154 |
isn \ |
155 |
lo \ |
156 |
ltree \ |
157 |
- oid2name \ |
158 |
pageinspect \ |
159 |
- passwordcheck \ |
160 |
pg_buffercache \ |
161 |
pg_freespacemap \ |
162 |
pg_standby \ |
163 |
pg_stat_statements \ |
164 |
pg_trgm \ |
165 |
- pgbench \ |
166 |
pgcrypto \ |
167 |
pgrowlocks \ |
168 |
pgstattuple \ |
169 |
seg \ |
170 |
spi \ |
171 |
tablefunc \ |
172 |
test_parser \ |
173 |
tsearch2 \ |
174 |
- unaccent \ |
175 |
- vacuumlo |
176 |
|
177 |
ifeq ($(with_openssl),yes) |
178 |
WANTED_DIRS += sslinfo |
179 |
diff -Naur postgresql-8.5alpha3.orig/contrib/uuid-ossp/Makefile postgresql-8.5alpha3/contrib/uuid-ossp/Makefile |
180 |
--- postgresql-8.5alpha3.orig/contrib/uuid-ossp/Makefile 2007-11-13 01:13:19.000000000 +0100 |
181 |
+++ postgresql-8.5alpha3/contrib/uuid-ossp/Makefile 2009-07-09 19:12:44.000000000 +0200 |
182 |
@@ -1,11 +1,13 @@ |
183 |
# $PostgreSQL: pgsql/contrib/uuid-ossp/Makefile,v 1.4 2007/11/13 00:13:19 tgl Exp $ |
184 |
|
185 |
+PG_CPPFLAGS += "-DHAVE_OSSP_UUID_H" |
186 |
+ |
187 |
MODULE_big = uuid-ossp |
188 |
OBJS = uuid-ossp.o |
189 |
DATA_built = uuid-ossp.sql |
190 |
DATA = uninstall_uuid-ossp.sql |
191 |
|
192 |
-SHLIB_LINK += $(OSSP_UUID_LIBS) |
193 |
+SHLIB_LINK += -lossp-uuid |
194 |
|
195 |
ifdef USE_PGXS |
196 |
PG_CONFIG = pg_config |
197 |
diff -Naur postgresql-8.5alpha3.orig/contrib/xml2/Makefile postgresql-8.5alpha3/contrib/xml2/Makefile |
198 |
--- postgresql-8.5alpha3.orig/contrib/xml2/Makefile 2008-05-08 18:49:37.000000000 +0200 |
199 |
+++ postgresql-8.5alpha3/contrib/xml2/Makefile 2009-07-09 19:14:32.000000000 +0200 |
200 |
@@ -4,7 +4,8 @@ |
201 |
|
202 |
OBJS = $(if $(filter -lxslt, $(LIBS)), xpath.o xslt_proc.o, xpath.o) |
203 |
|
204 |
-SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS)) |
205 |
+PG_CPPFLAGS = $(shell xml2-config --cflags) |
206 |
+SHLIB_LINK += $(shell xml2-config --libs) $(shell xslt-config --libs) |
207 |
|
208 |
DATA_built = pgxml.sql |
209 |
DATA = uninstall_pgxml.sql |
210 |
diff -Naur postgresql-8.5alpha3.orig/GNUmakefile.in postgresql-8.5alpha3/GNUmakefile.in |
211 |
--- postgresql-8.5alpha3.orig/GNUmakefile.in 2009-01-15 02:53:49.000000000 +0100 |
212 |
+++ postgresql-8.5alpha3/GNUmakefile.in 2009-07-09 19:16:19.000000000 +0200 |
213 |
@@ -11,7 +11,6 @@ |
214 |
all: |
215 |
$(MAKE) -C doc all |
216 |
$(MAKE) -C src all |
217 |
- $(MAKE) -C config all |
218 |
@echo "All of PostgreSQL successfully made. Ready to install." |
219 |
|
220 |
world: |
221 |
@@ -27,7 +26,6 @@ |
222 |
install: |
223 |
$(MAKE) -C doc $@ |
224 |
$(MAKE) -C src $@ |
225 |
- $(MAKE) -C config $@ |
226 |
@echo "PostgreSQL installation complete." |
227 |
|
228 |
install-world: |
229 |
@@ -40,7 +38,6 @@ |
230 |
installdirs uninstall coverage: |
231 |
$(MAKE) -C doc $@ |
232 |
$(MAKE) -C src $@ |
233 |
- $(MAKE) -C config $@ |
234 |
|
235 |
distprep: |
236 |
$(MAKE) -C doc $@ |
237 |
diff -Naur postgresql-8.5alpha3.orig/src/bin/initdb/Makefile |
238 |
postgresql-8.5alpha3/src/bin/initdb/Makefile |
239 |
--- postgresql-8.5alpha3.orig/src/bin/initdb/Makefile 2009-01-01 18:23:53.000000000 +0100 |
240 |
+++ postgresql-8.5alpha3/src/bin/initdb/Makefile 2009-07-09 19:17:40.000000000 +0200 |
241 |
@@ -14,7 +14,7 @@ |
242 |
top_builddir = ../../.. |
243 |
include $(top_builddir)/src/Makefile.global |
244 |
|
245 |
-override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS) |
246 |
+override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/libpq $(CPPFLAGS) |
247 |
|
248 |
OBJS= initdb.o encnames.o pqsignal.o $(WIN32RES) |
249 |
|
250 |
diff -Naur postgresql-8.5alpha3.orig/src/bin/Makefile postgresql-8.5alpha3/src/bin/Makefile |
251 |
--- postgresql-8.5alpha3.orig/src/bin/Makefile 2009-01-01 18:23:53.000000000 +0100 |
252 |
+++ postgresql-8.5alpha3/src/bin/Makefile 2009-07-09 19:18:21.000000000 +0200 |
253 |
@@ -13,8 +13,8 @@ |
254 |
top_builddir = ../.. |
255 |
include $(top_builddir)/src/Makefile.global |
256 |
|
257 |
-SUBDIRS = initdb pg_ctl pg_dump \ |
258 |
- psql scripts pg_config pg_controldata pg_resetxlog |
259 |
+SUBDIRS = initdb pg_ctl \ |
260 |
+ pg_controldata pg_resetxlog |
261 |
ifeq ($(PORTNAME), win32) |
262 |
SUBDIRS+=pgevent |
263 |
endif |
264 |
diff -Naur postgresql-8.5alpha3.orig/src/include/pg_config_manual.h postgresql-8.5alpha3/src/include/pg_config_manual.h |
265 |
--- postgresql-8.5alpha3.orig/src/include/pg_config_manual.h 2009-06-11 16:49:08.000000000 +0200 |
266 |
+++ postgresql-8.5alpha3/src/include/pg_config_manual.h 2009-07-09 19:19:40.000000000 +0200 |
267 |
@@ -146,7 +146,7 @@ |
268 |
* here's where to twiddle it. You can also override this at runtime |
269 |
* with the postmaster's -k switch. |
270 |
*/ |
271 |
-#define DEFAULT_PGSOCKET_DIR "/tmp" |
272 |
+#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" |
273 |
|
274 |
/* |
275 |
* The random() function is expected to yield values between 0 and |
276 |
diff -Naur postgresql-8.5alpha3.orig/src/Makefile postgresql-8.5alpha3/src/Makefile |
277 |
--- postgresql-8.5alpha3.orig/src/Makefile 2009-02-24 11:06:32.000000000 +0100 |
278 |
+++ postgresql-8.5alpha3/src/Makefile 2009-07-09 19:20:44.000000000 +0200 |
279 |
@@ -19,15 +19,11 @@ |
280 |
$(MAKE) -C backend $@ |
281 |
$(MAKE) -C backend/utils/mb/conversion_procs $@ |
282 |
$(MAKE) -C backend/snowball $@ |
283 |
- $(MAKE) -C include $@ |
284 |
- $(MAKE) -C interfaces $@ |
285 |
- $(MAKE) -C backend/replication/libpqwalreceiver $@ |
286 |
$(MAKE) -C bin $@ |
287 |
$(MAKE) -C pl $@ |
288 |
- $(MAKE) -C makefiles $@ |
289 |
$(MAKE) -C test/regress $@ |
290 |
|
291 |
-install: install-local |
292 |
+install: |
293 |
|
294 |
install-local: installdirs-local |
295 |
$(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global' |
296 |
diff -Naur postgresql-8.5alpha3.orig/src/Makefile.global.in postgresql-8.5alpha3/src/Makefile.global.in |
297 |
--- postgresql-8.5alpha3.orig/src/Makefile.global.in 2009-06-23 05:46:00.000000000 +0200 |
298 |
+++ postgresql-8.5alpha3/src/Makefile.global.in 2009-07-09 19:39:46.000000000 +0200 |
299 |
@@ -443,6 +441,8 @@ |
300 |
LDFLAGS += $(PROFILE) |
301 |
endif |
302 |
|
303 |
+CFLAGS += -I${top_srcdir}/src/include |
304 |
+ |
305 |
|
306 |
########################################################################## |
307 |
# |
308 |
diff -Naur postgresql-8.5alpha3.orig/src/port/Makefile postgresql-8.5alpha3/src/port/Makefile |
309 |
--- postgresql-8.5alpha3.orig/src/port/Makefile 2008-11-25 19:19:31.000000000 +0100 |
310 |
+++ postgresql-8.5alpha3/src/port/Makefile 2009-07-09 19:24:34.000000000 +0200 |
311 |
@@ -39,11 +39,10 @@ |
312 |
# foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND |
313 |
OBJS_SRV = $(OBJS:%.o=%_srv.o) |
314 |
|
315 |
-all: libpgport.a libpgport_srv.a |
316 |
+all: libpgport_srv.a |
317 |
|
318 |
# libpgport is needed by some contrib |
319 |
-install: all installdirs |
320 |
- $(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(libdir)/libpgport.a' |
321 |
+install: |
322 |
|
323 |
installdirs: |
324 |
$(mkinstalldirs) '$(DESTDIR)$(libdir)' |
325 |
diff -Naur postgresql-8.5alpha3.orig/src/test/regress/GNUmakefile postgresql-8.5alpha3/src/test/regress/GNUmakefile |
326 |
--- postgresql-8.5alpha3.orig/src/test/regress/GNUmakefile 2009-01-01 18:24:04.000000000 +0100 |
327 |
+++ postgresql-8.5alpha3/src/test/regress/GNUmakefile 2009-07-09 19:28:25.000000000 +0200 |
328 |
@@ -141,7 +141,7 @@ |
329 |
pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) |
330 |
|
331 |
check: all |
332 |
- $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) |
333 |
+ $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) --psqldir=/usr/lib/postgresql-${SLOT}/bin/ |
334 |
|
335 |
installcheck: all |
336 |
$(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule |
337 |
|
338 |
|
339 |
|
340 |
1.1 dev-db/postgresql-server/files/postgresql.init-9.0 |
341 |
|
342 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-9.0?rev=1.1&view=markup |
343 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-9.0?rev=1.1&content-type=text/plain |
344 |
|
345 |
Index: postgresql.init-9.0 |
346 |
=================================================================== |
347 |
#!/sbin/runscript |
348 |
# Copyright 1999-2009 Gentoo Foundation |
349 |
# Distributed under the terms of the GNU General Public License v2 |
350 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-9.0,v 1.1 2010/02/26 15:48:28 patrick Exp $ |
351 |
|
352 |
opts="${opts} reload" |
353 |
|
354 |
depend() { |
355 |
use net |
356 |
if [ -L /etc/eselect/postgresql/service ] ; then |
357 |
local p_service="$(for f in /etc/eselect/postgresql/service/* ; do . $f ; done ; echo $postgres_service )" |
358 |
test "${p_service}" = "${SVCNAME}" && provide postgresql |
359 |
fi |
360 |
} |
361 |
|
362 |
checkconfig() { |
363 |
if [ ! -d "$PGDATA" ] ; then |
364 |
eerror "Directory not found: $PGDATA" |
365 |
eerror "Please make sure that PGDATA points to the right path." |
366 |
eerror "You can run 'emerge postgresql-server --config' to setup a new database cluster." |
367 |
return 1 |
368 |
fi |
369 |
} |
370 |
|
371 |
start() { |
372 |
checkconfig || return 1 |
373 |
|
374 |
ebegin "Starting PostgreSQL" |
375 |
|
376 |
if [ -f "$PGDATA/postmaster.pid" ] ; then |
377 |
rm -f "$PGDATA/postmaster.pid" |
378 |
fi |
379 |
|
380 |
local retval |
381 |
|
382 |
su -l ${PGUSER} \ |
383 |
-c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-9.0/bin/pg_ctl start ${WAIT_FOR_START} -o '--silent-mode=true ${PGOPTS}'" |
384 |
retval=$? |
385 |
[ $retval -ne 0 ] && eend $retval && return $retval |
386 |
|
387 |
# The following is to catch the case of an already running server |
388 |
# in which pg_ctl doesn't know to which server it connected to and false reports the server as 'up' |
389 |
sleep 2 |
390 |
if [ ! -f "$PGDATA/postmaster.pid" ] ; then |
391 |
eerror "The pid-file doesn't exist but pg_ctl reported a running server." |
392 |
eerror "Please check whether there is another server running on the same port or read the log-file." |
393 |
eend 1 |
394 |
return 1 |
395 |
fi |
396 |
|
397 |
local pid=$(grep "^[0-9]\+" "$PGDATA/postmaster.pid") |
398 |
ps -p "${pid}" &> /dev/null |
399 |
eend $? |
400 |
} |
401 |
|
402 |
stop() { |
403 |
ebegin "Stopping PostgreSQL (this can take up to $(( ${WAIT_FOR_DISCONNECT} + ${WAIT_FOR_CLEANUP} )) seconds)" |
404 |
|
405 |
local retval |
406 |
|
407 |
su -l ${PGUSER} \ |
408 |
-c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-9.0/bin/pg_ctl stop -t ${WAIT_FOR_DISCONNECT} -m smart" |
409 |
|
410 |
retval=$? |
411 |
[ $retval -eq 0 ] && eend $retval && return $retval |
412 |
|
413 |
ewarn "Some clients did not disconnect within ${WAIT_FOR_DISCONNECT} seconds." |
414 |
ewarn "Going to shutdown the server anyway." |
415 |
|
416 |
su -l ${PGUSER} \ |
417 |
-c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-9.0/bin/pg_ctl stop -m fast" |
418 |
|
419 |
retval=$? |
420 |
[ $retval -eq 0 ] && eend $retval && return $retval |
421 |
|
422 |
if [ ${WAIT_FOR_QUIT} -eq 0 ] ; then |
423 |
eerror "Server did not shut down and sending the SIGQUIT has been disabled." |
424 |
eend $retval |
425 |
return $retval |
426 |
fi |
427 |
|
428 |
ewarn "Shutting down the server gracefully failed." |
429 |
ewarn "Forcing it to shutdown which leads to a recover-run on next startup." |
430 |
|
431 |
su -l ${PGUSER} \ |
432 |
-c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-9.0/bin/pg_ctl stop -m immediate" |
433 |
|
434 |
retval=$? |
435 |
[ $retval -eq 0 ] && eend $retval && return $retval |
436 |
|
437 |
eerror "Forced shutdown failed!!! Something is wrong with your system, please take care of it manually." |
438 |
eend $? |
439 |
} |
440 |
|
441 |
reload() { |
442 |
ebegin "Reloading PostgreSQL configuration" |
443 |
su -l ${PGUSER} \ |
444 |
-c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-9.0/bin/pg_ctl reload" |
445 |
eend $? |
446 |
} |
447 |
|
448 |
|
449 |
|
450 |
1.1 dev-db/postgresql-server/files/postgresql.conf-9.0 |
451 |
|
452 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql.conf-9.0?rev=1.1&view=markup |
453 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/files/postgresql.conf-9.0?rev=1.1&content-type=text/plain |
454 |
|
455 |
Index: postgresql.conf-9.0 |
456 |
=================================================================== |
457 |
# PostgreSQL's Database Directory |
458 |
PGDATA="/var/lib/postgresql/9.0/data" |
459 |
|
460 |
# PostgreSQL User |
461 |
PGUSER="postgres" |
462 |
|
463 |
# PostgreSQL Group |
464 |
PGGROUP="postgres" |
465 |
|
466 |
# Extra options to run postmaster with, e.g.: |
467 |
# -N is the maximal number of client connections |
468 |
# -B is the number of shared buffers and has to be at least 2x the value for -N |
469 |
# Please read the man-page to postmaster for more options. Many of these options |
470 |
# can be set directly in the configuration-file. |
471 |
#PGOPTS="-N 512 -B 1024" |
472 |
|
473 |
|
474 |
# SERVER SHUTDOWN: |
475 |
# The server will receive 3 signals in the worst case: |
476 |
# 1. SIGTERM |
477 |
# This signals the server to ignore new connections and to |
478 |
# wait for all clients to end their transactions before shutting down. |
479 |
# Use WAIT_FOR_DISCONNECT to control how much time the clients |
480 |
# should have until the next signal is being sent. |
481 |
# 2. SIGINT |
482 |
# Tell the server to forcefully disconnect all clients. |
483 |
# Terminating a client results in a rollback of the open transactions for this client. |
484 |
# Use WAIT_FOR_CLEANUP to determine how much time the server has |
485 |
# for cleanup. |
486 |
# 3. SIGQUIT |
487 |
# This will terminate the server immediately and results in a recovery run for the next start. |
488 |
|
489 |
# Wait for clients to disconnect |
490 |
WAIT_FOR_DISCONNECT=30 |
491 |
|
492 |
# Time the server has to clean up |
493 |
WAIT_FOR_CLEANUP=60 |
494 |
|
495 |
# Time the server has to quit (with a recover-run on next startup) |
496 |
# Set to 0 to deactivate it |
497 |
WAIT_FOR_QUIT=60 |
498 |
|
499 |
# Comment this out if you don't want to wait for the server to |
500 |
# startup before continuing. For example, if this server is a |
501 |
# PITR log shipping based replication standby |
502 |
WAIT_FOR_START="-w" |
503 |
|
504 |
# If you have to export environment variables for the database process, |
505 |
# this can be done here. |
506 |
# |
507 |
# Example: |
508 |
# export R_HOME="/usr/lib/R" |