Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Sandeep Srinivasa
On Sat, Aug 7, 2010 at 12:29 AM, Joshua J. Kugler wrote: > > So, a "getting started" guide and/or cookbook would be great. Another > cool idea: a MySQL -> PostgreSQL migration guide (I'm sure there's > already one out there) that would show "To do *this* MySQL function in > PostgreSQL, use this f

[GENERAL] Foreign keys and permissions oddity

2010-08-06 Thread Joshua Tolley
Is there some justification for this behavior that I should know already? It seemed awfully strange when some folkds here stumbled on it: $ create user a; $ create user b; $ commit; $ \c - a $ create table foo (id integer primary key); $ revoke all on foo from a; $ grant all on foo to b; $ commit;

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Joshua J. Kugler
On Friday 06 August 2010, Scott Marlowe elucidated thus: > >> Everyone of my trainees want such thing - for databases, for other > >> programming-languages etc. It's the worst thing you can give them. > >> The< will copy, they will paste and they will understand nothing. > >> Learning is the way to

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Raymond O'Donnell
On 06/08/2010 21:15, Peter Bex wrote: On Fri, Aug 06, 2010 at 02:09:43PM -0600, Scott Marlowe wrote: I'm all in favor of a nice tutorial section in the docs. But I certainly don't want pgsql docs to mimick the mysql docs method of using a tutorial method for most of the beginner information. I

Re: [GENERAL] Question about Idle in TX

2010-08-06 Thread David Kerr
On Tue, Aug 03, 2010 at 03:57:27PM -0400, Tom Lane wrote: - David Kerr writes: - > On Tue, Aug 03, 2010 at 03:49:57PM -0400, Tom Lane wrote: - > - In recent versions of PG, no. Before about 8.3 it was a Really Bad Idea, - > - because the open transaction would prevent VACUUM from reclaiming stora

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Scott Marlowe
On Fri, Aug 6, 2010 at 2:30 PM, Peter Bex wrote: > On Fri, Aug 06, 2010 at 02:25:27PM -0600, Scott Marlowe wrote: >> For an extra added bonus, show a click-path from the front page >> mysql.com to the documentation.  I gave up and just entered >> mysql.com/documentation which kicked off the search

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Peter Bex
On Fri, Aug 06, 2010 at 02:25:27PM -0600, Scott Marlowe wrote: > For an extra added bonus, show a click-path from the front page > mysql.com to the documentation. I gave up and just entered > mysql.com/documentation which kicked off the search engine and let me > click somewhere into the 5.1 docs.

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Scott Marlowe
On Fri, Aug 6, 2010 at 2:15 PM, Peter Bex wrote: > On Fri, Aug 06, 2010 at 02:09:43PM -0600, Scott Marlowe wrote: >> I'm all in favor of a nice tutorial section in the docs.  But I >> certainly don't want pgsql docs to mimick the mysql docs method of >> using a tutorial method for most of the begi

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread John Gage
In my fondest moments, I consider myself a nerd, and when I do I think I am completely cool. On Aug 6, 2010, at 9:38 PM, zach cruise wrote: john, you're running up against a culture here, and trying to answer the question: how to make a nerd cool? answer: it can't be done. -- Sent via pgsql-

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Peter Bex
On Fri, Aug 06, 2010 at 02:09:43PM -0600, Scott Marlowe wrote: > I'm all in favor of a nice tutorial section in the docs. But I > certainly don't want pgsql docs to mimick the mysql docs method of > using a tutorial method for most of the beginner information. It's so > dang hard to find anything

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Scott Marlowe
On Fri, Aug 6, 2010 at 1:38 PM, zach cruise wrote: > john, you're running up against a culture here, and trying to answer > the question: how to make a nerd cool? answer: it can't be done. I'm all in favor of a nice tutorial section in the docs. But I certainly don't want pgsql docs to mimick th

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread zach cruise
john, you're running up against a culture here, and trying to answer the question: how to make a nerd cool? answer: it can't be done. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Scott Marlowe
On Fri, Aug 6, 2010 at 11:02 AM, Scott Frankel wrote: > > On Aug 6, 2010, at 6:13 AM, Torsten Zühlsdorff wrote: > >> John Gage schrieb: >> >>> On reflection, I think what is needed is a handbook that features cut and >>> paste code to do the things with Postgres that people do today with MySQL. >>

Re: [GENERAL] Need help understanding vacuum verbose output

