1
- <!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 transitional//EN">
2
-
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
2
< HTML >
4
- <!-- DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN" -->
5
- <!-- HTML -->
6
-
7
3
< HEAD >
8
4
< META name ="generator " content ="HTML Tidy, see www.w3.org ">
9
-
5
+ < META http-equiv =" Content-Type " content =" text/html; charset=US-ASCII " >
10
6
< TITLE > PostgreSQL FAQ</ TITLE >
11
7
</ HEAD >
12
8
13
9
< BODY bgcolor ="#ffffff " text ="#000000 " link ="#ff0000 " vlink ="#a00000 "
14
10
alink ="#0000ff ">
15
11
< H1 > Frequently Asked Questions (FAQ) for PostgreSQL</ H1 >
16
12
17
- < P > Last updated: Sat Oct 19 22:58:02 EDT 2002</ P >
13
+ < P > Last updated: Sun Oct 20 20:47:14 EDT 2002</ P >
18
14
19
15
< P > Current maintainer: Bruce Momjian (< A href =
20
16
"mailto:pgman@candle.pha.pa.us "> pgman@candle.pha.pa.us</ A > )< BR >
@@ -80,9 +76,9 @@ <H2 align="center">Administrative Questions</H2>
80
76
clients"</ I > when trying to connect?< BR >
81
77
< A href ="#3.9 "> 3.9</ A > ) What is in the < I > pgsql_tmp</ I >
82
78
directory?< BR >
83
- < A href ="#3.10 "> 3.10</ A > ) Why do I need to do a dump and restore
79
+ < A href ="#3.10 "> 3.10</ A > ) Why do I need to do a dump and restore
84
80
to upgrade PostgreSQL releases?< BR >
85
-
81
+
86
82
87
83
< H2 align ="center "> Operational Questions</ H2 >
88
84
< A href ="#4.1 "> 4.1</ A > ) What is the difference between binary
@@ -440,9 +436,8 @@ <H4><A name="1.14">1.14</A>) How does PostgreSQL compare to other
440
436
< I > Features</ I > section above. We are built for reliability and
441
437
features, though we continue to improve performance in every
442
438
release. There is an interesting Web page comparing PostgreSQL to
443
- MySQL at < A href = "http://openacs.org/why-not-mysql.html ">
444
-
445
- http://openacs.org/why-not-mysql.html</ A > < BR >
439
+ MySQL at < A href ="http://openacs.org/philosophy/why-not-mysql.html ">
440
+ http://openacs.org/philosophy/why-not-mysql.html</ A > < BR >
446
441
447
442
< BR >
448
443
</ DD >
@@ -653,7 +648,7 @@ <H4><A name="3.6">3.6</A>) How do I tune the database engine for
653
648
654
649
< P > If you are doing many < SMALL > INSERTs</ SMALL > , consider doing
655
650
them in a large batch using the < SMALL > COPY</ SMALL > command. This
656
- is much faster than individual < SMALL > INSERTS. </ SMALL > Second,
651
+ is much faster than individual < SMALL > INSERTS</ SMALL > . Second,
657
652
statements not in a < SMALL > BEGIN WORK/COMMIT</ SMALL > transaction
658
653
block are considered to be in their own transaction. Consider
659
654
performing several statements in a single transaction block. This
@@ -721,7 +716,7 @@ <H4><A name="3.7">3.7</A>) What debugging features are
721
716
< P > If < I > postmaster</ I > is running, start < I > psql</ I > in one
722
717
window, then find the < SMALL > PID</ SMALL > of the < I > postgres</ I >
723
718
process used by < I > psql</ I > . Use a debugger to attach to the
724
- < I > postgres</ I > < SMALL > PID. </ SMALL > You can set breakpoints in the
719
+ < I > postgres</ I > < SMALL > PID</ SMALL > . You can set breakpoints in the
725
720
debugger and issue queries from < I > psql</ I > . If you are debugging
726
721
< I > postgres</ I > startup, you can set PGOPTIONS="-W n", then start
727
722
< I > psql</ I > . This will cause startup to delay for < I > n</ I > seconds
@@ -759,7 +754,7 @@ <H4><A name="3.8">3.8</A>) Why do I get <I>"Sorry, too many
759
754
maximum number of processes, < SMALL > NPROC;</ SMALL > the maximum
760
755
number of processes per user, < SMALL > MAXUPRC;</ SMALL > and the
761
756
maximum number of open files, < SMALL > NFILE</ SMALL > and
762
- < SMALL > NINODE. </ SMALL > The reason that PostgreSQL has a limit on
757
+ < SMALL > NINODE</ SMALL > . The reason that PostgreSQL has a limit on
763
758
the number of allowed backend processes is so your system won't run
764
759
out of resources.</ P >
765
760
@@ -768,14 +763,13 @@ <H4><A name="3.8">3.8</A>) Why do I get <I>"Sorry, too many
768
763
the MaxBackendId constant in
769
764
< I > include/storage/sinvaladt.h</ I > .</ P >
770
765
771
- < H4 > < A name ="3.9 "> 3.9</ A > ) What are the < I > pgsql_tmp</ I >
772
- directory?</ H4 >
766
+ < H4 > < A name ="3.9 "> 3.9</ A > ) What is in the < I > pgsql_tmp</ I > directory?</ H4 >
773
767
774
- < P > They are temporary files generated by the query executor. For
775
- example, if a sort needs to be done to satisfy an < SMALL > ORDER
776
- BY, </ SMALL > and the sort requires more space than the backend's
777
- < I > -S</ I > parameter allows, then temporary files are created to
778
- hold the extra data.</ P >
768
+ < P > This directory contains temporary files generated by the query
769
+ executor. For example, if a sort needs to be done to satisfy an
770
+ < SMALL > ORDER BY </ SMALL > and the sort requires more space than the
771
+ backend's < I > -S</ I > parameter allows, then temporary files are created
772
+ here to hold the extra data.</ P >
779
773
780
774
< P > The temporary files are usually deleted automatically, but might
781
775
remain if a backend crashes during a sort. A stop and restart of the
@@ -815,7 +809,7 @@ <H4><A name="4.2">4.2</A>) How do I <SMALL>SELECT</SMALL> only the
815
809
816
810
< P > The entire query may have to be evaluated, even if you only want
817
811
the first few rows. Consider using a query that has an < SMALL > ORDER
818
- BY. </ SMALL > If there is an index that matches the < SMALL > ORDER
812
+ BY</ SMALL > . If there is an index that matches the < SMALL > ORDER
819
813
BY</ SMALL > , PostgreSQL may be able to evaluate only the first few
820
814
records requested, or the entire query may have to be evaluated
821
815
until the desired rows have been generated.</ P >
@@ -955,22 +949,22 @@ <H4><A name="4.8">4.8</A>) My queries are slow or don't make use of
955
949
</ PRE >
956
950
957
951
< P > When using wild-card operators such as < SMALL > LIKE</ SMALL > or
958
- < I > ~</ I > , indexes can only be used in certain circumstances:
952
+ < I > ~</ I > , indexes can only be used in certain circumstances:</ P >
959
953
< UL >
960
954
< LI > The beginning of the search string must be anchored to the start
961
- of the string, i.e.: </ LI >
955
+ of the string, i.e.
962
956
< UL >
963
- < LI > < SMALL > LIKE</ SMALL > patterns must not start with < I > %. </ I > </ LI >
957
+ < LI > < SMALL > LIKE</ SMALL > patterns must not start with < I > %</ I > . </ LI >
964
958
< LI > < I > ~</ I > (regular expression) patterns must start with
965
- < I > ^. </ I > </ LI >
966
- </ UL >
959
+ < I > ^</ I > . </ LI >
960
+ </ UL > </ LI >
967
961
< LI > The search string can not start with a character class,
968
962
e.g. [a-e].</ LI >
969
963
< LI > Case-insensitive searches such as < SMALL > ILIKE</ SMALL > and
970
964
< I > ~*</ I > do not utilise indexes. Instead, use functional
971
965
indexes, which are described in section < a href ="#4.12 "> 4.12</ a > .</ LI >
972
966
< LI > The default < I > C</ I > locale must be used during
973
- < i > initdb. </ i > </ LI >
967
+ < i > initdb</ i > . </ LI >
974
968
</ UL >
975
969
< P >
976
970
@@ -1342,7 +1336,7 @@ <H4><A name="4.24">4.24</A>) How do I perform queries using
1342
1336
Because PostgreSQL loads database-specific system catalogs, it is
1343
1337
uncertain how a cross-database query should even behave.</ P >
1344
1338
1345
- < P > < I > / contrib/dblink</ I > allows cross-database queries using
1339
+ < P > < I > contrib/dblink</ I > allows cross-database queries using
1346
1340
function calls. Of course, a client can make simultaneous
1347
1341
connections to different databases and merge the results on the
1348
1342
client side.</ P >
@@ -1379,13 +1373,13 @@ <H4><A name="4.27">4.27</A>) What replication options are available?
1379
1373
< H4 > < A name ="4.28 "> 4.28</ A > ) What encryption options are available?
1380
1374
</ H4 >
1381
1375
< UL >
1382
- < LI > < I > / contrib/pgcrypto</ I > contains many encryption functions for
1376
+ < LI > < I > contrib/pgcrypto</ I > contains many encryption functions for
1383
1377
use in < SMALL > SQL</ SMALL > queries.</ LI >
1384
1378
< LI > The only way to encrypt transmission from the client to the
1385
1379
server is by using < I > hostssl</ I > in < I > pg_hba.conf</ I > .</ LI >
1386
1380
< LI > Database user passwords are automatically encrypted when stored
1387
1381
in version 7.3. In previous versions, you must enable the option
1388
- < i > PASSWORD_ENCRYPTION</ i > in < i > postgresql.conf</ i > .</ LI >
1382
+ < I > PASSWORD_ENCRYPTION</ I > in < I > postgresql.conf</ I > .</ LI >
1389
1383
< LI > The server can run using an encrypted file system.</ LI >
1390
1384
</ UL >
1391
1385
@@ -1413,7 +1407,7 @@ <H4><A name="5.3">5.3</A>) How do I write a C function to return a
1413
1407
functions are fully supported in C, PL/PgSQL, and SQL. See the
1414
1408
Programmer's Guide for more information. An example of a
1415
1409
table-returning function defined in C can be found in
1416
- contrib/tablefunc.</ P >
1410
+ < I > contrib/tablefunc</ I > .</ P >
1417
1411
1418
1412
< H4 > < A name ="5.4 "> 5.4</ A > ) I have changed a source file. Why does
1419
1413
the recompile not see the change?</ H4 >
0 commit comments