1
1
2
2
Frequently Asked Questions (FAQ) for PostgreSQL
3
3
4
- Last updated: Fri Jun 4 23:30:19 EDT 1999
4
+ Last updated: Sat Jun 5 14:22:43 EDT 1999
5
5
6
6
Current maintainer: Bruce Momjian (maillist@candle.pha.pa.us)
7
7
13
13
14
14
Irix-specific questions are answered in
15
15
http://postgreSQL.org/docs/faq-irix.html.
16
+
17
+ HPUX-specific questions are answered in
18
+ http://postgreSQL.org/docs/faq-hpux.shtml.
16
19
_________________________________________________________________
17
20
18
21
General questions
@@ -141,13 +144,13 @@ Section 1: General Questions
141
144
1.2) What does PostgreSQL run on?
142
145
143
146
The authors have compiled and tested PostgreSQL on the following
144
- platforms(some of these compiles require gcc 2.7.0 ):
147
+ platforms (some of these compiles require gcc):
145
148
* aix - IBM on AIX 3.2.5 or 4.x
146
149
* alpha - DEC Alpha AXP on Digital Unix 2.0, 3.2, 4.0
147
150
* BSD44_derived - OSs derived from 4.4-lite BSD (NetBSD, FreeBSD)
148
151
* bsdi - BSD/OS 2.x, 3.x, 4.x
149
152
* dgux - DG/UX 5.4R4.11
150
- * hpux - HP PA-RISC on HP-UX 9.0 , 10
153
+ * hpux - HP PA-RISC on HP-UX 9.* , 10.*
151
154
* i386_solaris - i386 Solaris
152
155
* irix5 - SGI MIPS on IRIX 5.3
153
156
* linux - Intel x86 on Linux 2.0 and Linux ELF SPARC on Linux ELF
@@ -203,9 +206,9 @@ Section 1: General Questions
203
206
California, Berkeley. It is maintained through volunteer effort.
204
207
205
208
The main mailing list is: pgsql-general@postgreSQL.org. It is
206
- available for discussion of matters pertaining to PostgreSQL, For info
207
- on how to subscribe, send a mail with the lines in the body (not the
208
- subject line)
209
+ available for discussion of matters pertaining to PostgreSQL. To
210
+ subscribe, send a mail with the lines in the body (not the subject
211
+ line)
209
212
210
213
subscribe
211
214
end
@@ -221,9 +224,13 @@ Section 1: General Questions
221
224
Digests are sent out to members of this list whenever the main list
222
225
has received around 30k of messages.
223
226
224
- The bugs mailing list available. To subscribe to this list, send email
225
- to bugs-request@postgreSQL.org with a BODY of:
227
+ The bugs mailing list is available. To subscribe to this list, send
228
+ email to bugs-request@postgreSQL.org with a BODY of:
226
229
230
+
231
+ subscribe
232
+ end
233
+
227
234
There is also a developers discussion mailing list available. To
228
235
subscribe to this list, send email to hackers-request@postgreSQL.org
229
236
with a BODY of:
@@ -237,7 +244,7 @@ Section 1: General Questions
237
244
238
245
http://postgreSQL.org
239
246
240
- There also an IRC channel on EFNet, channel #PostgreSQL. I use the
247
+ There is also an IRC channel on EFNet, channel #PostgreSQL. I use the
241
248
unix command irc -c '#PostgreSQL' "$USER" irc.phoenix.net
242
249
243
250
1.6) Latest release of PostgreSQL
@@ -368,8 +375,10 @@ Section 2: Installation Questions
368
375
369
376
2.4) How do I install PostgreSQL somewhere other than /usr/local/pgsql?
370
377
371
- You need to edit Makefile.global and change POSTGRESDIR accordingly,
372
- or create a Makefile.custom and define POSTGRESDIR there.
378
+ The simplest way is to specify the --prefix option when running
379
+ configure. If you forgot to do that, you can edit Makefile.global and
380
+ change POSTGRESDIR accordingly, or create a Makefile.custom and define
381
+ POSTGRESDIR there.
373
382
374
383
2.5) When I run postmaster, I get a Bad System Call core dumped message.
375
384
@@ -394,13 +403,13 @@ Section 2: Installation Questions
394
403
2.8) How do I prevent other hosts from accessing my PostgreSQL database?
395
404
396
405
By default, PostgreSQL only allows connections from the local machine
397
- using unix domain sockets. You must add the -i flag to the postmaster,
398
- and enable host-based authentication by modifying the file
399
- $PGDATA/pg_hba accordingly.
406
+ using unix domain sockets. Other machines will not be able to connect
407
+ unless you add the -i flag to the postmaster, and enable host-based
408
+ authentication by modifying the file $PGDATA/pg_hba.conf accordingly.
400
409
401
410
2.9) I can't access the database as the root user.
402
411
403
- You should not create database users with user id 0(root). They will
412
+ You should not create database users with user id 0 (root). They will
404
413
be unable to access the database. This is a security precaution
405
414
because of the ability of any user to dynamically link object modules
406
415
into the database engine.
@@ -430,12 +439,15 @@ Section 2: Installation Questions
430
439
431
440
You can also use the postmaster -B option to increase the number of
432
441
shared memory buffers used by the backend processes. If you make this
433
- parameter too high, the backends will not start or crash unexpectedly.
434
- Each buffer is 8K and the default is 64 buffers.
442
+ parameter too high, the postmaster may not start up because you've
443
+ exceeded your kernel's limit on shared memory space. Each buffer is 8K
444
+ and the default is 64 buffers.
435
445
436
- You can also use the postgres -S option to increase the maximum amount
437
- of memory used by each backend process for temporary sorts. Each
438
- buffer is 1K and the default is 512 buffers.
446
+ You can also use the backend -S option to increase the maximum amount
447
+ of memory used by each backend process for temporary sorts. The -S
448
+ value is measured in kilobytes, and the default is 512 (ie, 512K). It
449
+ is unwise to make this value too large, or you may run out of memory
450
+ when a query invokes several concurrent sorts.
439
451
440
452
You can also use the cluster command to group data in base tables to
441
453
match an index. See the cluster(l) manual page for more details.
@@ -445,7 +457,7 @@ Section 2: Installation Questions
445
457
PostgreSQL has several features that report status information that
446
458
can be valuable for debugging purposes.
447
459
448
- First, by running configure with the -enable-cassert option, many
460
+ First, by running configure with the -- enable-cassert option, many
449
461
assert()'s monitor the progress of the backend and halt the program
450
462
when something unexpected occurs.
451
463
@@ -461,7 +473,7 @@ Section 2: Installation Questions
461
473
encountered by the server. Postmaster has a -d option that allows even
462
474
more detailed information to be reported. The -d option takes a number
463
475
that specifies the debug level. Be warned that high debug level values
464
- generates large log files.
476
+ generate large log files.
465
477
466
478
You can actually run the postgres backend from the command line, and
467
479
type your SQL statement directly. This is recommended only for
@@ -473,8 +485,8 @@ Section 2: Installation Questions
473
485
operating system can attach to a running backend directly to diagnose
474
486
problems.
475
487
476
- The postgres program has a -s, -A, -t options that can be very useful
477
- for debugging and performance measurements.
488
+ The postgres program has -s, -A, and -t options that can be very
489
+ useful for debugging and performance measurements.
478
490
479
491
You can also compile with profiling to see what functions are taking
480
492
execution time. The backend profile files will be deposited in the
@@ -684,21 +696,24 @@ BYTEA bytea variable-length array of bytes
684
696
you need to use pgdump's -o option or copy with oids option to
685
697
preserve the oids.
686
698
687
- 3.14) What are the pg_psort.XXX files in my database directory?
699
+ 3.14) What are the pg_tempNNN.NN files in my database directory?
688
700
689
- They are temporary sort files generated by the query executor. For
690
- example, if a sort needs to be done to satisfy an order by, some temp
691
- files are generated as a result of the sort.
701
+ They are temporary files generated by the query executor. For example,
702
+ if a sort needs to be done to satisfy an order by, and the sort
703
+ requires more space than the backend's -S parameter allows, then temp
704
+ files are created to hold the extra data.
692
705
693
- If you have no transactions or sorts running at the time, it is safe
694
- to delete the pg_psort.XXX files.
706
+ The temp files should go away automatically, but might not if a
707
+ backend crashes during a sort. If you have no transactions running at
708
+ the time, it is safe to delete the pg_tempNNN.NN files.
695
709
696
710
3.15) Why can't I connect to my database from another machine?
697
711
698
712
The default configuration allows only unix domain socket connections
699
- from the local machine. To enable TCP/IP connections, use the
700
- postmaster -i option You need to add a host entry to the file
701
- pgsql/data/pg_hba. See the pg_hba.conf manual page.
713
+ from the local machine. To enable TCP/IP connections, make sure the
714
+ postmaster has been started with the -i option, and add an appropriate
715
+ host entry to the file pgsql/data/pg_hba.conf. See the pg_hba.conf
716
+ manual page.
702
717
703
718
3.16) How do I find out what indices or operations are defined in the
704
719
database?
@@ -776,7 +791,7 @@ BYTEA bytea variable-length array of bytes
776
791
777
792
See the fetch manual page.
778
793
779
- This only prevents all row results from being transfered to the
794
+ This only prevents all row results from being transferred to the
780
795
client. The entire query must be evaluated, even if you only want just
781
796
the first few rows. Consider a query that has an order by. There is no
782
797
way to return any rows until the entire query is evaluated and sorted.
@@ -811,8 +826,11 @@ being indexed, so they can be large also.
811
826
812
827
3.23) How do I get a list of tables, or other things I can see in psql?
813
828
814
- See the file pgsql/src/bin/psql/psql.c. It contains SQL commands that
815
- generate the output for psql's backslash commands.
829
+ You can read the source code for psql, file pgsql/src/bin/psql/psql.c.
830
+ It contains SQL commands that generate the output for psql's backslash
831
+ commands. Beginning in Postgres 6.5, you can also start psql with the
832
+ -E option so that it will print out the queries it uses to execute the
833
+ commands you give.
816
834
817
835
3.24) Why do I get the error "FATAL: palloc failure: memory exhausted?"
818
836
@@ -826,7 +844,7 @@ being indexed, so they can be large also.
826
844
Depending on your shell, only one of these may succeed, but it will
827
845
set your process data segment limit much higher and perhaps allow the
828
846
query to complete. This command applies to the current process, and
829
- all subprocesses created after the command is run. If are having a
847
+ all subprocesses created after the command is run. If you are having a
830
848
problem with the SQL client because the backend is returning too much
831
849
data, try it before starting the client.
832
850
0 commit comments