2010-08-06 Thread Gordon Shannon
> That last message prints tups_vacuumed, but those other ones are counting > all the removed item pointers. So apparently Gordon had a whole lot of > pre-existing DEAD item pointers. I wonder why ... Perhaps this will help. Here's the entire test. Start with a newly loaded table with 5,063,4

Re: [GENERAL] Unable to stop postgresql ("failed") -> [SOLVED]

2010-08-06 Thread Tom Lane
Thom Brown writes: > On 6 August 2010 17:49, Denis BUCHER wrote: >> I was unable to stop postgres, I always got "[FAILED] : >>  * /etc/init.d/postgresql stop >>  * service postgresql stop >>  * /sbin/service postgresql stop > Surely it depends what the packager put into the init.d script? Plus

Re: [GENERAL] Unable to stop postgresql ("failed") -> [SOLVED]

2010-08-06 Thread Thom Brown
On 6 August 2010 17:49, Denis BUCHER wrote: > Dear all, > > For once, I will simply publish a solution instead of asking a question. > Let's hope it will be useful to someone. > > I was unable to stop postgres, I always got "[FAILED] : >  * /etc/init.d/postgresql stop >  * service postgresql stop

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Scott Frankel
On Aug 6, 2010, at 6:13 AM, Torsten Zühlsdorff wrote: John Gage schrieb: On reflection, I think what is needed is a handbook that features cut and paste code to do the things with Postgres that people do today with MySQL. Everyone of my trainees want such thing - for databases, for other

[GENERAL] Unable to stop postgresql ("failed") -> [SOLVED]

2010-08-06 Thread Denis BUCHER
Dear all, For once, I will simply publish a solution instead of asking a question. Let's hope it will be useful to someone. I was unable to stop postgres, I always got "[FAILED] : * /etc/init.d/postgresql stop * service postgresql stop * /sbin/service postgresql stop The only solution that

Re: [GENERAL] Need help understanding vacuum verbose output

2010-08-06 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Brad Nicholson's message of vie ago 06 12:01:27 -0400 2010: >> It found 45878 dead tuples in 396 pages for the index authors_archive_pkey. >> It found 16558 dead tuples in 492 pages for the table authors_archive. > But why did it choose to skip the rest of t

Re: [GENERAL] Need help understanding vacuum verbose output

2010-08-06 Thread Gordon Shannon
Yes, and also from the original post: > 3 INFO: scanned index "authors_archive_pkey" to remove 45878 row > versions > 4 DETAIL: CPU 0.05s/0.34u sec elapsed 0.41 sec. > 5 INFO: "authors_archive": removed 45878 row versions in 396 pages > 6 DETAIL: CPU 0.00s/0.00u sec elapsed 0.00 sec. Lin

Re: [GENERAL] Need help understanding vacuum verbose output

2010-08-06 Thread Alvaro Herrera
Excerpts from Brad Nicholson's message of vie ago 06 12:01:27 -0400 2010: > On 10-08-06 11:45 AM, Gordon Shannon wrote: > > OK, so if it knew that all vacuumable tuples could be found in 492 pages, > > and > > it scanned only those pages, then how could it be that it reports 16558 > > removable

Re: [GENERAL] Need help understanding vacuum verbose output

2010-08-06 Thread Brad Nicholson
On 10-08-06 11:45 AM, Gordon Shannon wrote: OK, so if it knew that all vacuumable tuples could be found in 492 pages, and it scanned only those pages, then how could it be that it reports 16558 removable tuples from those 492 pages, when it has already reported earlier that it removed 45878 tupl

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread John Gage
I would also enquire whether one thinks that the examples should be removed from the Postgres documentation for fear that they may be cut and pasted into an application? John On Aug 6, 2010, at 3:13 PM, Torsten Zühlsdorff wrote: John Gage schrieb: On reflection, I think what is needed is

Re: [GENERAL] Need help understanding vacuum verbose output

2010-08-06 Thread Gordon Shannon
OK, so if it knew that all vacuumable tuples could be found in 492 pages, and it scanned only those pages, then how could it be that it reports 16558 removable tuples from those 492 pages, when it has already reported earlier that it removed 45878 tuples -- a number we know in fact to be correct?

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread John Gage
If I recall correctly William Shakespeare did a ton of cutting and pasting. And he was not alone. My Fair Lady, one of the most successful Broadway shows ever, contains whole sections from Shaw's play. We learn by imitation. I am not suggesting that once you cut and paste you call it q

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread John Gage
I only said this to criticize it. And I agree completely with Thomas. John On Aug 6, 2010, at 2:09 PM, Thomas Kellerer wrote: John Gage wrote on 06.08.2010 04:41: But most people, including myself, don't even want to know the documentation exists (for anything). We just want to plunge in an

