|
39 | 39 |
|
40 | 40 | Administrative Questions |
41 | 41 |
|
42 | | - 3.1) Why does initdb fail? |
43 | | - 3.2) How do I install PostgreSQL somewhere other than |
| 42 | + 3.1) How do I install PostgreSQL somewhere other than |
44 | 43 | /usr/local/pgsql? |
45 | | - 3.3) When I start the postmaster, I get a Bad System Call or core |
| 44 | + 3.2) When I start the postmaster, I get a Bad System Call or core |
46 | 45 | dumped message. Why? |
47 | | - 3.4) When I try to start the postmaster, I get IpcMemoryCreate errors. |
| 46 | + 3.3) When I try to start the postmaster, I get IpcMemoryCreate errors. |
48 | 47 | Why? |
49 | | - 3.5) When I try to start the postmaster, I get IpcSemaphoreCreate |
| 48 | + 3.4) When I try to start the postmaster, I get IpcSemaphoreCreate |
50 | 49 | errors. Why? |
51 | | - 3.6) How do I prevent other hosts from accessing my PostgreSQL |
| 50 | + 3.5) How do I prevent other hosts from accessing my PostgreSQL |
52 | 51 | database? |
53 | | - 3.7) Why can't I connect to my database from another machine? |
54 | | - 3.8) Why can't I access the database as the root user? |
55 | | - 3.9) All my servers crash under concurrent table access. Why? |
56 | | - 3.10) How do I tune the database engine for better performance? |
57 | | - 3.11) What debugging features are available? |
58 | | - 3.12) I get "Sorry, too many clients" when trying to connect. Why? |
59 | | - 3.13) What are the pg_sorttempNNN.NN files in my database directory? |
| 52 | + 3.6) Why can't I connect to my database from another machine? |
| 53 | + 3.7) All my servers crash under concurrent table access. Why? |
| 54 | + 3.8) How do I tune the database engine for better performance? |
| 55 | + 3.9) What debugging features are available? |
| 56 | + 3.10) I get "Sorry, too many clients" when trying to connect. Why? |
| 57 | + 3.11) What are the pg_sorttempNNN.NN files in my database directory? |
60 | 58 |
|
61 | 59 | Operational Questions |
62 | 60 |
|
|
177 | 175 | It is possible to compile the libpq C library, psql, and other |
178 | 176 | interfaces and binaries to run on MS Windows platforms. In this case, |
179 | 177 | the client is running on MS Windows, and communicates via TCP/IP to a |
180 | | - server running on one of our supported Unix platforms. |
| 178 | + server running on one of our supported Unix platforms. A file |
| 179 | + win31.mak is included in the distribution for making a Win32 libpq |
| 180 | + library and psql. |
181 | 181 |
|
182 | | - A file win31.mak is included in the distribution for making a Win32 |
183 | | - libpq library and psql. |
184 | | - |
185 | | - The database server is now working on Windows NT using Cygwin, the |
186 | | - Cygnus Unix/NT porting library. See pgsql/doc/FAQ_NT in the |
187 | | - distribution. It does not work on MS Windows 9X because Cygwin does |
188 | | - not support the features we need on those platforms. |
| 182 | + The database server can run on Windows NT and later using Cygwin, the |
| 183 | + Cygnus Unix/NT porting library. See pgsql/doc/FAQ_MSWIN in the |
| 184 | + distribution. The database server does not run on MS Windows 9X |
| 185 | + because Cygwin does not support the required features on those |
| 186 | + platforms. We have no plans to do a native port to any Microsoft |
| 187 | + platform. |
189 | 188 |
|
190 | 189 | 1.5) Where can I get PostgreSQL? |
191 | 190 |
|
|
238 | 237 |
|
239 | 238 | 1.7) What is the latest release? |
240 | 239 |
|
241 | | - The latest release of PostgreSQL is version 7.0.2. |
| 240 | + The latest release of PostgreSQL is version 7.0.3. |
242 | 241 |
|
243 | 242 | We plan to have major releases every four months. |
244 | 243 |
|
|
425 | 424 |
|
426 | 425 | Administrative Questions |
427 | 426 |
|
428 | | - 3.1) Why does initdb fail? |
429 | | - |
430 | | - Try these: |
431 | | - * check that you don't have any of the previous version's binaries |
432 | | - in your path |
433 | | - * check to see that you have the proper paths set |
434 | | - * check that the postgres user owns the proper files |
435 | | - |
436 | | - If you see an error message about oidvector, you definately have a |
437 | | - version mismatch. |
438 | | - |
439 | | - 3.2) How do I install PostgreSQL somewhere other than /usr/local/pgsql? |
| 427 | + 3.1) How do I install PostgreSQL somewhere other than /usr/local/pgsql? |
440 | 428 |
|
441 | | - The simplest way is to specify the --prefix option when running |
442 | | - configure. If you forgot to do that, you can edit Makefile.global and |
443 | | - change POSTGRESDIR accordingly, or create a Makefile.custom and define |
444 | | - POSTGRESDIR there. |
| 429 | + Specify the --prefix option when running configure. |
445 | 430 |
|
446 | | - 3.3) When I start the postmaster, I get a Bad System Call or core dumped |
| 431 | + 3.2) When I start the postmaster, I get a Bad System Call or core dumped |
447 | 432 | message. Why? |
448 | 433 |
|
449 | 434 | It could be a variety of problems, but first check to see that you |
450 | 435 | have System V extensions installed in your kernel. PostgreSQL requires |
451 | 436 | kernel support for shared memory and semaphores. |
452 | 437 |
|
453 | | - 3.4) When I try to start the postmaster, I get IpcMemoryCreate errors. Why? |
| 438 | + 3.3) When I try to start the postmaster, I get IpcMemoryCreate errors. Why? |
454 | 439 |
|
455 | 440 | You either do not have shared memory configured properly in your |
456 | 441 | kernel or you need to enlarge the shared memory available in the |
|
459 | 444 | For most systems, with default numbers of buffers and processes, you |
460 | 445 | need a minimum of ~1MB. |
461 | 446 |
|
462 | | - 3.5) When I try to start the postmaster, I get IpcSemaphoreCreate errors. |
| 447 | + 3.4) When I try to start the postmaster, I get IpcSemaphoreCreate errors. |
463 | 448 | Why? |
464 | 449 |
|
465 | 450 | If the error message is IpcSemaphoreCreate: semget failed (No space |
|
473 | 458 | If the error message is something else, you might not have semaphore |
474 | 459 | support configured in your kernel at all. |
475 | 460 |
|
476 | | - 3.6) How do I prevent other hosts from accessing my PostgreSQL database? |
| 461 | + 3.5) How do I prevent other hosts from accessing my PostgreSQL database? |
477 | 462 |
|
478 | 463 | By default, PostgreSQL only allows connections from the local machine |
479 | 464 | using Unix domain sockets. Other machines will not be able to connect |
480 | 465 | unless you add the -i flag to the postmaster, and enable host-based |
481 | 466 | authentication by modifying the file $PGDATA/pg_hba.conf accordingly. |
482 | 467 | This will allow TCP/IP connections. |
483 | 468 |
|
484 | | - 3.7) Why can't I connect to my database from another machine? |
| 469 | + 3.6) Why can't I connect to my database from another machine? |
485 | 470 |
|
486 | 471 | The default configuration allows only unix domain socket connections |
487 | 472 | from the local machine. To enable TCP/IP connections, make sure the |
488 | 473 | postmaster has been started with the -i option, and add an appropriate |
489 | 474 | host entry to the file pgsql/data/pg_hba.conf. |
490 | 475 |
|
491 | | - 3.8) Why can't I access the database as the root user? |
492 | | - |
493 | | - You should not create database users with user id 0 (root). They will |
494 | | - be unable to access the database. This is a security precaution |
495 | | - because of the ability of users to dynamically link object modules |
496 | | - into the database engine. |
497 | | - |
498 | | - 3.9) All my servers crash under concurrent table access. Why? |
| 476 | + 3.7) All my servers crash under concurrent table access. Why? |
499 | 477 |
|
500 | 478 | This problem can be caused by a kernel that is not configured to |
501 | 479 | support semaphores. |
502 | 480 |
|
503 | | - 3.10) How do I tune the database engine for better performance? |
| 481 | + 3.8) How do I tune the database engine for better performance? |
504 | 482 |
|
505 | 483 | Certainly, indices can speed up queries. The EXPLAIN command allows |
506 | 484 | you to see how PostgreSQL is interpreting your query, and which |
|
531 | 509 | You can also use the CLUSTER command to group data in tables to match |
532 | 510 | an index. See the CLUSTER manual page for more details. |
533 | 511 |
|
534 | | - 3.11) What debugging features are available? |
| 512 | + 3.9) What debugging features are available? |
535 | 513 |
|
536 | 514 | PostgreSQL has several features that report status information that |
537 | 515 | can be valuable for debugging purposes. |
|
578 | 556 | pgsql/data/base/dbname directory. The client profile file will be put |
579 | 557 | in the client's current directory. |
580 | 558 |
|
581 | | - 3.12) I get 'Sorry, too many clients' when trying to connect. Why? |
| 559 | + 3.10) I get 'Sorry, too many clients' when trying to connect. Why? |
582 | 560 |
|
583 | 561 | You need to increase the postmaster's limit on how many concurrent |
584 | 562 | backend processes it can start. |
|
606 | 584 | was 64, and changing it required a rebuild after altering the |
607 | 585 | MaxBackendId constant in include/storage/sinvaladt.h. |
608 | 586 |
|
609 | | - 3.13) What are the pg_sorttempNNN.NN files in my database directory? |
| 587 | + 3.11) What are the pg_sorttempNNN.NN files in my database directory? |
610 | 588 |
|
611 | 589 | They are temporary files generated by the query executor. For example, |
612 | 590 | if a sort needs to be done to satisfy an ORDER BY, and the sort |
|
645 | 623 | 4.4) How do I get a list of tables or other things I can see in psql? |
646 | 624 |
|
647 | 625 | You can read the source code for psql in file |
648 | | - pgsql/src/bin/psql/psql.c. It contains SQL commands that generate the |
649 | | - output for psql's backslash commands. You can also start psql with the |
650 | | - -E option so it will print out the queries it uses to execute the |
| 626 | + pgsql/src/bin/psql/describe.c. It contains SQL commands that generate |
| 627 | +theoutput for psql's backslash commands. You can also start psql with |
| 628 | +the-E option so it will print out the queries it uses to execute the |
651 | 629 | commands you give. |
652 | 630 |
|
653 | 631 | 4.5) How do you remove a column from a table? |
|
664 | 642 | These are the limits: |
665 | 643 | Maximum size for a database? unlimited (60GB databases exist) |
666 | 644 | Maximum size for a table? unlimited on all operating systems |
667 | | -Maximum size for a row?8k, configurable to 32k |
668 | | -Maximum number of rows in a table? unlimited |
| 645 | +Maximum size for a row?unlimited in 7.1 and later |
| 646 | +Maximum number of rows in a table?unlimited |
669 | 647 | Maximum number of columns in a table? unlimited |
670 | 648 | Maximum number of indexes on a table? unlimited |
671 | 649 |
|
672 | 650 | Of course, these are not actually unlimited, but limited to available |
673 | 651 | disk space. |
674 | 652 |
|
675 | | - To change the maximum row size, edit include/config.h and change |
676 | | - BLCKSZ. To use attributes larger than 8K, you can also use the large |
677 | | - object interface. |
678 | | - |
679 | | - The row length limit will be removed in 7.1. |
680 | | - |
681 | 653 | 4.7) How much database disk space is required to store data from a typical |
682 | 654 | text file? |
683 | 655 |
|
@@ -969,10 +941,10 @@ SELECT * |
969 | 941 |
|
970 | 942 | 4.24) How do I do an outer join? |
971 | 943 |
|
972 | | - PostgreSQLdoes not supportouter joins in the current release. They |
973 | | - can be simulated using UNION and NOT IN. For example, when joining |
974 | | - tab1 and tab2, the following query does an outer join of the two |
975 | | - tables: |
| 944 | + PostgreSQL7.1 and later supportsouter joins. In previous releases, |
| 945 | +outer joinscan be simulated using UNION and NOT IN. For example, when |
| 946 | +joiningtab1 and tab2, the following query does an outer join of the |
| 947 | +twotables: |
976 | 948 | SELECT tab1.col1, tab2.col2 |
977 | 949 | FROM tab1, tab2 |
978 | 950 | WHERE tab1.col1 = tab2.col1 |
@@ -1011,4 +983,6 @@ SELECT * |
1011 | 983 | change? |
1012 | 984 |
|
1013 | 985 | The Makefiles do not have the proper dependencies for include files. |
1014 | | - You have to do a make clean and then another make. |
| 986 | + You have to do a make clean and then another make. If you are using |
| 987 | + GCC you can use the --enable-depend option of configure to have the |
| 988 | + compiler compute the dependencies automatically. |