5 new entries for FAQ

Started by Martijn van Oosterhoutover 20 years ago16 messagesgeneral
Jump to latest
#1Martijn van Oosterhout
kleptog@svana.org

Hi,

After going through pgsql-general a bit I figured there were a few
important questions missing from the FAQ, so I wrote some.

Comments welcome. I can write more, if people can suggest things to
write about. I was thinking something about collation and locales but
I'm sure sure I understand them myself.

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.

Attachments:

FAQ.html.1.patchtext/plain; charset=us-asciiDownload+114-1
#2Brendan Jurd
direvus@gmail.com
In reply to: Martijn van Oosterhout (#1)
Re: 5 new entries for FAQ

Comments welcome. I can write more, if people can suggest things to
write about. I was thinking something about collation and locales but
I'm sure sure I understand them myself.

The following should read "... has no facility to fire jobs ..."

+    <P>PostgreSQL itself has no facility fire jobs off at regular intervals,
+    it is recommended to use the operating system to handle this. For UNIX
+    systems this generally means <SMALL>cron</SMALL>, for Windows systems it
+    may mean the Task Scheduler.

--
BJ

#3Brendan Jurd
direvus@gmail.com
In reply to: Martijn van Oosterhout (#1)
Re: 5 new entries for FAQ

Comments welcome. I can write more, if people can suggest things to
write about. I was thinking something about collation and locales but
I'm sure sure I understand them myself.

Missed this on the first pass, but you need to s/seperate/separate here:

+    <P>A seperate project has started with the goal to create a job
+    scheduler for PostgreSQL, see

--
BJ

#4Roman Neuhauser
neuhauser@sigpipe.cz
In reply to: Martijn van Oosterhout (#1)
Re: 5 new entries for FAQ

# kleptog@svana.org / 2005-08-10 10:02:20 +0200:

After going through pgsql-general a bit I figured there were a few
important questions missing from the FAQ, so I wrote some.

Comments welcome. I can write more, if people can suggest things to
write about. I was thinking something about collation and locales but
I'm sure sure I understand them myself.

+ <H3><A name="4.22">4.22</A>) Why are PostgreSQL table names case-sensitive?</H3>

http://www.postgresql.org/docs/current/static/features.html doesn't
contain "fold" (as in "case folding") at all, doesn't this topic
belong rather there? The FAQ entry could point to, and maybe extend,
the (still nonexistent) text in that document.

+ <H3><A name="4.23">4.23</A>) Why is PostgreSQL only using one CPU to execute my query?</H3>

Something like this is missing from
http://www.postgresql.org/docs/current/static/overview.html.

+    <H3><A name="4.25">4.25</A>) What does 'index row size ... exceeds btree maximum, 2713' mean?</H3>
+
+    <P>Unlike some databases, PostgreSQL allows you to create an index on
+    any column, including unlimited text fields. However, B-Tree indexes
+    need to be able to hold at least three key values per page and since the
+    pagesize defaults to 8K minus some overhead, this means the maximum key
+    size is 2713 bytes.

This is missing from
http://www.postgresql.org/docs/current/static/sql-createindex.html
and/or http://www.postgresql.org/docs/current/static/indexes.html

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

#5Martijn van Oosterhout
kleptog@svana.org
In reply to: Roman Neuhauser (#4)
Re: 5 new entries for FAQ

On Wed, Aug 10, 2005 at 10:44:14AM +0200, Roman Neuhauser wrote:

+ <H3><A name="4.22">4.22</A>) Why are PostgreSQL table names case-sensitive?</H3>

http://www.postgresql.org/docs/current/static/features.html doesn't
contain "fold" (as in "case folding") at all, doesn't this topic
belong rather there? The FAQ entry could point to, and maybe extend,
the (still nonexistent) text in that document.

Well, it's not a feature, so I'm not sure why it would be mentioned
there. It's PostgreSQL's implementation of the standard. It is all
explained it detail in:

http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

It's just that the question as stated comes up regularly and in this
form, which is why I did that. Perhaps a link would be a good idea.

+ <H3><A name="4.23">4.23</A>) Why is PostgreSQL only using one CPU to execute my query?</H3>

Something like this is missing from
http://www.postgresql.org/docs/current/static/overview.html.

Again, the necessary information is in:

http://www.postgresql.org/docs/8.0/static/connect-estab.html

But if they don't read that bit or don't understand the consequences of
it they're going to come asking a question like the way I wrote it. I
think it would be a footnote in that section of the docs.