Re: [GENERAL] Partitioning into thousands of tables?

2010-08-06 Thread Tom Lane
Joshua Tolley writes: > On Fri, Aug 06, 2010 at 03:10:30PM +1000, Data Growth Pty Ltd wrote: >> Is there any significant performance problem associated with partitioning >> a table into 2500 sub-tables? I realise a table scan would be horrendous, >> but what if all accesses specified the partitio

Re: [GENERAL] Partitioning into thousands of tables?

2010-08-06 Thread Joshua Tolley
On Fri, Aug 06, 2010 at 03:10:30PM +1000, Data Growth Pty Ltd wrote: >Is there any significant performance problem associated with partitioning >a table into 2500 sub-tables? I realise a table scan would be horrendous, >but what if all accesses specified the partitioning criteria "sid"

Re: [GENERAL]

2010-08-06 Thread Tom Lane
Scott Marlowe writes: > On Thu, Aug 5, 2010 at 10:00 PM, andi astowo wrote: >> We are sorry but our Postgre 8.3 is bundled with our new RHEL 5. Say what? Red Hat has never shipped Postgres 8.3 in RHEL. Currently you can get 8.1 or 8.4 in RHEL-5 (and I'd definitely recommend using 8.4).

Re: [GENERAL] Could you teach me, How can we specify password when using psql....

2010-08-06 Thread Tom Lane
David Fetter writes: > On Fri, Aug 06, 2010 at 01:35:58PM +0900, 노현석 wrote: >> when using oracle sqlplus.. we can specify password. >> $ sqlplus system/manager >> >> Could you teach me, How can we specify password when using psql >> $ psql -p 5432 -h rac2 -d mydb -U hsnoh >> Password f

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Torsten Zühlsdorff
John Gage schrieb: On reflection, I think what is needed is a handbook that features cut and paste code to do the things with Postgres that people do today with MySQL. Everyone of my trainees want such thing - for databases, for other programming-languages etc. It's the worst thing you can g

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread John Gage
On reflection, I think what is needed is a handbook that features cut and paste code to do the things with Postgres that people do today with MySQL. Such a handbook, featured as the first section of the documentation, would take readers through the steps necessary to set up an online shop

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Thomas Kellerer
John Gage wrote on 06.08.2010 04:41: But most people, including myself, don't even want to know the documentation exists (for anything). We just want to plunge in and do it. That just doesn't work and is an attitude that won't get you far. In order to do things properly you need to learn and u

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Phillip Smith
On 6 August 2010 16:08, Torsten Zühlsdorff wrote: > > I receive my "oh wow" when i do the same things in Postgres like in MySQL: > Writting some procedures, triggers and use foreign key. The "oh wow" was > that it just *works*. After some years of using MySQL this is a very > uncommon feeling, ev

Re: [GENERAL] Application name and psql in 9.0

2010-08-06 Thread Devrim GÜNDÜZ
On Fri, 2010-08-06 at 14:49 +0900, Fujii Masao wrote: > > Why can't I see psql there? Is it just because that logging is > performed > > just before detecting application name? > > Yes. The backend checks whether target database exists, before > processing application name. Thanks. Regards, --

Re: [GENERAL]

2010-08-06 Thread Scott Marlowe
On Thu, Aug 5, 2010 at 10:00 PM, andi astowo wrote: > Well, that's a pretty big step up.  Are you running 7.0, 7.1, 7.2, > 7.3, or 7.4?  Do you want to go to 8.0, 8.1, 8.2, 8.3 or 8.4? > > We are running at 7.1 and to go to 8.3. > > The normally recommended procedure is to bring up a new machine w

Re: [GENERAL] MySQL versus Postgres

2010-08-06 Thread Torsten Zühlsdorff
John Gage schrieb: So, perhaps what is needed in any sort of battle with MySQL is an introductory documentation that gives specific examples of how to achieve "oh wow!" worthwhile results quickly with Postgres. I receive my "oh wow" when i do the same things in Postgres like in MySQL: Writti