Update FAQ.
This commit is contained in:
parent
4f34f55d3d
commit
d90eb434e4
114
doc/FAQ
114
doc/FAQ
@ -39,24 +39,22 @@
|
|||||||
|
|
||||||
Administrative Questions
|
Administrative Questions
|
||||||
|
|
||||||
3.1) Why does initdb fail?
|
3.1) How do I install PostgreSQL somewhere other than
|
||||||
3.2) How do I install PostgreSQL somewhere other than
|
|
||||||
/usr/local/pgsql?
|
/usr/local/pgsql?
|
||||||
3.3) When I start the postmaster, I get a Bad System Call or core
|
3.2) When I start the postmaster, I get a Bad System Call or core
|
||||||
dumped message. Why?
|
dumped message. Why?
|
||||||
3.4) When I try to start the postmaster, I get IpcMemoryCreate errors.
|
3.3) When I try to start the postmaster, I get IpcMemoryCreate errors.
|
||||||
Why?
|
Why?
|
||||||
3.5) When I try to start the postmaster, I get IpcSemaphoreCreate
|
3.4) When I try to start the postmaster, I get IpcSemaphoreCreate
|
||||||
errors. Why?
|
errors. Why?
|
||||||
3.6) How do I prevent other hosts from accessing my PostgreSQL
|
3.5) How do I prevent other hosts from accessing my PostgreSQL
|
||||||
database?
|
database?
|
||||||
3.7) Why can't I connect to my database from another machine?
|
3.6) Why can't I connect to my database from another machine?
|
||||||
3.8) Why can't I access the database as the root user?
|
3.7) All my servers crash under concurrent table access. Why?
|
||||||
3.9) All my servers crash under concurrent table access. Why?
|
3.8) How do I tune the database engine for better performance?
|
||||||
3.10) How do I tune the database engine for better performance?
|
3.9) What debugging features are available?
|
||||||
3.11) What debugging features are available?
|
3.10) I get "Sorry, too many clients" when trying to connect. Why?
|
||||||
3.12) I get "Sorry, too many clients" when trying to connect. Why?
|
3.11) What are the pg_sorttempNNN.NN files in my database directory?
|
||||||
3.13) What are the pg_sorttempNNN.NN files in my database directory?
|
|
||||||
|
|
||||||
Operational Questions
|
Operational Questions
|
||||||
|
|
||||||
@ -177,15 +175,16 @@
|
|||||||
It is possible to compile the libpq C library, psql, and other
|
It is possible to compile the libpq C library, psql, and other
|
||||||
interfaces and binaries to run on MS Windows platforms. In this case,
|
interfaces and binaries to run on MS Windows platforms. In this case,
|
||||||
the client is running on MS Windows, and communicates via TCP/IP to a
|
the client is running on MS Windows, and communicates via TCP/IP to a
|
||||||
server running on one of our supported Unix platforms.
|
server running on one of our supported Unix platforms. A file
|
||||||
|
win31.mak is included in the distribution for making a Win32 libpq
|
||||||
|
library and psql.
|
||||||
|
|
||||||
A file win31.mak is included in the distribution for making a Win32
|
The database server can run on Windows NT and later using Cygwin, the
|
||||||
libpq library and psql.
|
Cygnus Unix/NT porting library. See pgsql/doc/FAQ_MSWIN in the
|
||||||
|
distribution. The database server does not run on MS Windows 9X
|
||||||
The database server is now working on Windows NT using Cygwin, the
|
because Cygwin does not support the required features on those
|
||||||
Cygnus Unix/NT porting library. See pgsql/doc/FAQ_NT in the
|
platforms. We have no plans to do a native port to any Microsoft
|
||||||
distribution. It does not work on MS Windows 9X because Cygwin does
|
platform.
|
||||||
not support the features we need on those platforms.
|
|
||||||
|
|
||||||
1.5) Where can I get PostgreSQL?
|
1.5) Where can I get PostgreSQL?
|
||||||
|
|
||||||
@ -238,7 +237,7 @@
|
|||||||
|
|
||||||
1.7) What is the latest release?
|
1.7) What is the latest release?
|
||||||
|
|
||||||
The latest release of PostgreSQL is version 7.0.2.
|
The latest release of PostgreSQL is version 7.0.3.
|
||||||
|
|
||||||
We plan to have major releases every four months.
|
We plan to have major releases every four months.
|
||||||
|
|
||||||
@ -425,32 +424,18 @@
|
|||||||
|
|
||||||
Administrative Questions
|
Administrative Questions
|
||||||
|
|
||||||
3.1) Why does initdb fail?
|
3.1) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
|
||||||
|
|
||||||
Try these:
|
Specify the --prefix option when running configure.
|
||||||
* check that you don't have any of the previous version's binaries
|
|
||||||
in your path
|
|
||||||
* check to see that you have the proper paths set
|
|
||||||
* check that the postgres user owns the proper files
|
|
||||||
|
|
||||||
If you see an error message about oidvector, you definately have a
|
3.2) When I start the postmaster, I get a Bad System Call or core dumped
|
||||||
version mismatch.
|
|
||||||
|
|
||||||
3.2) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
|
|
||||||
|
|
||||||
The simplest way is to specify the --prefix option when running
|
|
||||||
configure. If you forgot to do that, you can edit Makefile.global and
|
|
||||||
change POSTGRESDIR accordingly, or create a Makefile.custom and define
|
|
||||||
POSTGRESDIR there.
|
|
||||||
|
|
||||||
3.3) When I start the postmaster, I get a Bad System Call or core dumped
|
|
||||||
message. Why?
|
message. Why?
|
||||||
|
|
||||||
It could be a variety of problems, but first check to see that you
|
It could be a variety of problems, but first check to see that you
|
||||||
have System V extensions installed in your kernel. PostgreSQL requires
|
have System V extensions installed in your kernel. PostgreSQL requires
|
||||||
kernel support for shared memory and semaphores.
|
kernel support for shared memory and semaphores.
|
||||||
|
|
||||||
3.4) When I try to start the postmaster, I get IpcMemoryCreate errors. Why?
|
3.3) When I try to start the postmaster, I get IpcMemoryCreate errors. Why?
|
||||||
|
|
||||||
You either do not have shared memory configured properly in your
|
You either do not have shared memory configured properly in your
|
||||||
kernel or you need to enlarge the shared memory available in the
|
kernel or you need to enlarge the shared memory available in the
|
||||||
@ -459,7 +444,7 @@
|
|||||||
For most systems, with default numbers of buffers and processes, you
|
For most systems, with default numbers of buffers and processes, you
|
||||||
need a minimum of ~1MB.
|
need a minimum of ~1MB.
|
||||||
|
|
||||||
3.5) When I try to start the postmaster, I get IpcSemaphoreCreate errors.
|
3.4) When I try to start the postmaster, I get IpcSemaphoreCreate errors.
|
||||||
Why?
|
Why?
|
||||||
|
|
||||||
If the error message is IpcSemaphoreCreate: semget failed (No space
|
If the error message is IpcSemaphoreCreate: semget failed (No space
|
||||||
@ -473,7 +458,7 @@
|
|||||||
If the error message is something else, you might not have semaphore
|
If the error message is something else, you might not have semaphore
|
||||||
support configured in your kernel at all.
|
support configured in your kernel at all.
|
||||||
|
|
||||||
3.6) How do I prevent other hosts from accessing my PostgreSQL database?
|
3.5) How do I prevent other hosts from accessing my PostgreSQL database?
|
||||||
|
|
||||||
By default, PostgreSQL only allows connections from the local machine
|
By default, PostgreSQL only allows connections from the local machine
|
||||||
using Unix domain sockets. Other machines will not be able to connect
|
using Unix domain sockets. Other machines will not be able to connect
|
||||||
@ -481,26 +466,19 @@
|
|||||||
authentication by modifying the file $PGDATA/pg_hba.conf accordingly.
|
authentication by modifying the file $PGDATA/pg_hba.conf accordingly.
|
||||||
This will allow TCP/IP connections.
|
This will allow TCP/IP connections.
|
||||||
|
|
||||||
3.7) Why can't I connect to my database from another machine?
|
3.6) Why can't I connect to my database from another machine?
|
||||||
|
|
||||||
The default configuration allows only unix domain socket connections
|
The default configuration allows only unix domain socket connections
|
||||||
from the local machine. To enable TCP/IP connections, make sure the
|
from the local machine. To enable TCP/IP connections, make sure the
|
||||||
postmaster has been started with the -i option, and add an appropriate
|
postmaster has been started with the -i option, and add an appropriate
|
||||||
host entry to the file pgsql/data/pg_hba.conf.
|
host entry to the file pgsql/data/pg_hba.conf.
|
||||||
|
|
||||||
3.8) Why can't I access the database as the root user?
|
3.7) All my servers crash under concurrent table access. Why?
|
||||||
|
|
||||||
You should not create database users with user id 0 (root). They will
|
|
||||||
be unable to access the database. This is a security precaution
|
|
||||||
because of the ability of users to dynamically link object modules
|
|
||||||
into the database engine.
|
|
||||||
|
|
||||||
3.9) All my servers crash under concurrent table access. Why?
|
|
||||||
|
|
||||||
This problem can be caused by a kernel that is not configured to
|
This problem can be caused by a kernel that is not configured to
|
||||||
support semaphores.
|
support semaphores.
|
||||||
|
|
||||||
3.10) How do I tune the database engine for better performance?
|
3.8) How do I tune the database engine for better performance?
|
||||||
|
|
||||||
Certainly, indices can speed up queries. The EXPLAIN command allows
|
Certainly, indices can speed up queries. The EXPLAIN command allows
|
||||||
you to see how PostgreSQL is interpreting your query, and which
|
you to see how PostgreSQL is interpreting your query, and which
|
||||||
@ -531,7 +509,7 @@
|
|||||||
You can also use the CLUSTER command to group data in tables to match
|
You can also use the CLUSTER command to group data in tables to match
|
||||||
an index. See the CLUSTER manual page for more details.
|
an index. See the CLUSTER manual page for more details.
|
||||||
|
|
||||||
3.11) What debugging features are available?
|
3.9) What debugging features are available?
|
||||||
|
|
||||||
PostgreSQL has several features that report status information that
|
PostgreSQL has several features that report status information that
|
||||||
can be valuable for debugging purposes.
|
can be valuable for debugging purposes.
|
||||||
@ -578,7 +556,7 @@
|
|||||||
pgsql/data/base/dbname directory. The client profile file will be put
|
pgsql/data/base/dbname directory. The client profile file will be put
|
||||||
in the client's current directory.
|
in the client's current directory.
|
||||||
|
|
||||||
3.12) I get 'Sorry, too many clients' when trying to connect. Why?
|
3.10) I get 'Sorry, too many clients' when trying to connect. Why?
|
||||||
|
|
||||||
You need to increase the postmaster's limit on how many concurrent
|
You need to increase the postmaster's limit on how many concurrent
|
||||||
backend processes it can start.
|
backend processes it can start.
|
||||||
@ -606,7 +584,7 @@
|
|||||||
was 64, and changing it required a rebuild after altering the
|
was 64, and changing it required a rebuild after altering the
|
||||||
MaxBackendId constant in include/storage/sinvaladt.h.
|
MaxBackendId constant in include/storage/sinvaladt.h.
|
||||||
|
|
||||||
3.13) What are the pg_sorttempNNN.NN files in my database directory?
|
3.11) What are the pg_sorttempNNN.NN files in my database directory?
|
||||||
|
|
||||||
They are temporary files generated by the query executor. For example,
|
They are temporary files generated by the query executor. For example,
|
||||||
if a sort needs to be done to satisfy an ORDER BY, and the sort
|
if a sort needs to be done to satisfy an ORDER BY, and the sort
|
||||||
@ -645,9 +623,9 @@
|
|||||||
4.4) How do I get a list of tables or other things I can see in psql?
|
4.4) How do I get a list of tables or other things I can see in psql?
|
||||||
|
|
||||||
You can read the source code for psql in file
|
You can read the source code for psql in file
|
||||||
pgsql/src/bin/psql/psql.c. It contains SQL commands that generate the
|
pgsql/src/bin/psql/describe.c. It contains SQL commands that generate
|
||||||
output for psql's backslash commands. You can also start psql with the
|
the output for psql's backslash commands. You can also start psql with
|
||||||
-E option so it will print out the queries it uses to execute the
|
the -E option so it will print out the queries it uses to execute the
|
||||||
commands you give.
|
commands you give.
|
||||||
|
|
||||||
4.5) How do you remove a column from a table?
|
4.5) How do you remove a column from a table?
|
||||||
@ -664,7 +642,7 @@
|
|||||||
These are the limits:
|
These are the limits:
|
||||||
Maximum size for a database? unlimited (60GB databases exist)
|
Maximum size for a database? unlimited (60GB databases exist)
|
||||||
Maximum size for a table? unlimited on all operating systems
|
Maximum size for a table? unlimited on all operating systems
|
||||||
Maximum size for a row? 8k, configurable to 32k
|
Maximum size for a row? unlimited in 7.1 and later
|
||||||
Maximum number of rows in a table? unlimited
|
Maximum number of rows in a table? unlimited
|
||||||
Maximum number of columns in a table? unlimited
|
Maximum number of columns in a table? unlimited
|
||||||
Maximum number of indexes on a table? unlimited
|
Maximum number of indexes on a table? unlimited
|
||||||
@ -672,12 +650,6 @@ Maximum number of indexes on a table? unlimited
|
|||||||
Of course, these are not actually unlimited, but limited to available
|
Of course, these are not actually unlimited, but limited to available
|
||||||
disk space.
|
disk space.
|
||||||
|
|
||||||
To change the maximum row size, edit include/config.h and change
|
|
||||||
BLCKSZ. To use attributes larger than 8K, you can also use the large
|
|
||||||
object interface.
|
|
||||||
|
|
||||||
The row length limit will be removed in 7.1.
|
|
||||||
|
|
||||||
4.7) How much database disk space is required to store data from a typical
|
4.7) How much database disk space is required to store data from a typical
|
||||||
text file?
|
text file?
|
||||||
|
|
||||||
@ -969,10 +941,10 @@ SELECT *
|
|||||||
|
|
||||||
4.24) How do I do an outer join?
|
4.24) How do I do an outer join?
|
||||||
|
|
||||||
PostgreSQL does not support outer joins in the current release. They
|
PostgreSQL 7.1 and later supports outer joins. In previous releases,
|
||||||
can be simulated using UNION and NOT IN. For example, when joining
|
outer joins can be simulated using UNION and NOT IN. For example, when
|
||||||
tab1 and tab2, the following query does an outer join of the two
|
joining tab1 and tab2, the following query does an outer join of the
|
||||||
tables:
|
two tables:
|
||||||
SELECT tab1.col1, tab2.col2
|
SELECT tab1.col1, tab2.col2
|
||||||
FROM tab1, tab2
|
FROM tab1, tab2
|
||||||
WHERE tab1.col1 = tab2.col1
|
WHERE tab1.col1 = tab2.col1
|
||||||
@ -1011,4 +983,6 @@ SELECT *
|
|||||||
change?
|
change?
|
||||||
|
|
||||||
The Makefiles do not have the proper dependencies for include files.
|
The Makefiles do not have the proper dependencies for include files.
|
||||||
You have to do a make clean and then another make.
|
You have to do a make clean and then another make. If you are using
|
||||||
|
GCC you can use the --enable-depend option of configure to have the
|
||||||
|
compiler compute the dependencies automatically.
|
||||||
|
@ -63,30 +63,27 @@
|
|||||||
<CENTER>
|
<CENTER>
|
||||||
<H2>Administrative Questions</H2>
|
<H2>Administrative Questions</H2>
|
||||||
</CENTER>
|
</CENTER>
|
||||||
<A href="#3.1">3.1</A>) Why does <I>initdb</I> fail?<BR>
|
<A href="#3.1">3.1</A>) How do I install PostgreSQL somewhere
|
||||||
<A href="#3.2">3.2</A>) How do I install PostgreSQL somewhere
|
|
||||||
other than <I>/usr/local/pgsql?</I><BR>
|
other than <I>/usr/local/pgsql?</I><BR>
|
||||||
<A href="#3.3">3.3</A>) When I start the <I>postmaster</I>, I get
|
<A href="#3.2">3.2</A>) When I start the <I>postmaster</I>, I get
|
||||||
a <I>Bad System Call</I> or core dumped message. Why?<BR>
|
a <I>Bad System Call</I> or core dumped message. Why?<BR>
|
||||||
<A href="#3.4">3.4</A>) When I try to start the <I>postmaster</I>,
|
<A href="#3.3">3.3</A>) When I try to start the <I>postmaster</I>,
|
||||||
I get <I>IpcMemoryCreate</I> errors. Why?<BR>
|
I get <I>IpcMemoryCreate</I> errors. Why?<BR>
|
||||||
<A href="#3.5">3.5</A>) When I try to start the <I>postmaster</I>,
|
<A href="#3.4">3.4</A>) When I try to start the <I>postmaster</I>,
|
||||||
I get <I>IpcSemaphoreCreate</I> errors. Why?<BR>
|
I get <I>IpcSemaphoreCreate</I> errors. Why?<BR>
|
||||||
<A href="#3.6">3.6</A>) How do I prevent other hosts from
|
<A href="#3.5">3.5</A>) How do I prevent other hosts from
|
||||||
accessing my PostgreSQL database?<BR>
|
accessing my PostgreSQL database?<BR>
|
||||||
<A href="#3.7">3.7</A>) Why can't I connect to my database from
|
<A href="#3.6">3.6</A>) Why can't I connect to my database from
|
||||||
another machine?<BR>
|
another machine?<BR>
|
||||||
<A href="#3.8">3.8</A>) Why can't I access the database as the
|
<A href="#3.7">3.7</A>) All my servers crash under concurrent
|
||||||
<I>root</I> user?<BR>
|
|
||||||
<A href="#3.9">3.9</A>) All my servers crash under concurrent
|
|
||||||
table access. Why?<BR>
|
table access. Why?<BR>
|
||||||
<A href="#3.10">3.10</A>) How do I tune the database engine for
|
<A href="#3.8">3.8</A>) How do I tune the database engine for
|
||||||
better performance?<BR>
|
better performance?<BR>
|
||||||
<A href="#3.11">3.11</A>) What debugging features are
|
<A href="#3.9">3.9</A>) What debugging features are
|
||||||
available?<BR>
|
available?<BR>
|
||||||
<A href="#3.12">3.12</A>) I get <I>"Sorry, too many clients"</I>
|
<A href="#3.10">3.10</A>) I get <I>"Sorry, too many clients"</I>
|
||||||
when trying to connect. Why?<BR>
|
when trying to connect. Why?<BR>
|
||||||
<A href="#3.13">3.13</A>) What are the <I>pg_sorttempNNN.NN</I>
|
<A href="#3.11">3.11</A>) What are the <I>pg_sorttempNNN.NN</I>
|
||||||
files in my database directory?<BR>
|
files in my database directory?<BR>
|
||||||
|
|
||||||
|
|
||||||
@ -236,15 +233,14 @@
|
|||||||
other interfaces and binaries to run on MS Windows platforms. In
|
other interfaces and binaries to run on MS Windows platforms. In
|
||||||
this case, the client is running on MS Windows, and communicates
|
this case, the client is running on MS Windows, and communicates
|
||||||
via TCP/IP to a server running on one of our supported Unix
|
via TCP/IP to a server running on one of our supported Unix
|
||||||
platforms.</P>
|
platforms. A file <I>win31.mak</I> is included in the distribution for
|
||||||
|
|
||||||
<P>A file <I>win31.mak</I> is included in the distribution for
|
|
||||||
making a Win32 <I>libpq</I> library and psql.</P>
|
making a Win32 <I>libpq</I> library and psql.</P>
|
||||||
|
|
||||||
<P>The database server is now working on Windows NT using Cygwin,
|
<P>The database server can run on Windows NT and later using
|
||||||
the Cygnus Unix/NT porting library. See <I>pgsql/doc/FAQ_NT</I> in
|
Cygwin, the Cygnus Unix/NT porting library. See <I>pgsql/doc/FAQ_MSWIN</I>
|
||||||
the distribution. It does not work on MS Windows 9X because Cygwin
|
in the distribution. The database server does not run on MS Windows 9X
|
||||||
does not support the features we need on those platforms.</P>
|
because Cygwin does not support the required features on those platforms.
|
||||||
|
We have no plans to do a native port to any Microsoft platform.</P>
|
||||||
|
|
||||||
<H4><A name="1.5">1.5</A>) Where can I get PostgreSQL?</H4>
|
<H4><A name="1.5">1.5</A>) Where can I get PostgreSQL?</H4>
|
||||||
|
|
||||||
@ -317,7 +313,7 @@
|
|||||||
|
|
||||||
<H4><A name="1.7">1.7</A>) What is the latest release?</H4>
|
<H4><A name="1.7">1.7</A>) What is the latest release?</H4>
|
||||||
|
|
||||||
<P>The latest release of PostgreSQL is version 7.0.2.</P>
|
<P>The latest release of PostgreSQL is version 7.0.3.</P>
|
||||||
|
|
||||||
<P>We plan to have major releases every four months.</P>
|
<P>We plan to have major releases every four months.</P>
|
||||||
|
|
||||||
@ -565,39 +561,19 @@
|
|||||||
<H2>Administrative Questions</H2>
|
<H2>Administrative Questions</H2>
|
||||||
</CENTER>
|
</CENTER>
|
||||||
|
|
||||||
<H4><A name="3.1">3.1</A>) Why does <I>initdb</I> fail?</H4>
|
<H4><A name="3.1">3.1</A>) How do I install PostgreSQL somewhere
|
||||||
|
|
||||||
<P>Try these:</P>
|
|
||||||
|
|
||||||
<UL>
|
|
||||||
<LI>check that you don't have any of the previous version's
|
|
||||||
binaries in your path</LI>
|
|
||||||
|
|
||||||
<LI>check to see that you have the proper paths set</LI>
|
|
||||||
|
|
||||||
<LI>check that the <I>postgres</I> user owns the proper
|
|
||||||
files</LI>
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
<P>If you see an error message about <I>oidvector,</I> you
|
|
||||||
definately have a version mismatch.</P>
|
|
||||||
|
|
||||||
<H4><A name="3.2">3.2</A>) How do I install PostgreSQL somewhere
|
|
||||||
other than <I>/usr/local/pgsql?</I></H4>
|
other than <I>/usr/local/pgsql?</I></H4>
|
||||||
|
|
||||||
<P>The simplest way is to specify the --prefix option when running
|
<P>Specify the <I>--prefix</I> option when running <I>configure.</I></P>
|
||||||
<I>configure.</I> If you forgot to do that, you can edit
|
|
||||||
<I>Makefile.global</I> and change POSTGRESDIR accordingly, or
|
|
||||||
create a <I>Makefile.custom</I> and define POSTGRESDIR there.</P>
|
|
||||||
|
|
||||||
<H4><A name="3.3">3.3</A>) When I start the <I>postmaster</I>, I
|
<H4><A name="3.2">3.2</A>) When I start the <I>postmaster</I>, I
|
||||||
get a <I>Bad System Call</I> or core dumped message. Why?</H4>
|
get a <I>Bad System Call</I> or core dumped message. Why?</H4>
|
||||||
|
|
||||||
<P>It could be a variety of problems, but first check to see that
|
<P>It could be a variety of problems, but first check to see that
|
||||||
you have System V extensions installed in your kernel. PostgreSQL
|
you have System V extensions installed in your kernel. PostgreSQL
|
||||||
requires kernel support for shared memory and semaphores.</P>
|
requires kernel support for shared memory and semaphores.</P>
|
||||||
|
|
||||||
<H4><A name="3.4">3.4</A>) When I try to start the
|
<H4><A name="3.3">3.3</A>) When I try to start the
|
||||||
<I>postmaster,</I> I get <I>IpcMemoryCreate</I> errors. Why?</H4>
|
<I>postmaster,</I> I get <I>IpcMemoryCreate</I> errors. Why?</H4>
|
||||||
|
|
||||||
<P>You either do not have shared memory configured properly in your
|
<P>You either do not have shared memory configured properly in your
|
||||||
@ -607,7 +583,7 @@
|
|||||||
<I>postmaster.</I> For most systems, with default numbers of
|
<I>postmaster.</I> For most systems, with default numbers of
|
||||||
buffers and processes, you need a minimum of ~1MB.</P>
|
buffers and processes, you need a minimum of ~1MB.</P>
|
||||||
|
|
||||||
<H4><A name="3.5">3.5</A>) When I try to start the
|
<H4><A name="3.4">3.4</A>) When I try to start the
|
||||||
<I>postmaster,</I> I get <I>IpcSemaphoreCreate</I> errors.
|
<I>postmaster,</I> I get <I>IpcSemaphoreCreate</I> errors.
|
||||||
Why?</H4>
|
Why?</H4>
|
||||||
|
|
||||||
@ -623,7 +599,7 @@
|
|||||||
<P>If the error message is something else, you might not have
|
<P>If the error message is something else, you might not have
|
||||||
semaphore support configured in your kernel at all.</P>
|
semaphore support configured in your kernel at all.</P>
|
||||||
|
|
||||||
<H4><A name="3.6">3.6</A>) How do I prevent other hosts from
|
<H4><A name="3.5">3.5</A>) How do I prevent other hosts from
|
||||||
accessing my PostgreSQL database?</H4>
|
accessing my PostgreSQL database?</H4>
|
||||||
|
|
||||||
<P>By default, PostgreSQL only allows connections from the local
|
<P>By default, PostgreSQL only allows connections from the local
|
||||||
@ -633,7 +609,7 @@
|
|||||||
modifying the file <I>$PGDATA/pg_hba.conf</I> accordingly. This
|
modifying the file <I>$PGDATA/pg_hba.conf</I> accordingly. This
|
||||||
will allow TCP/IP connections.</P>
|
will allow TCP/IP connections.</P>
|
||||||
|
|
||||||
<H4><A name="3.7">3.7</A>) Why can't I connect to my database from
|
<H4><A name="3.6">3.6</A>) Why can't I connect to my database from
|
||||||
another machine?</H4>
|
another machine?</H4>
|
||||||
|
|
||||||
<P>The default configuration allows only unix domain socket
|
<P>The default configuration allows only unix domain socket
|
||||||
@ -642,21 +618,13 @@
|
|||||||
option, and add an appropriate host entry to the file
|
option, and add an appropriate host entry to the file
|
||||||
<I>pgsql/data/pg_hba.conf</I>.</P>
|
<I>pgsql/data/pg_hba.conf</I>.</P>
|
||||||
|
|
||||||
<H4><A name="3.8">3.8</A>) Why can't I access the database as the
|
<H4><A name="3.7">3.7</A>) All my servers crash under concurrent
|
||||||
<I>root</I> user?</H4>
|
|
||||||
|
|
||||||
<P>You should not create database users with user id 0 (root). They
|
|
||||||
will be unable to access the database. This is a security
|
|
||||||
precaution because of the ability of users to dynamically link
|
|
||||||
object modules into the database engine.</P>
|
|
||||||
|
|
||||||
<H4><A name="3.9">3.9</A>) All my servers crash under concurrent
|
|
||||||
table access. Why?</H4>
|
table access. Why?</H4>
|
||||||
|
|
||||||
<P>This problem can be caused by a kernel that is not configured to
|
<P>This problem can be caused by a kernel that is not configured to
|
||||||
support semaphores.</P>
|
support semaphores.</P>
|
||||||
|
|
||||||
<H4><A name="3.10">3.10</A>) How do I tune the database engine for
|
<H4><A name="3.8">3.8</A>) How do I tune the database engine for
|
||||||
better performance?</H4>
|
better performance?</H4>
|
||||||
|
|
||||||
<P>Certainly, indices can speed up queries. The
|
<P>Certainly, indices can speed up queries. The
|
||||||
@ -693,7 +661,7 @@
|
|||||||
data in tables to match an index. See the <SMALL>CLUSTER</SMALL>
|
data in tables to match an index. See the <SMALL>CLUSTER</SMALL>
|
||||||
manual page for more details.</P>
|
manual page for more details.</P>
|
||||||
|
|
||||||
<H4><A name="3.11">3.11</A>) What debugging features are
|
<H4><A name="3.9">3.9</A>) What debugging features are
|
||||||
available?</H4>
|
available?</H4>
|
||||||
|
|
||||||
<P>PostgreSQL has several features that report status information
|
<P>PostgreSQL has several features that report status information
|
||||||
@ -749,7 +717,7 @@
|
|||||||
in the <I>pgsql/data/base/dbname</I> directory. The client profile
|
in the <I>pgsql/data/base/dbname</I> directory. The client profile
|
||||||
file will be put in the client's current directory.</P>
|
file will be put in the client's current directory.</P>
|
||||||
|
|
||||||
<H4><A name="3.12">3.12</A>) I get 'Sorry, too many clients' when
|
<H4><A name="3.10">3.10</A>) I get 'Sorry, too many clients' when
|
||||||
trying to connect. Why?</H4>
|
trying to connect. Why?</H4>
|
||||||
|
|
||||||
<P>You need to increase the <I>postmaster's</I> limit on how many
|
<P>You need to increase the <I>postmaster's</I> limit on how many
|
||||||
@ -784,7 +752,7 @@
|
|||||||
the MaxBackendId constant in
|
the MaxBackendId constant in
|
||||||
<I>include/storage/sinvaladt.h.</I></P>
|
<I>include/storage/sinvaladt.h.</I></P>
|
||||||
|
|
||||||
<H4><A name="3.13">3.13</A>) What are the <I>pg_sorttempNNN.NN</I>
|
<H4><A name="3.11">3.11</A>) What are the <I>pg_sorttempNNN.NN</I>
|
||||||
files in my database directory?</H4>
|
files in my database directory?</H4>
|
||||||
|
|
||||||
<P>They are temporary files generated by the query executor. For
|
<P>They are temporary files generated by the query executor. For
|
||||||
@ -835,7 +803,7 @@
|
|||||||
</H4>
|
</H4>
|
||||||
|
|
||||||
<P>You can read the source code for <I>psql</I> in file
|
<P>You can read the source code for <I>psql</I> in file
|
||||||
<I>pgsql/src/bin/psql/psql.c.</I> It contains SQL commands that
|
<I>pgsql/src/bin/psql/describe.c.</I> It contains SQL commands that
|
||||||
generate the output for psql's backslash commands. You can also
|
generate the output for psql's backslash commands. You can also
|
||||||
start <I>psql</I> with the <I>-E</I> option so it will print out
|
start <I>psql</I> with the <I>-E</I> option so it will print out
|
||||||
the queries it uses to execute the commands you give.</P>
|
the queries it uses to execute the commands you give.</P>
|
||||||
@ -860,7 +828,7 @@
|
|||||||
<PRE>
|
<PRE>
|
||||||
Maximum size for a database? unlimited (60GB databases exist)
|
Maximum size for a database? unlimited (60GB databases exist)
|
||||||
Maximum size for a table? unlimited on all operating systems
|
Maximum size for a table? unlimited on all operating systems
|
||||||
Maximum size for a row? 8k, configurable to 32k
|
Maximum size for a row? unlimited in 7.1 and later
|
||||||
Maximum number of rows in a table? unlimited
|
Maximum number of rows in a table? unlimited
|
||||||
Maximum number of columns in a table? unlimited
|
Maximum number of columns in a table? unlimited
|
||||||
Maximum number of indexes on a table? unlimited
|
Maximum number of indexes on a table? unlimited
|
||||||
@ -868,12 +836,6 @@ Maximum number of indexes on a table? unlimited
|
|||||||
Of course, these are not actually unlimited, but limited to
|
Of course, these are not actually unlimited, but limited to
|
||||||
available disk space.
|
available disk space.
|
||||||
|
|
||||||
<P>To change the maximum row size, edit <I>include/config.h</I> and
|
|
||||||
change <SMALL>BLCKSZ.</SMALL> To use attributes larger than 8K, you
|
|
||||||
can also use the large object interface.</P>
|
|
||||||
|
|
||||||
<P>The row length limit will be removed in 7.1.</P>
|
|
||||||
|
|
||||||
<H4><A name="4.7">4.7</A>) How much database disk space is required
|
<H4><A name="4.7">4.7</A>) How much database disk space is required
|
||||||
to store data from a typical text file?<BR>
|
to store data from a typical text file?<BR>
|
||||||
</H4>
|
</H4>
|
||||||
@ -1242,8 +1204,8 @@ BYTEA bytea variable-length byte array (null-safe)
|
|||||||
<H4><A name="4.24">4.24</A>) How do I do an <I>outer</I> join?<BR>
|
<H4><A name="4.24">4.24</A>) How do I do an <I>outer</I> join?<BR>
|
||||||
</H4>
|
</H4>
|
||||||
|
|
||||||
<P>PostgreSQL does not support outer joins in the current release.
|
<P>PostgreSQL 7.1 and later supports outer joins. In previous releases,
|
||||||
They can be simulated using <SMALL>UNION</SMALL> and <SMALL>NOT
|
outer joins can be simulated using <SMALL>UNION</SMALL> and <SMALL>NOT
|
||||||
IN</SMALL>. For example, when joining <I>tab1</I> and <I>tab2,</I>
|
IN</SMALL>. For example, when joining <I>tab1</I> and <I>tab2,</I>
|
||||||
the following query does an <I>outer</I> join of the two
|
the following query does an <I>outer</I> join of the two
|
||||||
tables:</P>
|
tables:</P>
|
||||||
@ -1295,7 +1257,9 @@ BYTEA bytea variable-length byte array (null-safe)
|
|||||||
|
|
||||||
<P>The <I>Makefiles</I> do not have the proper dependencies for
|
<P>The <I>Makefiles</I> do not have the proper dependencies for
|
||||||
include files. You have to do a <I>make clean</I> and then another
|
include files. You have to do a <I>make clean</I> and then another
|
||||||
<I>make</I>.</P>
|
<I>make</I>. If you are using GCC you can use the <i>--enable-depend</i>
|
||||||
|
option of <i>configure</i> to have the compiler compute the
|
||||||
|
dependencies automatically.</P>
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user