doc typo sql-reindex.html psql vs. postgres

Started by Janning Vygenover 20 years ago6 messagesgeneral
Jump to latest
#1Janning Vygen
vygen@gmx.de

At

http://www.postgresql.org/docs/8.0/static/sql-reindex.html

it says:

Rebuild all system indexes in a particular database,
without trusting them to be valid already:

$ export PGOPTIONS="-P"
$ psql broken_db

It should be:

Rebuild all system indexes in a particular database,
without trusting them to be valid already:

$ export PGOPTIONS="-P"
$ postgres broken_db
^^^^^^^^
,shouldn't it?

kind regards,
janning

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Janning Vygen (#1)
Re: doc typo sql-reindex.html psql vs. postgres

Janning Vygen <vygen@gmx.de> writes:

At
http://www.postgresql.org/docs/8.0/static/sql-reindex.html

it says:

Rebuild all system indexes in a particular database,
without trusting them to be valid already:

$ export PGOPTIONS="-P"
$ psql broken_db

It should be:

Rebuild all system indexes in a particular database,
without trusting them to be valid already:

$ export PGOPTIONS="-P"
$ postgres broken_db
^^^^^^^^
,shouldn't it?

No, it's correct as it stands. You used to need a standalone backend
for that, but not anymore. (PGOPTIONS isn't recognized by a standalone
backend anyway, IIRC, so there would be more wrong with the example than
that if it were wrong.)

regards, tom lane

#3Janning Vygen
vygen@gmx.de
In reply to: Tom Lane (#2)
Re: doc typo sql-reindex.html psql vs. postgres

Am Donnerstag, 20. Oktober 2005 16:04 schrieb Tom Lane:

Janning Vygen <vygen@gmx.de> writes:

it says:
$ export PGOPTIONS="-P"
$ psql broken_db

It should be:
$ export PGOPTIONS="-P"
$ postgres broken_db

No, it's correct as it stands. You used to need a standalone backend
for that, but not anymore. (PGOPTIONS isn't recognized by a standalone
backend anyway, IIRC, so there would be more wrong with the example than
that if it were wrong.)

ok, sorry. I had some corrupted indexes and just did
$ postgres -P broken_db
and got a shell to send
$ REINDEX DATATBASE broken_db
as far as i can remember, so i thought i could throw in my two cents to
improve postgresql.

By the way: What i really miss is a troubleshooting document in the docs. I
run postgresql for over 4 years now and i have come across many situations
where i really would need something like this. You can find most solutions by
reading the documentation entirely but it is not very helpful if your
production database went wrong and you are quite a bit in a hurry.

kind regards,
janning

#4David Fetter
david@fetter.org
In reply to: Janning Vygen (#3)
Re: doc typo sql-reindex.html psql vs. postgres

On Thu, Oct 20, 2005 at 06:04:53PM +0200, Janning Vygen wrote:

By the way: What i really miss is a troubleshooting document in the
docs. I run postgresql for over 4 years now and i have come across
many situations where i really would need something like this. You
can find most solutions by reading the documentation entirely but it
is not very helpful if your production database went wrong and you
are quite a bit in a hurry.

That's a great idea. Please post a doc patch with some of the
troubleshooting tips you have in mind :)

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

#5Janning Vygen
vygen@gmx.de
In reply to: David Fetter (#4)
Re: doc typo sql-reindex.html psql vs. postgres

Am Donnerstag, 20. Oktober 2005 19:59 schrieb David Fetter:

On Thu, Oct 20, 2005 at 06:04:53PM +0200, Janning Vygen wrote:

By the way: What i really miss is a troubleshooting document in the
docs.

That's a great idea. Please post a doc patch with some of the
troubleshooting tips you have in mind :)

Hi David,

I really would like to start it! Two reasons for me not to do it: I don't
speak english very well, technical writing is even worse as my native
language is german. Second: i have experience with postgresql for 5 years,
but i don't think i have enough technical background for writing articles
about troubleshooting. If it still makes sense to start, i will!

But there is much more than troubleshooting what i miss. PostgreSQL was my
first use of any SQL Database, so i have come across many problems an read
the documentation many times. There is a lot of information, but some of the
excellent features of PostgreSQL are hidden. Look at the relevant sections
for UPDATE statement.

http://www.postgresql.org/docs/8.0/interactive/tutorial-update.html
http://www.postgresql.org/docs/8.0/interactive/dml-update.html
http://www.postgresql.org/docs/8.0/interactive/sql-update.html

The UPDATE statement is so powerful in Postgresql, but it is only mentioned in
the reference that you can use a from list. But it doesn't show up with any
examples of some more complicated UPDATE statements. Of course, people coming
from Oracle might know it. But there should be more stuff for people coming
from mysql or from nowhere (like me). BTW: Reference Documentation of UPDATE
should mention that you can't do a relational UPDATE like "UPDATE tableA SET
id = id + 1;" if id is a primary key (in relational theory it should work!)

Another point:
the interactive mode looses information between versions. In 7.3 there were
some user contributed notes:
http://www.postgresql.org/docs/7.3/interactive/sql-update.html
in 7.4 and 8.0 they are gone. As i use a lot of PHP i can tell you that user
contributed notes are great. They are sometimes wrong, sometimes misleading,
but always helps you to see, what problems other people had.

I think that postgresql needs much docs and articles, how-tos and
tipps&tricks. (really great stuff is at
http://www.varlena.com/varlena/GeneralBits/ and techdocs has more links to
great stuff but it is all scattered on many places.

Maybe something like a Wiki would help with Sections about:

- Troubleshooting
- Examples
- Howtos
- Technical articels
- FAQ
- Postgresql GUI clients
- High availability

I would like to help as far as i can: starting with troubleshooting,
installing and maintaining a wiki, collecting information. As you are more
experienced, give me a hint what to do first if i can help at all.

kind regards,
Janning

#6Martijn van Oosterhout
kleptog@svana.org
In reply to: Janning Vygen (#5)
Re: doc typo sql-reindex.html psql vs. postgres

On Fri, Oct 21, 2005 at 11:41:15AM +0200, Janning Vygen wrote:

I really would like to start it! Two reasons for me not to do it: I don't
speak english very well, technical writing is even worse as my native
language is german. Second: i have experience with postgresql for 5 years,
but i don't think i have enough technical background for writing articles
about troubleshooting. If it still makes sense to start, i will!

Just do it. Seriously. Anybody can fix grammer/spelling/style at
anytime in the future. But actual documentation for actual topics is
worth its weight in gold, even if someone else needs to tweak it
afterwards...

We need tutorials aimed at all levels. There has been discussion about
a document which lists all the error messages and what they mean. Any
documentation is good.

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.