Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bb1095c

Browse files
committed
Update FAQ.
1 parent 6da3b76 commit bb1095c

File tree

2 files changed

+32
-89
lines changed

2 files changed

+32
-89
lines changed

doc/FAQ

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,21 @@
8383
other users?
8484
4.17) What is an OID? What is a TID?
8585
4.18) What is the meaning of some of the terms used in PostgreSQL?
86-
4.19) Why do I get the error "FATAL: palloc failure: memory
87-
exhausted?"
88-
4.20) How do I tell what PostgreSQL version I am running?
89-
4.21) My large-object operations get invalid large obj descriptor.
86+
4.19) How do I tell what PostgreSQL version I am running?
87+
4.20) My large-object operations get invalid large obj descriptor.
9088
Why?
91-
4.22) How do I create a column that will default to the current time?
92-
4.23) Why are my subqueries using IN so slow?
93-
4.24) How do I perform an outer join?
89+
4.21) How do I create a column that will default to the current time?
90+
4.22) Why are my subqueries using IN so slow?
91+
4.23) How do I perform an outer join?
9492

9593
Extending PostgreSQL
9694

9795
5.1) I wrote a user-defined function. When I run it in psql, why does
9896
it dump core?
99-
5.2) What does the message "NOTICE:PortalHeapMemoryFree: 0x402251d0
100-
not in alloc set!" mean?
101-
5.3) How can I contribute some nifty new types and functions to
97+
5.2) How can I contribute some nifty new types and functions to
10298
PostgreSQL?
103-
5.4) How do I write a C function to return a tuple?
104-
5.5) I have changed a source file. Why does the recompile not see the
99+
5.3) How do I write a C function to return a tuple?
100+
5.4) I have changed a source file. Why does the recompile not see the
105101
change?
106102
_________________________________________________________________
107103

@@ -887,26 +883,11 @@ BYTEA bytea variable-length byte array (null-safe)
887883
A list of general database terms can be found at:
888884
http://www.comptechnews.com/~reaster/dbdesign.html
889885

890-
4.19) Why do I get the error "FATAL: palloc failure: memory exhausted?"
891-
892-
It is possible you have run out of virtual memory on your system, or
893-
your kernel has a low limit for certain resources. Try this before
894-
starting the postmaster:
895-
ulimit -d 65536
896-
limit datasize 64m
897-
898-
Depending on your shell, only one of these may succeed, but it will
899-
set your process data segment limit much higher and perhaps allow the
900-
query to complete. This command applies to the current process, and
901-
all subprocesses created after the command is run. If you are having a
902-
problem with the SQL client because the backend is returning too much
903-
data, try it before starting the client.
904-
905-
4.20) How do I tell what PostgreSQL version I am running?
886+
4.19) How do I tell what PostgreSQL version I am running?
906887

907888
From psql, type select version();
908889

909-
4.21) My large-object operations get invalid large obj descriptor. Why?
890+
4.20) My large-object operations get invalid large obj descriptor. Why?
910891

911892
You need to put BEGIN WORK and COMMIT around any use of a large object
912893
handle, that is, surrounding lo_open ... lo_close.
@@ -920,12 +901,12 @@ BYTEA bytea variable-length byte array (null-safe)
920901
If you are using a client interface like ODBC you may need to set
921902
auto-commit off.
922903

923-
4.22) How do I create a column that will default to the current time?
904+
4.21) How do I create a column that will default to the current time?
924905

925906
Use now():
926907
CREATE TABLE test (x int, modtime timestamp DEFAULT now() );
927908

928-
4.23) Why are my subqueries using IN so slow?
909+
4.22) Why are my subqueries using IN so slow?
929910

930911
Currently, we join subqueries to outer queries by sequentially
931912
scanning the result of the subquery for each row of the outer query. A
@@ -941,7 +922,7 @@ SELECT *
941922

942923
We hope to fix this limitation in a future release.
943924

944-
4.24) How do I perform an outer join?
925+
4.23) How do I perform an outer join?
945926

946927
PostgreSQL 7.1 and later supports outer joins using the SQL standard
947928
syntax. Here are two examples:
@@ -980,23 +961,17 @@ SELECT *
980961
The problem could be a number of things. Try testing your user-defined
981962
function in a stand-alone test program first.
982963

