1 |
commit: 8c4e0857d0808c07f16bd2cc4452b254ef66ab46 |
2 |
Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 15 19:46:26 2011 +0000 |
4 |
Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 15 19:46:26 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=8c4e0857 |
7 |
|
8 |
Cleaned up some. Removed section about Sandbox as the ebuild now depends on the |
9 |
proper version of Sandbox. |
10 |
|
11 |
--- |
12 |
postgresql.xml | 123 +++++++++++++++++++++++--------------------------------- |
13 |
1 files changed, 51 insertions(+), 72 deletions(-) |
14 |
|
15 |
diff --git a/postgresql.xml b/postgresql.xml |
16 |
index c7bac14..174a384 100644 |
17 |
--- a/postgresql.xml |
18 |
+++ b/postgresql.xml |
19 |
@@ -158,9 +158,8 @@ ebuilds to the new ones. |
20 |
<tr> |
21 |
<ti>doc</ti> |
22 |
<ti> |
23 |
- Include the <uri |
24 |
- link="http://www.postgresql.org/docs/">online documentation</uri> to be |
25 |
- stored on your system |
26 |
+ Include the <uri link="http://www.postgresql.org/docs/">online |
27 |
+ documentation</uri> to be stored on your system |
28 |
</ti> |
29 |
</tr> |
30 |
<tr> |
31 |
@@ -195,15 +194,19 @@ ebuilds to the new ones. |
32 |
<tr> |
33 |
<ti>pg-intdatetime (Deprecated)</ti> |
34 |
<ti> |
35 |
- Use the newer method for formatting time stamps. Unless you had a previous |
36 |
- installation that utilized the deprecated method, leave this enabled. |
37 |
+ Use the newer, high resolution, 64-bit integer method for formatting |
38 |
+ timestamps instead of the older, floating point method. Unless you had a |
39 |
+ previous installation that utilized the deprecated method, leave this |
40 |
+ enabled. (See note.) |
41 |
</ti> |
42 |
</tr> |
43 |
<tr> |
44 |
<ti>pg_legacytimestamp</ti> |
45 |
<ti> |
46 |
- Use the older method for formatting time stamps. Unless you had a previous |
47 |
- installation that utilized the deprecated method, leave this disabled. |
48 |
+ Use the older, floating-point method for formatting timestamps instead of |
49 |
+ the higher resolution 64-bit integer method. Unless you had a previous |
50 |
+ installation that utilized this deprecated method, leave this USE flag |
51 |
+ disabled. (See note.) |
52 |
</ti> |
53 |
</tr> |
54 |
<tr> |
55 |
@@ -247,7 +250,7 @@ ebuilds to the new ones. |
56 |
<ti>uuid</ti> |
57 |
<ti> |
58 |
Include support to generate a 128 bit random unique identifier. This is |
59 |
- useful for merging databases together so the chances of collisions become |
60 |
+ useful for merging databases together so the chances of collisions become |
61 |
extremely low. |
62 |
</ti> |
63 |
</tr> |
64 |
@@ -261,6 +264,12 @@ ebuilds to the new ones. |
65 |
</tr> |
66 |
</table> |
67 |
|
68 |
+<note> |
69 |
+Flipping the 'pg-intdatetime' or the 'pg_legacytimestamp' will required you to |
70 |
+do a dump and restore if any of your databases utilize timestamps. The two |
71 |
+methods are incompatible with each other. |
72 |
+</note> |
73 |
+ |
74 |
</body> |
75 |
</section> |
76 |
<section> |
77 |
@@ -460,8 +469,8 @@ covered here as some things may change. |
78 |
Of secondary interest is the logging destination. By default, everything is |
79 |
logged to <path>postmaster.log</path> in the <e>DATA_DIR</e> directory. There is |
80 |
an entire subsection of <path>postgresql.conf</path> that covers a slew of |
81 |
-options for how, what and where to log. The section is marked: ERROR REPORTING |
82 |
-AND LOGGING. |
83 |
+options for how, what and where to log. The subsection is marked: ERROR |
84 |
+REPORTING AND LOGGING. |
85 |
</p> |
86 |
|
87 |
<p> |
88 |
@@ -506,9 +515,9 @@ database through the localhost. Even as the <e>postgres</e> database superuser. |
89 |
<p> |
90 |
To make a connection through the Unix socket, however, the users — |
91 |
including the users for other services such as <e>apache</e> — must be in |
92 |
-the <e>postgres</e> system group. Use <c>gpasswd -a <e>user</e> postgres</c> |
93 |
-to add <e>user</e> to the <e>postgres</e> group. Users not in the |
94 |
-<e>postgres</e> group will be rejected with "Permission denied". |
95 |
+the <e>postgres</e> system group. Use <c>gpasswd -a <e>user</e> postgres</c> to |
96 |
+add <e>user</e> to the <e>postgres</e> group. Users not in the <e>postgres</e> |
97 |
+group will be rejected with "Permission denied". |
98 |
</p> |
99 |
|
100 |
<warn> |
101 |
@@ -519,11 +528,11 @@ order to operate properly. The method can be changed freely. |
102 |
<p> |
103 |
The <e>trust</e> method is what allows any user to log on as any user without a |
104 |
password. It specifies just what it implies: Trust all connections for the given |
105 |
-type to the given database from the given database user (but not the system user) |
106 |
-from the given location without a password. This is what allows any user on the |
107 |
-system to log on as any user through the localhost connection from the get |
108 |
-go. This is not as dangerous as it seems, but does pose a serious security risk |
109 |
-in most circumstances. |
110 |
+type to the given database from the given database user (but not the system |
111 |
+user) from the given location without a password. This is what allows any user |
112 |
+on the system to log on as any user through the localhost connection from the |
113 |
+get go. This is not as dangerous as it seems, but does pose a serious security |
114 |
+risk in most circumstances. |
115 |
</p> |
116 |
|
117 |
<p> |
118 |
@@ -532,8 +541,8 @@ The two methods you will most likely use are: <e>password</e> and |
119 |
start the connection and the password is sent "in-the-clear". This method is |
120 |
fine when such information will never leave the machine, such as connecting via |
121 |
the Unix socket or localhost. The md5 method is like password, but protects the |
122 |
-password by using an md5 hash. This is what you want to use whenever the password |
123 |
-is going to traverse a network. |
124 |
+password by using an md5 hash. This is what you want to use whenever the |
125 |
+password is going to traverse a network. |
126 |
</p> |
127 |
|
128 |
<p> |
129 |
@@ -618,8 +627,8 @@ postgresql-9.0 | * Reloading PostgreSQL configuration ... [ ok ] |
130 |
<p> |
131 |
At this point you are ready to continue on with the official <uri |
132 |
src="http://www.postgresql.org/docs/current/static/tutorial.html">PostgreSQL |
133 |
-Tutorial</uri>. The tutorial will guide you through creating roles, |
134 |
-databases, schemata and all that fun and useful stuff. |
135 |
+Tutorial</uri>. The tutorial will guide you through creating roles, databases, |
136 |
+schemata and all that fun and useful stuff. |
137 |
</p> |
138 |
|
139 |
</body> |
140 |
@@ -627,15 +636,16 @@ databases, schemata and all that fun and useful stuff. |
141 |
</chapter> |
142 |
|
143 |
<chapter id="migrating"> |
144 |
-<title>Migrating from an Older Version of PostgreSQL</title> |
145 |
+<title>Migrating PostgreSQL</title> |
146 |
<section> |
147 |
<title>When You Need to Migrate</title> |
148 |
<body> |
149 |
|
150 |
<p> |
151 |
-You only need to perform a migration when moving from one major version to |
152 |
-another, <e>e.g.</e>, from PostgreSQL 8.4.7 to 9.0.3, but not from 9.0.2 to |
153 |
-9.0.3. |
154 |
+There are only two reasons you would need to perform a migration: When moving |
155 |
+from one major version to another, <e>e.g.</e>, from PostgreSQL 8.4.7 to 9.0.3, |
156 |
+but not from 9.0.2 to 9.0.3; or when switching from the deprecated |
157 |
+floating-point timestamp format to the new 64-bit integer timestamp format. |
158 |
</p> |
159 |
|
160 |
<note> |
161 |
@@ -659,24 +669,27 @@ the migration process rather drastically. |
162 |
<p> |
163 |
However, there are two caveats with using pg_upgrade. Firstly, it does not |
164 |
support configuration files being in a different directory than where the data |
165 |
-is stored. This is resolved by using a symbolic link. Lastly, you can only use |
166 |
-it to migrate from a database from 8.3 or newer. If you have an older database |
167 |
-you will need to follow the "Pre-9.0 Migration" instructions. |
168 |
+is stored. This is resolved by using symbolic links. Lastly, you can only use it |
169 |
+to migrate from a database from 8.3 or newer. If you have an older database you |
170 |
+will need to follow the "Pre-9.0 Migration" instructions. |
171 |
</p> |
172 |
|
173 |
<pre caption="Migrating with pg_upgrade"> |
174 |
-<comment>Stop the servers you're going to migrate from and to.</comment> |
175 |
+<comment>(Stop the servers you're going to migrate from and to.)</comment> |
176 |
# <i>/etc/init.d/postgresql-8.4 stop</i> |
177 |
# <i>/etc/init.d/postgresql-9.0 stop</i> |
178 |
# <i>ln -s /etc/postgresql-8.4/*.conf /var/lib/postgresql/8.4/data/</i> |
179 |
# <i>ln -s /etc/postgresql-9.0/*.conf /var/lib/postgresql/9.0/data/</i> |
180 |
-<comment>Change the method of 'postgres' to trust on local connections</comment> |
181 |
+ |
182 |
+<comment>(Change the method of 'postgres' to trust on local connections)</comment> |
183 |
# <i>nano -w /etc/postgresql-8.4/pg_hba.conf</i> |
184 |
# <i>nano -w /etc/postgresql-9.0/pg_hba.conf</i> |
185 |
-# <i>pg_upgrade -u postgres -d /var/lib/postgresql/8.4/data \ |
186 |
- -D /var/lib/postgresql/9.0 -b /usr/lib/postgresql-8.4/bin \ |
187 |
- -B /usr/lib/postgresql-9.0/bin</i> |
188 |
-<comment>Perform the tasks pg_upgrade tells you to.</comment> |
189 |
+# <i>pg_upgrade -u postgres \ |
190 |
+ -d /var/lib/postgresql/8.4/data -D /var/lib/postgresql/9.0 \ |
191 |
+ -b /usr/lib/postgresql-8.4/bin -B /usr/lib/postgresql-9.0/bin</i> |
192 |
+<comment>(Perform the tasks pg_upgrade tells you to.)</comment> |
193 |
+ |
194 |
+<comment>(Remove the symbolic links we created earlier.)</comment> |
195 |
# <i>rm /var/lib/postgresql/8.4/data/*.conf</i> |
196 |
# <i>rm /var/lib/postgresql/9.0/data/*.conf</i> |
197 |
# <i>/etc/init.d/postgresql-9.0 start</i> |
198 |
@@ -701,10 +714,10 @@ accordingly if you have deviated from the default. |
199 |
</p> |
200 |
|
201 |
<p> |
202 |
-If you have not already done so, follow the <uri |
203 |
+If you have not already done so, follow the <uri |
204 |
link="#installation">installation instructions</uri> before starting the |
205 |
-migration. Such a compile may hamper performance on the database server |
206 |
-but it can keep going. |
207 |
+migration. Such a compile may hamper performance on the database server but it |
208 |
+can keep going. |
209 |
</p> |
210 |
|
211 |
<p> |
212 |
@@ -827,39 +840,5 @@ command: |
213 |
|
214 |
</body> |
215 |
</section> |
216 |
-<section> |
217 |
-<title>Thread Safety Test Program Failed</title> |
218 |
-<body> |
219 |
- |
220 |
-<p> |
221 |
-If you get an error upon emerging dev-db/postgresql-base that reads as follows: |
222 |
-</p> |
223 |
- |
224 |
-<pre caption="Thread Test Program Failed Error Message"> |
225 |
-# <i>emerge dev-db/postgresql-base</i> |
226 |
-. . . |
227 |
-configure: error: thread test program failed |
228 |
-This platform is not thread-safe. Check the file 'config.log' for the |
229 |
-exact reason. |
230 |
- |
231 |
-You can use the configure option --enable-thread-safety-force to force |
232 |
-threads to be enabled. But you must then run the program in |
233 |
-src/test/thread and add locking function calls to your applications to |
234 |
-guarantee thread safety. |
235 |
-</pre> |
236 |
- |
237 |
-<p> |
238 |
-The solution, in most cases, is to update sandbox to a version greater than or |
239 |
-equal to 2.0. |
240 |
-</p> |
241 |
- |
242 |
-<pre caption="Emerge Newer Sandbox"> |
243 |
-# <i>echo '>=sys-apps/sandbox-2.0' >> /etc/portage/package.keywords</i> |
244 |
-# <i>emerge -av '>=sys-apps/sandbox-2.0'</i> |
245 |
-# <i>emerge -av dev-db/postgresql-base</i> |
246 |
-</pre> |
247 |
- |
248 |
-</body> |
249 |
-</section> |
250 |
</chapter> |
251 |
</guide> |