+    <H3><A name="4.25">4.25</A>) What does 'index row size ... exceeds btree maximum, 2713' mean?</H3>
+
+    <P>Unlike some databases, PostgreSQL allows you to create an index on
+    any column, including unlimited text fields. However, B-Tree indexes
+    need to be able to hold at least three key values per page and since the
+    pagesize defaults to 8K minus some overhead, this means the maximum key
+    size is 2713 bytes.

This is missing from
http://www.postgresql.org/docs/current/static/sql-createindex.html
and/or http://www.postgresql.org/docs/current/static/indexes.html

Well, I don't see it in the docs, maybe I missed it. It should at the
very least be in the FAQ. Not sure where else it should go...

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.

#6Roman Neuhauser
neuhauser@sigpipe.cz
In reply to: Martijn van Oosterhout (#5)
Re: 5 new entries for FAQ

# kleptog@svana.org / 2005-08-10 11:22:16 +0200:

On Wed, Aug 10, 2005 at 10:44:14AM +0200, Roman Neuhauser wrote:

+ <H3><A name="4.22">4.22</A>) Why are PostgreSQL table names case-sensitive?</H3>

http://www.postgresql.org/docs/current/static/features.html doesn't
contain "fold" (as in "case folding") at all, doesn't this topic
belong rather there? The FAQ entry could point to, and maybe extend,
the (still nonexistent) text in that document.

Well, it's not a feature, so I'm not sure why it would be mentioned
there. It's PostgreSQL's implementation of the standard.

That page has this heading: "Appendix D. SQL Conformance"

It is all explained it detail in:

http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

Seeing as the last para in 4.1.1. Identifiers and Key Words seems to
be almost exactly what you came up with (not accusing you of
"plagiarism" or such, the wording is obvious, and different people
will arrive at virtually identical explanations), wouldn't just
linking there suffice? (I'm a bit worried about information scatter
and duplication).

It's just that the question as stated comes up regularly and in this
form, which is why I did that. Perhaps a link would be a good idea.

Yes, that question is quite common, and perfectly answered in the
documentation; I would just point at it from the FAQ.

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