983-
5.2) What does the message "NOTICE:PortalHeapMemoryFree: 0x402251d0 not in
984-
alloc set!" mean?
985-
986-
You are pfree'ing something that was not palloc'ed. Beware of mixing
987-
malloc/free and palloc/pfree.
988-
989-
5.3) How can I contribute some nifty new types and functions to PostgreSQL?
964+
5.2) How can I contribute some nifty new types and functions to PostgreSQL?
990965

991966
Send your extensions to the pgsql-hackers mailing list, and they will
992967
eventually end up in the contrib/ subdirectory.
993968

994-
5.4) How do I write a C function to return a tuple?
969+
5.3) How do I write a C function to return a tuple?
995970

996971
This requires wizardry so extreme that the authors have never tried
997972
it, though in principle it can be done.
998973

999-
5.5) I have changed a source file. Why does the recompile not see the
974+
5.4) I have changed a source file. Why does the recompile not see the
1000975
change?
1001976

1002977
The Makefiles do not have the proper dependencies for include files.

doc/src/FAQ/FAQ.html

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -127,32 +127,27 @@ <H2>Operational Questions</H2>
127127
<SMALL>TID</SMALL>?<BR>
128128
<A href="#4.18">4.18</A>) What is the meaning of some of the terms
129129
used in PostgreSQL?<BR>
130-
<A href="#4.19">4.19</A>) Why do I get the error <I>"FATAL: palloc
131-
failure: memory exhausted?"</I><BR>
132-
<A href="#4.20">4.20</A>) How do I tell what PostgreSQL version I
130+
<A href="#4.19">4.19</A>) How do I tell what PostgreSQL version I
133131
am running? <BR>
134-
<A href="#4.21">4.21</A>) My large-object operations get
132+
<A href="#4.20">4.20</A>) My large-object operations get
135133
<I>invalid large obj descriptor.</I> Why?<BR>
136-
<A href="#4.22">4.22</A>) How do I create a column that will
134+
<A href="#4.21">4.21</A>) How do I create a column that will
137135
default to the current time?<BR>
138-
<A href="#4.23">4.23</A>) Why are my subqueries using
136+
<A href="#4.22">4.22</A>) Why are my subqueries using
139137
<CODE><SMALL>IN</SMALL></CODE> so slow?<BR>
140-
<A href="#4.24">4.24</A>) How do I perform an outer join?<BR>
138+
<A href="#4.23">4.23</A>) How do I perform an outer join?<BR>
141139

142140

143141
<CENTER>
144142
<H2>Extending PostgreSQL</H2>
145143
</CENTER>
146144
<A href="#5.1">5.1</A>) I wrote a user-defined function. When I run
147145
it in <I>psql,</I> why does it dump core?<BR>
148-
<A href="#5.2">5.2</A>) What does the message
149-
<I>"NOTICE:PortalHeapMemoryFree: 0x402251d0 not in alloc set!"</I>
150-
mean?<BR>
151-
<A href="#5.3">5.3</A>) How can I contribute some nifty new types
146+
<A href="#5.2">5.2</A>) How can I contribute some nifty new types
152147
and functions to PostgreSQL?<BR>
153-
<A href="#5.4">5.4</A>) How do I write a C function to return a
148+
<A href="#5.3">5.3</A>) How do I write a C function to return a
154149
tuple?<BR>
155-
<A href="#5.5">5.5</A>) I have changed a source file. Why does the
150+
<A href="#5.4">5.4</A>) I have changed a source file. Why does the
156151
recompile not see the change?<BR>
157152

158153
<HR>
@@ -1137,32 +1132,13 @@ <H4><A name="4.18">4.18</A>) What is the meaning of some of the
11371132
<P>A list of general database terms can be found at: <A href=
11381133
"http://www.comptechnews.com/~reaster/dbdesign.html">http://www.comptechnews.com/~reaster/dbdesign.html</A></P>
11391134

