|
1 | 1 |
|
2 | 2 | Frequently Asked Questions (FAQ) for PostgreSQL
|
3 | 3 |
|
4 |
| - Last updated: Sat Apr 23 11:22:46 EDT 2005 |
| 4 | + Last updated: Sat Apr 23 14:56:41 EDT 2005 |
5 | 5 |
|
6 | 6 | Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
|
7 | 7 |
|
|
148 | 148 | PostgreSQL. The platforms that had received explicit testing at the
|
149 | 149 | time of release are listed in the installation instructions.
|
150 | 150 |
|
151 |
| - Starting with version 8.0, PostgreSQL now runs natively on Microsoft |
152 |
| - Windows NT-based operating systems like Win2000, WinXP, and Win2003. A |
153 |
| - prepackaged installer is available at |
154 |
| - http://pgfoundry.org/projects/pginstaller. MSDOS-based versions of |
155 |
| - Windows (Win95, Win98, WinMe) can run PostgreSQL using Cygwin. |
| 151 | + PostgreSQL also runs natively on Microsoft Windows NT-based operating |
| 152 | + systems like Win2000, WinXP, and Win2003. A prepackaged installer is |
| 153 | + available at http://pgfoundry.org/projects/pginstaller. MSDOS-based |
| 154 | + versions of Windows (Win95, Win98, WinMe) can run PostgreSQL using |
| 155 | + Cygwin. |
156 | 156 |
|
157 | 157 | There is also a Novell Netware 6 port at http://forge.novell.com, and
|
158 | 158 | an OS/2 (eComStation) version at
|
|
161 | 161 |
|
162 | 162 | 1.4) Where can I get PostgreSQL?
|
163 | 163 |
|
164 |
| - The primary anonymous ftp site for PostgreSQL is |
165 |
| - ftp://ftp.PostgreSQL.org/pub/. For mirror sites, see our main web |
166 |
| - site. |
| 164 | + Via web browser, use http://www.postgresql.org/ftp/, and via ftp, use |
| 165 | + ftp://ftp.PostgreSQL.org/pub/. |
167 | 166 |
|
168 | 167 | 1.5) Where can I get support?
|
169 | 168 |
|
|
174 | 173 |
|
175 | 174 | The major IRC channel is #postgresql on Freenode (irc.freenode.net).
|
176 | 175 | To connect you can use the Unix program irc -c '#postgresql' "$USER"
|
177 |
| - irc.freenode.net or use any of the other popular IRC clients. A |
178 |
| - Spanish one also exists on the same network, (#postgresql-es), and a |
179 |
| - French one, (#postgresqlfr). There is also a PostgreSQL channel on |
180 |
| - EFNet. |
| 176 | + irc.freenode.net or use any other IRC clients. A Spanish one also |
| 177 | + exists on the same network, (#postgresql-es), and a French one, |
| 178 | + (#postgresqlfr). There is also a PostgreSQL channel on EFNet. |
181 | 179 |
|
182 | 180 | A list of commercial support companies is available at
|
183 | 181 | http://techdocs.postgresql.org/companies.php.
|
|
194 | 192 |
|
195 | 193 | The latest release of PostgreSQL is version 8.0.2.
|
196 | 194 |
|
197 |
| - We plan to have major releases every ten to twelve months. |
| 195 | + We plan to have a major release every year, with minor releases every |
| 196 | + few months. |
198 | 197 |
|
199 | 198 | 1.8) What documentation is available?
|
200 | 199 |
|
|
223 | 222 |
|
224 | 223 | 1.10) How can I learn SQL?
|
225 | 224 |
|
226 |
| - The PostgreSQL book at |
227 |
| - http://www.postgresql.org/docs/books/awbook.html teaches SQL. There is |
228 |
| - another PostgreSQL book at http://www.commandprompt.com/ppbook. There |
229 |
| - is a nice tutorial at |
230 |
| - http://www.intermedia.net/support/sql/sqltut.shtm, at |
231 |
| - http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM, |
232 |
| - and at http://sqlcourse.com. |
233 |
| - |
234 |
| - Another one is "Teach Yourself SQL in 21 Days, Second Edition" at |
| 225 | + First, consider the PostgreSQL-specific books mentioned above. Another |
| 226 | + one is "Teach Yourself SQL in 21 Days, Second Edition" at |
235 | 227 | http://members.tripod.com/er4ebus/sql/index.htm
|
236 |
| - |
237 | 228 | Many of our users like The Practical SQL Handbook, Bowman, Judith S.,
|
238 | 229 | et al., Addison-Wesley. Others like The Complete Reference SQL, Groff
|
239 |
| - et al., McGraw-Hill. |
| 230 | + et al., McGraw-Hill. There is also a nice tutorial at |
| 231 | + http://www.intermedia.net/support/sql/sqltut.shtm, at |
| 232 | + http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM, |
| 233 | + and at http://sqlcourse.com. |
240 | 234 |
|
241 | 235 | 1.11) How do I join the development team?
|
242 | 236 |
|
243 |
| - First, download the latest source and read the PostgreSQL Developers |
244 |
| - FAQ and documentation on our web site, or in the distribution. Second, |
245 |
| - subscribe to the pgsql-hackers and pgsql-patches mailing lists. Third, |
246 |
| - submit high quality patches to pgsql-patches. |
247 |
| - |
248 |
| - There are about a dozen people who have commit privileges to the |
249 |
| - PostgreSQL CVS archive. They each have submitted so many high-quality |
250 |
| - patches that it was impossible for the existing committers to keep up, |
251 |
| - and we had confidence that patches they committed were of high |
252 |
| - quality. |
| 237 | + See the Developer's FAQ. |
253 | 238 |
|
254 | 239 | 1.12) How does PostgreSQL compare to other DBMSs?
|
255 | 240 |
|
|
267 | 252 | Performance
|
268 | 253 | PostgreSQL's performance is comparable to other commercial and
|
269 | 254 | open source databases. It is faster for some things, slower for
|
270 |
| - others. In comparison to MySQL or leaner database systems, we |
271 |
| - are faster for multiple users, complex queries, and a |
272 |
| - read/write query load. MySQL is faster for simple SELECT |
273 |
| - queries done by a few users. Of course, MySQL does not have |
274 |
| - most of the features mentioned in the Features section above. |
275 |
| - We are built for reliability and features, and we continue to |
276 |
| - improve performance in every release. |
| 255 | + others. Our performance is usually +/-10% compared to other |
| 256 | + databases. |
277 | 257 |
|
278 | 258 | Reliability
|
279 | 259 | We realize that a DBMS must be reliable, or it is worthless. We
|
|
326 | 306 |
|
327 | 307 | 2.3) Does PostgreSQL have a graphical user interface?
|
328 | 308 |
|
329 |
| - Yes, there are several graphical interfaces to PostgreSQL available. |
330 |
| - These include pgAdmin III (http://www.pgadmin.org, PgAccess |
331 |
| - http://www.pgaccess.org), RHDB Admin (http://sources.redhat.com/rhdb/ |
332 |
| - ), TORA ( http://www.globecom.net/tora/, partly commercial), and |
333 |
| - Rekall ( http://www.rekallrevealed.org/). There is also PhpPgAdmin ( |
334 |
| - http://phppgadmin.sourceforge.net/ ), a web-based interface to |
335 |
| - PostgreSQL. |
336 |
| - |
337 |
| - See http://techdocs.postgresql.org/guides/GUITools for a more detailed |
| 309 | + Yes, see http://techdocs.postgresql.org/guides/GUITools for a detailed |
338 | 310 | list.
|
339 | 311 | _________________________________________________________________
|
340 | 312 |
|
|
390 | 362 | printing of query and process statistics which can be very useful for
|
391 | 363 | debugging and performance measurements.
|
392 | 364 |
|
393 |
| - The following detailed debug instructions are to be used to provide |
394 |
| - more detailed information for server developers debugging a problem. |
395 |
| - |
396 |
| - It is also possible to debug the server if it isn't operating |
397 |
| - properly. First, by running configure with the --enable-cassert |
398 |
| - option, many assert()s monitor the progress of the backend and halt |
399 |
| - the program when something unexpected occurs. |
400 |
| - |
401 |
| - The postmaster has a -d option that allows even more detailed |
402 |
| - information to be reported. The -d option takes a number that |
403 |
| - specifies the debug level. Be warned that high debug level values |
404 |
| - generate large log files. |
405 |
| - |
406 |
| - If postmaster is not running, you can actually run the postgres |
407 |
| - backend from the command line, and type your SQL statement directly. |
408 |
| - This is recommended only for debugging purposes. Note that a newline |
409 |
| - terminates the query, not a semicolon. If you have compiled with |
410 |
| - debugging symbols, you can use a debugger to see what is happening. |
411 |
| - Because the backend was not started from postmaster, it is not running |
412 |
| - in an identical environment and locking/backend interaction problems |
413 |
| - may not be duplicated. |
414 |
| - |
415 |
| - If postmaster is running, start psql in one window, then find the PID |
416 |
| - of the postgres process used by psql using SELECT pg_backend_pid(). |
417 |
| - Use a debugger to attach to the postgres PID. You can set breakpoints |
418 |
| - in the debugger and issue queries from psql. If you are debugging |
419 |
| - postgres startup, you can set PGOPTIONS="-W n", then start psql. This |
420 |
| - will cause startup to delay for n seconds so you can attach to the |
421 |
| - process with the debugger, set any breakpoints, and continue through |
422 |
| - the startup sequence. |
423 |
| - |
424 |
| - You can also compile with profiling to see what functions are taking |
425 |
| - execution time. The backend profile files will be deposited in the |
426 |
| - pgsql/data/base/dbname directory. The client profile file will be put |
427 |
| - in the client's current directory. Linux requires a compile with |
428 |
| - -DLINUX_PROFILE for proper profiling. |
429 |
| - |
430 | 365 | 3.5) Why do I get "Sorry, too many clients" when trying to connect?
|
431 | 366 |
|
432 | 367 | You have reached the default limit is 100 database sessions. You need
|
|
438 | 373 | PostgreSQL releases?
|
439 | 374 |
|
440 | 375 | The PostgreSQL team makes only small changes between minor releases,
|
441 |
| - so upgrading from 7.4 to 7.4.1 does not require a dump and restore. |
| 376 | + so upgrading from 7.4.0 to 7.4.1 does not require a dump and restore. |
442 | 377 | However, major releases (e.g. from 7.3 to 7.4) often change the
|
443 | 378 | internal format of system tables and data files. These changes are
|
444 | 379 | often complex, so we don't maintain backward compatibility for data
|
|
567 | 502 |
|
568 | 503 | 4.6) Why are my queries slow? Why don't they use my indexes?
|
569 | 504 |
|
570 |
| - Indexes are not automatically used by every query. Indexes are only |
571 |
| - used if the table is larger than a minimum size, and the query selects |
572 |
| - only a small percentage of the rows in the table. This is because the |
573 |
| - random disk access caused by an index scan can be slower than a |
574 |
| - straight read through the table, or sequential scan. |
| 505 | + Indexes are not used by every query. Indexes are used only if the |
| 506 | + table is larger than a minimum size, and the query selects only a |
| 507 | + small percentage of the rows in the table. This is because the random |
| 508 | + disk access caused by an index scan can be slower than a straight read |
| 509 | + through the table, or sequential scan. |
575 | 510 |
|
576 | 511 | To determine if an index should be used, PostgreSQL must have
|
577 | 512 | statistics about the table. These statistics are collected using
|
|
0 commit comments