#7Martijn van Oosterhout
kleptog@svana.org
In reply to: Roman Neuhauser (#6)
Re: 5 new entries for FAQ

On Wed, Aug 10, 2005 at 07:40:23PM +0200, Roman Neuhauser wrote:

# kleptog@svana.org / 2005-08-10 11:22:16 +0200:

Well, it's not a feature, so I'm not sure why it would be mentioned
there. It's PostgreSQL's implementation of the standard.

That page has this heading: "Appendix D. SQL Conformance"

Ah, well, I'm not going to comment on what should or shouldn't be on
that page. I've never seen nor read the standard so I'm not the right
person to decide on that.

It is all explained it detail in:

http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

Seeing as the last para in 4.1.1. Identifiers and Key Words seems to
be almost exactly what you came up with (not accusing you of
"plagiarism" or such, the wording is obvious, and different people
will arrive at virtually identical explanations), wouldn't just
linking there suffice? (I'm a bit worried about information scatter
and duplication).

Heh, it is the same really. I guess after a certain number of times you
just end up saying the same thing as the docs. I guess it could be
trimmed to remove the duplication...

--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.

#8Bruce Momjian
bruce@momjian.us
In reply to: Martijn van Oosterhout (#1)
Re: 5 new entries for FAQ

Martijn van Oosterhout wrote:
-- Start of PGP signed section.

Hi,

After going through pgsql-general a bit I figured there were a few
important questions missing from the FAQ, so I wrote some.

Comments welcome. I can write more, if people can suggest things to
write about. I was thinking something about collation and locales but
I'm sure sure I understand them myself.

I have updated the FAQ to handle three of the items you mentioned. In
one case, I added a new FAQ entry (double-quoting identifiers with a
link to our docs), and in two other cases (indexing long columns,
case-insensitive columns) I added to existing FAQ items where
appropriate. Patch attached and applied.

For the batch job and single-CPU issues, they did not fit into existing
FAQ entries, and I am not sure they are asked enough to be added as
FAQs. I am interested to hear other's opinions on this.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+34-11
#9Dan Armbrust
daniel.armbrust.list@gmail.com
In reply to: Bruce Momjian (#8)
Re: 5 new entries for FAQ

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Bruce Momjian wrote:
<blockquote cite="mid200508101933.j7AJXGU12502@candle.pha.pa.us"
type="cite"><br>
<pre wrap=""><!---->
I have updated the FAQ to handle three of the items you mentioned. In
one case, I added a new FAQ entry (double-quoting identifiers with a
link to our docs), and in two other cases (indexing long columns,
case-insensitive columns) I added to existing FAQ items where
appropriate. Patch attached and applied.

For the batch job and single-CPU issues, they did not fit into existing
FAQ entries, and I am not sure they are asked enough to be added as
FAQs.  I am interested to hear other's opinions on this.
  </pre>
</blockquote>
<blockquote type="cite">
  <pre wrap="">***************
*** 613,618 ****
--- 617,628 ----
      &lt;P&gt;The maximum table size and maximum number of columns can be
      quadrupled by increasing the default block size to 32k.&lt;/P&gt;
+     &lt;P&gt;One limitation is that indexes can not be created on columns
+     longer than about 2,000 characters. Fortunately, such indexes are
+     rarely needed. Uniqueness is best guaranteed using another column
+     that is an MD5 hash of the long column, and full text indexing
+     allows for searching of words within the column.&lt;/P&gt;
+ 
      &lt;H3&gt;&lt;A name="4.5"&gt;4.5&lt;/A&gt;) How much database disk space is required
      to store data from a typical text file?&lt;/H3&gt;</pre>
</blockquote>
<blockquote cite="mid200508101933.j7AJXGU12502@candle.pha.pa.us"
 type="cite">
  <pre wrap=""><hr size="4" width="90%">
  </pre>
</blockquote>
I liked the FAQ entry written up by the original submitter much better,
WRT to the long index issue.&nbsp; This write up does not contain the actual
error message encountered, so its not going to be found by someone
looking for a solution to the problem.&nbsp; It doesn't contain the optional
workaround, and it doesn't have a link into the full text searching
features as the recommended fix.&nbsp; I was one of the more recent people
to encounter this problem, and I don't think that this FAQ would have
helped me (if I even saw it, because google certainly won't pick it up
in a way that most people will search when the encounter the issue -
they are going to put in the error message)<br>
<br>
Dan<br>
<pre class="moz-signature" cols="72">-- 
****************************
Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
<a class="moz-txt-link-freetext" href="http://informatics.mayo.edu/">http://informatics.mayo.edu/</a>
</pre>
</body>
</html>
#10Bruce Momjian
bruce@momjian.us
In reply to: Dan Armbrust (#9)
Re: 5 new entries for FAQ

Dan Armbrust wrote:

I liked the FAQ entry written up by the original submitter much better,
WRT to the long index issue. This write up does not contain the actual
error message encountered, so its not going to be found by someone
looking for a solution to the problem. It doesn't contain the optional
workaround, and it doesn't have a link into the full text searching
features as the recommended fix. I was one of the more recent people
to encounter this problem, and I don't think that this FAQ would have
helped me (if I even saw it, because google certainly won't pick it up
in a way that most people will search when the encounter the issue -
they are going to put in the error message)
Dan

True, but we don't have an FAQ that hits every single problem users will
encounter. We try to make the FAQ concise so most people will read all
the items. If the item come up more often, we will consider making it
more prominent.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#11Martijn van Oosterhout
kleptog@svana.org
In reply to: Bruce Momjian (#8)
Re: 5 new entries for FAQ

On Wed, Aug 10, 2005 at 03:33:16PM -0400, Bruce Momjian wrote:

For the batch job and single-CPU issues, they did not fit into existing
FAQ entries, and I am not sure they are asked enough to be added as
FAQs. I am interested to hear other's opinions on this.

Maybe, just looking through my email and my memories they've been a few
times. How often a question needs to be asked before putting it in the
FAQ is easier than answering it each time, well, that's a matter of
debate.

The other extreme is the Exim FAQ which is huge, but it has answered
every question I've ever asked. Not sure if that's a goal though.
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.

#12Bruce Momjian
bruce@momjian.us
In reply to: Martijn van Oosterhout (#11)
Re: 5 new entries for FAQ

pgman wrote:

Dan Armbrust wrote:

I liked the FAQ entry written up by the original submitter much better,
WRT to the long index issue. This write up does not contain the actual
error message encountered, so its not going to be found by someone
looking for a solution to the problem. It doesn't contain the optional
workaround, and it doesn't have a link into the full text searching
features as the recommended fix. I was one of the more recent people
to encounter this problem, and I don't think that this FAQ would have
helped me (if I even saw it, because google certainly won't pick it up
in a way that most people will search when the encounter the issue -
they are going to put in the error message)
Dan

True, but we don't have an FAQ that hits every single problem users will
encounter. We try to make the FAQ concise so most people will read all
the items. If the item come up more often, we will consider making it
more prominent.

I thought again about your issue and I now remember the proper way to
help users in this case is to improve the error message. I have added a
"hint" message for the case of indexing large values, patch attached.

[ Sorry about a patch to general but it seems necessary in this case.]

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+16-16
#13Tino Wildenhain
tino@wildenhain.de
In reply to: Bruce Momjian (#12)
Re: 5 new entries for FAQ

Am Mittwoch, den 10.08.2005, 17:38 -0400 schrieb Bruce Momjian:

"Consider a separate column containing an MD5 hash of the value\n"

wouldnt a functional index over md5 hash of the original value
be a bit better?

#14Bruce Momjian
bruce@momjian.us
In reply to: Tino Wildenhain (#13)
Re: 5 new entries for FAQ

Tino Wildenhain wrote:

Am Mittwoch, den 10.08.2005, 17:38 -0400 schrieb Bruce Momjian:

"Consider a separate column containing an MD5 hash of the value\n"

wouldnt a functional index over md5 hash of the original value
be a bit better?

Yes, good point. Let me adjust the text.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#15Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Martijn van Oosterhout (#11)
Re: 5 new entries for FAQ

On Wed, Aug 10, 2005 at 11:22:58PM +0200, Martijn van Oosterhout wrote:

On Wed, Aug 10, 2005 at 03:33:16PM -0400, Bruce Momjian wrote:

For the batch job and single-CPU issues, they did not fit into existing
FAQ entries, and I am not sure they are asked enough to be added as
FAQs. I am interested to hear other's opinions on this.

Maybe, just looking through my email and my memories they've been a few
times. How often a question needs to be asked before putting it in the
FAQ is easier than answering it each time, well, that's a matter of
debate.

The other extreme is the Exim FAQ which is huge, but it has answered
every question I've ever asked. Not sure if that's a goal though.

My experience is that long FAQ's are fine, so long as they're easy to
search through. This means you've got to support users who may not know
the magic word to search on. A good example is finding the limits for
how many rows in a table; searching on limit gets you nothing.

The alternative is to make it very easy for users to skim through the
TOC to find what they need. Right now that's not very easy to do because
2 of the catagories are over 9 items long (humans deal with info best in
chunks of 5-9 items; most people do best with 7 items or less).
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com 512-569-9461

#16Martijn van Oosterhout
kleptog@svana.org
In reply to: Jim Nasby (#15)
Re: 5 new entries for FAQ

On Tue, Aug 16, 2005 at 01:20:29AM -0500, Jim C. Nasby wrote:

My experience is that long FAQ's are fine, so long as they're easy to
search through. This means you've got to support users who may not know
the magic word to search on. A good example is finding the limits for
how many rows in a table; searching on limit gets you nothing.

But searching for limit works depending on you search engine, since the
word "limits" appears once. Maybe it's planning or just luck but the
Exim FAQ [1]http://www.exim.org/exim-html-4.30/doc/html/FAQ.html has always had the question exactly the way I phrased it,
which means even though it has hundreds of questions, it works.

I think the trick is to:
- Include relevent keywords: error messages, config options, command names
- State the question multiple ways if there's no obvious best

The alternative is to make it very easy for users to skim through the
TOC to find what they need. Right now that's not very easy to do because
2 of the catagories are over 9 items long (humans deal with info best in
chunks of 5-9 items; most people do best with 7 items or less).

I imagine that perhaps what is needed is a database that has (at least)
a reference to every single possible error message and what it means. I
guess you could call it a "knowledgebase" and there'd be no reason to
keep it small.

I was thinking of more categories, but whatever you do it would make
the FAQ a lot bigger which appears not to be the goal. Although I admit
to reading large chunks of the Exim FAQ because it is full of examples,
just to get a feel of what's possible.

Anyway, I dropped my patch, it's still in the archive and hopefully
this thread has created a enough links to make google take notice. Some
questions now have this patch in the search result so perhaps things
are working as intended.

[1]: http://www.exim.org/exim-html-4.30/doc/html/FAQ.html

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.