1140-
<H4><A name="4.19">4.19</A>) Why do I get the error <I>"FATAL:
1141-
palloc failure: memory exhausted?"</I><BR>
1142-
</H4>
1143-
1144-
<P>It is possible you have run out of virtual memory on your
1145-
system, or your kernel has a low limit for certain resources. Try
1146-
this before starting the <I>postmaster:</I></P>
1147-
<PRE>
1148-
ulimit -d 65536
1149-
limit datasize 64m
1150-
</PRE>
1151-
Depending on your shell, only one of these may succeed, but it will
1152-
set your process data segment limit much higher and perhaps allow
1153-
the query to complete. This command applies to the current process,
1154-
and all subprocesses created after the command is run. If you are
1155-
having a problem with the <SMALL>SQL</SMALL> client because the
1156-
backend is returning too much data, try it before starting the
1157-
client.
1158-
1159-
<H4><A name="4.20">4.20</A>) How do I tell what PostgreSQL version
1135+
<H4><A name="4.19">4.19</A>) How do I tell what PostgreSQL version
11601136
I am running?<BR>
11611137
</H4>
11621138

11631139
<P>From <I>psql,</I> type <CODE>select version();</CODE></P>
11641140

1165-
<H4><A name="4.21">4.21</A>) My large-object operations get
1141+
<H4><A name="4.20">4.20</A>) My large-object operations get
11661142
<I>invalid large obj descriptor.</I> Why?<BR>
11671143
</H4>
11681144

@@ -1179,7 +1155,7 @@ <H4><A name="4.21">4.21</A>) My large-object operations get
11791155
<P>If you are using a client interface like <SMALL>ODBC</SMALL> you
11801156
may need to set <CODE>auto-commit off.</CODE></P>
11811157

1182-
<H4><A name="4.22">4.22</A>) How do I create a column that will
1158+
<H4><A name="4.21">4.21</A>) How do I create a column that will
11831159
default to the current time?<BR>
11841160
</H4>
11851161

@@ -1189,7 +1165,7 @@ <H4><A name="4.22">4.22</A>) How do I create a column that will
11891165
</CODE>
11901166
</PRE>
11911167

1192-
<H4><A name="4.23">4.23</A>) Why are my subqueries using
1168+
<H4><A name="4.22">4.22</A>) Why are my subqueries using
11931169
<CODE><SMALL>IN</SMALL></CODE> so slow?<BR>
11941170
</H4>
11951171

@@ -1212,7 +1188,7 @@ <H4><A name="4.23">4.23</A>) Why are my subqueries using
12121188
</PRE>
12131189
We hope to fix this limitation in a future release.
12141190

1215-
<H4><A name="4.24">4.24</A>) How do I perform an outer join?<BR>
1191+
<H4><A name="4.23">4.23</A>) How do I perform an outer join?<BR>
12161192
</H4>
12171193

12181194
<P>PostgreSQL 7.1 and later supports outer joins using the SQL
@@ -1264,28 +1240,20 @@ <H4><A name="5.1">5.1</A>) I wrote a user-defined function. When I
12641240
<P>The problem could be a number of things. Try testing your
12651241
user-defined function in a stand-alone test program first.</P>
12661242

1267-
<H4><A name="5.2">5.2</A>) What does the message
1268-
<I>"NOTICE:PortalHeapMemoryFree: 0x402251d0 not in alloc set!"</I>
1269-
mean?</H4>
1270-
1271-
<P>You are <I>pfree'</I>ing something that was not
1272-
<I>palloc'</I>ed. Beware of mixing <I>malloc/free</I> and
1273-
<I>palloc/pfree.</I></P>
1274-
1275-
<H4><A name="5.3">5.3</A>) How can I contribute some nifty new
1243+
<H4><A name="5.2">5.2</A>) How can I contribute some nifty new
12761244
types and functions to PostgreSQL?</H4>
12771245

12781246
<P>Send your extensions to the <I>pgsql-hackers</I> mailing list,
12791247
and they will eventually end up in the <I>contrib/</I>
12801248
subdirectory.</P>
12811249

1282-
<H4><A name="5.4">5.4</A>) How do I write a C function to return a
1250+
<H4><A name="5.3">5.3</A>) How do I write a C function to return a
12831251
tuple?</H4>
12841252

12851253
<P>This requires wizardry so extreme that the authors have never
12861254
tried it, though in principle it can be done.</P>
12871255

1288-
<H4><A name="5.5">5.5</A>) I have changed a source file. Why does
1256+
<H4><A name="5.4">5.4</A>) I have changed a source file. Why does
12891257
the recompile not see the change?</H4>
12901258

12911259
<P>The <I>Makefiles</I> do not have the proper dependencies for

0 commit comments

Comments
 (0)