Re: PG vs MySQL

Lists: pgsql-general
From: Alex <alex(at)meerkatsoft(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Running multiple databases PG vs MySQL
Date: 2004-03-28 05:24:15
Message-ID: 4066617F.4080207@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,
what is the recommended way to run multiple databases under postgres.

In MySQL it is rather simple to give different users or websites their
own database with all the access rights.

Any suggestion or links to documents are highly appreciated.

Alex


From: Frank Finner <postgresql(at)finner(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Running multiple databases PG vs MySQL
Date: 2004-03-28 07:14:50
Message-ID: 20040328091451.1c569088.postgresql@finner.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Sun, 28 Mar 2004 14:24:15 +0900 Alex <alex(at)meerkatsoft(dot)com> sat down, thought long and then
wrote:

> Hi,
> what is the recommended way to run multiple databases under postgres.
>
> In MySQL it is rather simple to give different users or websites their
> own database with all the access rights.
>
> Any suggestion or links to documents are highly appreciated.
>
> Alex
>
>

If you call "createdb -?" within a shell you will get the following:

---
createdb creates a PostgreSQL database.

Usage:
createdb [OPTION]... [DBNAME] [DESCRIPTION]

Options:
-D, --location=PATH alternative place to store the database
-E, --encoding=ENCODING encoding for the database
-O, --owner=OWNER database user to own the new database
-T, --template=TEMPLATE template database to copy
-e, --echo show the commands being sent to the server
-q, --quiet don't write any messages
--help show this help, then exit
--version output version information, then exit

Connection options:
-h, --host=HOSTNAME database server host or socket directory
-p, --port=PORT database server port
-U, --username=USERNAME user name to connect as
-W, --password prompt for password

By default, a database with the same name as the current user is created.

Report bugs to <pgsql-bugs(at)postgresql(dot)org>.
---

So, to create a database from shell, you have to call
"createdb -O <valid database user> <databasename>". You should do this as valid database superuser
who may add databases!

Another way is to connect to template1 as the future owner:
"psql template1 <valid database user>"
and create the database with "CREATE DATABASE <databasename>...". Every valid user may connect to
template1. You don´t need to use psql, this works for example also with PgAdmin, it´s even simpler
because you don´t need to remember the syntax, just click around.

Of course, the <valid database user> must be enabled to create databases, therefore it must have
been created either by calling "createuser -d <valid database user> ..." or with an appropriate SQL
command "CREATE USER <valid database user> ... CREATEDB" by a database superuser, or again with a
tool like PgAdmin.

BTW: Why do so many people comparisons with MySQL syntax during the last days? "MySQL can do this,
in MySQL I can do this that way" and so on. Next time I´ d like to read something like "In DB2 I can
simply add a database by whatever." or "With MS-SQL-Server you just have to do the following 32
steps to create a backup.". :-)

Who cares about how something works in MySQL? They are NOT the providers of a standard everybody has
to use!

Regards, Frank.


From: Alex <alex(at)meerkatsoft(dot)com>
To: Frank Finner <postgresql(at)finner(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 02:06:10
Message-ID: 40678492.90406@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Frank,
pls. apologize. Maybe my description was not so clear. What I was
referring to was the fact that under MySQL you have more freedom to give
individual users of a shared server rights to create and manage their
databases In addition all databases are kept in separate directories
unlike postgres.

As a server administrator, this make life simpler and you dont need to
worry about other users messing around outside their designated environment.

I guess one reason users compare MySQL with Postgres is that they see
the benefits of postgres and intend to switch or at least look into it,
but at the same time they dont want to compromise when it comes to ease
of use and administration.
MySQL is still the default database offered by any web hosting company
and if Postgres wants to become the designated db engine for these
services or become the worlds no.1 open source db then i think lots of
things need to be done. Take for example the admin interface (MySQL
Administrator) for MySQL which is done very professionally or the ease
of setting up Replication. Postgres still is quite far behind there and
for normal users that know MySQL best the transition is probably a too
big step and risk.

But then again, it might not be the aim of postgres to become that no1
open source db and part of every web hosting environment. Instead rather
to be an alternative for the serious databases for corporate use.

Might actually quite interesting to start a discussion on this topic
here :-)

Cheers
Alex

Frank Finner wrote:

>On Sun, 28 Mar 2004 14:24:15 +0900 Alex <alex(at)meerkatsoft(dot)com> sat down, thought long and then
>wrote:
>
>
>
>>Hi,
>>what is the recommended way to run multiple databases under postgres.
>>
>>In MySQL it is rather simple to give different users or websites their
>>own database with all the access rights.
>>
>>Any suggestion or links to documents are highly appreciated.
>>
>>Alex
>>
>>
>>
>>
>
>If you call "createdb -?" within a shell you will get the following:
>
>---
>createdb creates a PostgreSQL database.
>
>Usage:
> createdb [OPTION]... [DBNAME] [DESCRIPTION]
>
>Options:
> -D, --location=PATH alternative place to store the database
> -E, --encoding=ENCODING encoding for the database
> -O, --owner=OWNER database user to own the new database
> -T, --template=TEMPLATE template database to copy
> -e, --echo show the commands being sent to the server
> -q, --quiet don't write any messages
> --help show this help, then exit
> --version output version information, then exit
>
>Connection options:
> -h, --host=HOSTNAME database server host or socket directory
> -p, --port=PORT database server port
> -U, --username=USERNAME user name to connect as
> -W, --password prompt for password
>
>By default, a database with the same name as the current user is created.
>
>Report bugs to <pgsql-bugs(at)postgresql(dot)org>.
>---
>
>So, to create a database from shell, you have to call
>"createdb -O <valid database user> <databasename>". You should do this as valid database superuser
>who may add databases!
>
>Another way is to connect to template1 as the future owner:
>"psql template1 <valid database user>"
>and create the database with "CREATE DATABASE <databasename>...". Every valid user may connect to
>template1. You don´t need to use psql, this works for example also with PgAdmin, it´s even simpler
>because you don´t need to remember the syntax, just click around.
>
>Of course, the <valid database user> must be enabled to create databases, therefore it must have
>been created either by calling "createuser -d <valid database user> ..." or with an appropriate SQL
>command "CREATE USER <valid database user> ... CREATEDB" by a database superuser, or again with a
>tool like PgAdmin.
>
>BTW: Why do so many people comparisons with MySQL syntax during the last days? "MySQL can do this,
>in MySQL I can do this that way" and so on. Next time I´ d like to read something like "In DB2 I can
>simply add a database by whatever." or "With MS-SQL-Server you just have to do the following 32
>steps to create a backup.". :-)
>
>Who cares about how something works in MySQL? They are NOT the providers of a standard everybody has
>to use!
>
>Regards, Frank.
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
>


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 02:33:09
Message-ID: 20040328222833.N51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Alex wrote:

> Frank,
> pls. apologize. Maybe my description was not so clear. What I was
> referring to was the fact that under MySQL you have more freedom to give
> individual users of a shared server rights to create and manage their
> databases In addition all databases are kept in separate directories
> unlike postgres.

Huh? Each database under PostgreSQL is kept under a seperate directory on
the server ... always has been that way ..

As to the ability to create/manage their own databases .. pls elaborate on
what issues you've had with this under PostgreSQL, as its a simple ALTER
command to provide a user with both CREATE USER and/or CREATE DATABASE
permisisons ...

> MySQL is still the default database offered by any web hosting company

No it isn't ... I can name three companies that offer PostgreSQL as a
primary database, and at least one of them only has MySQL as a means to do
migrations ... and those are just the ones that I know personally ...

> and if Postgres wants to become the designated db engine for these
> services or become the worlds no.1 open source db then i think lots of
> things need to be done. Take for example the admin interface (MySQL
> Administrator) for MySQL which is done very professionally or the ease

Please provide some examples .. I know any attempt I've made to do
adminstrative stuff under MySQL has ended in a headache, but I've been
using PostgreSQL for almost a decade now, so I find PostgreSQL the easier
of the two ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: scrappy(at)postgresql(dot)org (Marc G(dot) Fournier)
Cc: alex(at)meerkatsoft(dot)com (Alex), postgresql(at)finner(dot)de (Frank Finner), pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 04:10:57
Message-ID: 200403290410.i2T4Awjx005166@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> Huh? Each database under PostgreSQL is kept under a seperate directory on
> the server ... always has been that way ..

Perhaps, but it isn't obvious which directory has which database. I'm not
not sure which system catalogs provide that information, something that
wasn't obvious from the online docs, either.

> As to the ability to create/manage their own databases .. pls elaborate on
> what issues you've had with this under PostgreSQL, as its a simple ALTER
> command to provide a user with both CREATE USER and/or CREATE DATABASE
> permisisons ...

One of the big differences I see from the perspective of the DBA at an
ISP is that MySQL has better user/customer isolation. This means
that customer A should not be able to learn ANYTHING about customer
B's database, not even that it exists.

The \l command should only list databases that the current user is
authorized for, the \du command should only list users authorized for
the current database (and perhaps only superusers should get even that
much information), etc. Perhaps it is possible to set PG to do this,
but that should probably be the default.
--
Mike Nolan


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 04:24:31
Message-ID: 20040329002058.E51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Sun, 28 Mar 2004, Mike Nolan wrote:

> > Huh? Each database under PostgreSQL is kept under a seperate directory on
> > the server ... always has been that way ..
>
> Perhaps, but it isn't obvious which directory has which database. I'm not
> not sure which system catalogs provide that information, something that
> wasn't obvious from the online docs, either.

SELECT oid FROM pg_database WHERE datname = '<database>';

or use the oid2name program that is in contrib ...

> The \l command should only list databases that the current user is
> authorized for, the \du command should only list users authorized for
> the current database (and perhaps only superusers should get even that
> much information), etc. Perhaps it is possible to set PG to do this,
> but that should probably be the default.

Now, those are good points, and I agree ... only pg-superuse should be
able to see all databases ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 04:30:24
Message-ID: 20040329002838.C51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Sun, 28 Mar 2004, Mike Nolan wrote:

> The \l command should only list databases that the current user is
> authorized for, the \du command should only list users authorized for
> the current database (and perhaps only superusers should get even that
> much information), etc. Perhaps it is possible to set PG to do this,
> but that should probably be the default.

Just curious ... restricting \l itself isn't too difficult ... but how
does MySQL restrict the ability to do something like:

SELECT datname FROM pg_database;

or does it not have an equivalent to that?

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>
To: Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 04:32:56
Message-ID: 200403282032.57067.uwe@oss4u.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 28 March 2004 06:06 pm, Alex wrote:
> Frank,
> pls. apologize. Maybe my description was not so clear. What I was
> referring to was the fact that under MySQL you have more freedom to give
> individual users of a shared server rights to create and manage their
> databases In addition all databases are kept in separate directories
> unlike postgres.
>
> As a server administrator, this make life simpler and you dont need to
> worry about other users messing around outside their designated
> environment.

Given, MySQL is "easier" to administrate - at least on the first glance. But
so is MS Access :-)
Personally I found the whole access rights table in MySQL a pain in the butt,
but maybe that's just me.
The point is, that MySQL is easier to set up in a shared webhosting
environment, however looking at quite some of the "professional" hosters, one
has full access to everyone's database, so it obviously isn't that easy after
all...

> I guess one reason users compare MySQL with Postgres is that they see
> the benefits of postgres and intend to switch or at least look into it,
> but at the same time they dont want to compromise when it comes to ease
> of use and administration.

Severly at the cost of data integrity.

> MySQL is still the default database offered by any web hosting company
> and if Postgres wants to become the designated db engine for these
> services or become the worlds no.1 open source db then i think lots of
> things need to be done. Take for example the admin interface (MySQL
> Administrator) for MySQL which is done very professionally or the ease
> of setting up Replication. Postgres still is quite far behind there and
> for normal users that know MySQL best the transition is probably a too
> big step and risk.

That MySQL is the "default" database for webhosters is most likely the same
reason why Access is the "default" database on Windows boxes: You only need
minimal knowledge to get it running - no matter how flawed the result.

> But then again, it might not be the aim of postgres to become that no1
> open source db and part of every web hosting environment. Instead rather
> to be an alternative for the serious databases for corporate use.

I sincerely hope not. PostgreSQL is THE free database that can reach the
production quality of the major databases (Oracle, DB2). The only remaining
feature it lacks out of the box is replication and some HA abilities the big
ones have. And for that it's really free as in beer and speech. Not a fake
type of hybrid license like MySQL.

> Might actually quite interesting to start a discussion on this topic
> here :-)

PLEASE: Could anyone set up a "MySQL versus PostgreSQL" mailing list that's
directly routed to /dev/null ? It's really boring to hear the same arguments
over and over again. If you love the "features" of MySQL - feel free to use
it.

>
> Cheers
> Alex
>
> Frank Finner wrote:
> >On Sun, 28 Mar 2004 14:24:15 +0900 Alex <alex(at)meerkatsoft(dot)com> sat down,
> > thought long and then
> >
> >wrote:
> >>Hi,
> >>what is the recommended way to run multiple databases under postgres.
> >>
> >>In MySQL it is rather simple to give different users or websites their
> >>own database with all the access rights.
> >>
> >>Any suggestion or links to documents are highly appreciated.
> >>
> >>Alex
> >
> >If you call "createdb -?" within a shell you will get the following:
> >
> >---
> >createdb creates a PostgreSQL database.
> >
> >Usage:
> > createdb [OPTION]... [DBNAME] [DESCRIPTION]
> >
> >Options:
> > -D, --location=PATH alternative place to store the database
> > -E, --encoding=ENCODING encoding for the database
> > -O, --owner=OWNER database user to own the new database
> > -T, --template=TEMPLATE template database to copy
> > -e, --echo show the commands being sent to the server
> > -q, --quiet don't write any messages
> > --help show this help, then exit
> > --version output version information, then exit
> >
> >Connection options:
> > -h, --host=HOSTNAME database server host or socket directory
> > -p, --port=PORT database server port
> > -U, --username=USERNAME user name to connect as
> > -W, --password prompt for password
> >
> >By default, a database with the same name as the current user is created.
> >
> >Report bugs to <pgsql-bugs(at)postgresql(dot)org>.
> >---
> >
> >So, to create a database from shell, you have to call
> >"createdb -O <valid database user> <databasename>". You should do this as
> > valid database superuser who may add databases!
> >
> >Another way is to connect to template1 as the future owner:
> >"psql template1 <valid database user>"
> >and create the database with "CREATE DATABASE <databasename>...". Every
> > valid user may connect to template1. You don´t need to use psql, this
> > works for example also with PgAdmin, it´s even simpler because you don´t
> > need to remember the syntax, just click around.
> >
> >Of course, the <valid database user> must be enabled to create databases,
> > therefore it must have been created either by calling "createuser -d
> > <valid database user> ..." or with an appropriate SQL command "CREATE
> > USER <valid database user> ... CREATEDB" by a database superuser, or
> > again with a tool like PgAdmin.
> >
> >BTW: Why do so many people comparisons with MySQL syntax during the last
> > days? "MySQL can do this, in MySQL I can do this that way" and so on.
> > Next time I´ d like to read something like "In DB2 I can simply add a
> > database by whatever." or "With MS-SQL-Server you just have to do the
> > following 32 steps to create a backup.". :-)
> >
> >Who cares about how something works in MySQL? They are NOT the providers
> > of a standard everybody has to use!
> >
> >Regards, Frank.
> >
> >
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/docs/faqs/FAQ.html
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

- --
UC

- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAZ6b5jqGXBvRToM4RAi3aAKCXI8dfL4Kg+ZioKiXIcDc/SG6NXwCfR7kC
Fh8HCkRASFEhvN5RIp1irmU=
=iJCR
-----END PGP SIGNATURE-----


From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: scrappy(at)postgresql(dot)org (Marc G(dot) Fournier)
Cc: alex(at)meerkatsoft(dot)com (Alex), postgresql(at)finner(dot)de (Frank Finner), pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 04:37:41
Message-ID: 200403290437.i2T4bgTZ005495@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> > Perhaps, but it isn't obvious which directory has which database. I'm not
> > not sure which system catalogs provide that information, something that
> > wasn't obvious from the online docs, either.
>
> SELECT oid FROM pg_database WHERE datname = '<database>';

Thanks. That should be easier to find in the documentation, perhaps it
should be mentioned in the docs for the pg_database system catalog.

From an ISP's or DBA's point of view, it would be preferable if there was
a way to determine which directory held which database without having
to actually log into the database. I can envision circumstances under
which postmaster might not be running when that information is needed.
--
Mike Nolan


From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: scrappy(at)postgresql(dot)org (Marc G(dot) Fournier)
Cc: scrappy(at)postgresql(dot)org (Marc G(dot) Fournier), alex(at)meerkatsoft(dot)com (Alex), postgresql(at)finner(dot)de (Frank Finner), pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 04:45:24
Message-ID: 200403290445.i2T4jODk005619@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> Just curious ... restricting \l itself isn't too difficult ... but how
> does MySQL restrict the ability to do something like:
>
> SELECT datname FROM pg_database;
>
> or does it not have an equivalent to that?

I'm not much of an expert in MySQL, but on my ISP 'show databases' only
shows MY databases.

I find MySQL's security tables arcane and confusing, but it may be that
I'm just more familiar with the way PG does it, because from the traffic
on the pgsql-general list it seems like questions about how to set up
the pg_hba.conf and pg_ident.conf are commonplace.

I also wonder how well the pg_hba.conf method will scale. What happens
if there are hundreds of client databases or thousands of entries in
pg_hba.conf?
--
Mike Nolan


From: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 04:57:20
Message-ID: 4067ACB0.6080403@zara.6.isreserved.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Alex wrote:
> MySQL is still the default database offered by any web hosting company
> and if Postgres wants to become the designated db engine for these
> services or become the worlds no.1 open source db then i think lots of
> things need to be done. Take for example the admin interface (MySQL
> Administrator) for MySQL which is done very professionally or the ease
> of setting up Replication. Postgres still is quite far behind there and
> for normal users that know MySQL best the transition is probably a too
> big step and risk.

But then again, real admin uses CLI :-)

Trust me, administering PG is not at all harder than MySQL, Apache,
Bind, Qmail, FB, etc. The only extra thing I need to do compared to
MySQL or FB is that I need to run VACUUM from time to time, but that's
so easy to do and autovacuum might be the way of the future anyway.

As to usage, PG is also very easy and convenient to use. Want some proofs?

1) PG's command line client is *much better* than MySQL's.

2) There are lots of webhosting provider offering PostgreSQL.

3) API/binding to virtually any language/environment (I don't think I've
seen .NET Data Provider or Parrot binding for MySQL);

4) LIMIT clause (with nicer syntax), autoincrementing column, easy
BLOB/TEXT, full-text search, replication, etc.? You got it.

But of course, if you're looking for other MySQL "conveniences" such as
silently chopping your string, silently converting your column data
type, allowing entering invalid values in your ENUM column, allowing
invalid dates, allowing breaking FK integrity, etc. then PG does not
have those. But I find them scary anyway :-)

--
dave


From: Pierre Didelon <pdidelon(at)cea(dot)fr>
To: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 09:42:45
Message-ID: 4067EF95.9040700@cea.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi david and PGSQL lovers,

I think that PGSQL devellopers and users must not be upset
by all the ongoing comparisons between MySQL and PostgreSQL.
This is the direct illustration of the postgresql success,
it gives me the feelings that its like a shameful desire
of MySQL users to come to a more "professional" DB.
It is a "demonstration" of the technical scale in DBMS
Access/MySQL/PostgreSQL (IMHO). Like for every domain in
the common life; if you want to make things better, you need
to do it "harder", but at the same time, depending of your needs,
before trying to do things better (migrating from MySQL to
PostgreSQL) you want to check if the investment is worthwhile.
'cause the last 10% oftently costs 90% of the effort.
So, don't turn the back to people trying to understand
the diff. and simil. between the DBMS, or the pro's and con's.
Explain (as you aleady does) that the 2 systems do not
fullfill the same needs and does not requires the same skill,
like the diff. between Access and MySQL.
Perhaps there is a page on the web which explain that?
I didn't found it, but may be somebody know one!

The probleme is also linked, as can be seen from the amount
of mail on general-psql list, to the fact that MySQL is available
natively on Window (and very easy to install there),
while PostgreSQL not yet, and a lot of people (me included)
are waiting this.

These 2 points explain the wealth of mail on general list and I really
understand that PostgreSQL devellopers, programmers and exclusive users
could be upset by mail avalanche on this subject. So, apart creating
a mailing list for native window users, it could be of some interest to
create a "MySQL migration" list to clear general list. I must admit that
I am incline to unsuscribe, although it is a nice chanel to stay
informed and continue to learn from other users experiences,
but too much information kills information.

All the best to the postgresql team,
Pierre

PS: I hope that my english is understable, and that I didn't hurt
anybody with misunderstandings or mistakes.

David Garamond wrote:
> Alex wrote:
>
>> MySQL is still the default database offered by any web hosting company
>> and if Postgres wants to become the designated db engine for these
>> services or become the worlds no.1 open source db then i think lots of
>> things need to be done. Take for example the admin interface (MySQL
>> Administrator) for MySQL which is done very professionally or the ease
>> of setting up Replication. Postgres still is quite far behind there
>> and for normal users that know MySQL best the transition is probably a
>> too big step and risk.
>
>
> But then again, real admin uses CLI :-)
doing this only 24hours per day ;-)
>
> Trust me, administering PG is not at all harder than MySQL, Apache,
> Bind, Qmail, FB, etc. The only extra thing I need to do compared to
> MySQL or FB is that I need to run VACUUM from time to time, but that's
> so easy to do and autovacuum might be the way of the future anyway.
>
> As to usage, PG is also very easy and convenient to use. Want some proofs?
>
> 1) PG's command line client is *much better* than MySQL's.

Common basic users love window interface, and even more experienced ones
like them because that are (WI) more "self explanatory", give you an easy
way to use all the possibilities of commands, without having to remember
all the tiny tricks hiden everywhere in corners.

>
> 2) There are lots of webhosting provider offering PostgreSQL.
>
> 3) API/binding to virtually any language/environment (I don't think I've
> seen .NET Data Provider or Parrot binding for MySQL);
>
> 4) LIMIT clause (with nicer syntax), autoincrementing column, easy
> BLOB/TEXT, full-text search, replication, etc.? You got it.
>
>
> But of course, if you're looking for other MySQL "conveniences" such as
> silently chopping your string, silently converting your column data
> type, allowing entering invalid values in your ENUM column, allowing
> invalid dates, allowing breaking FK integrity, etc. then PG does not
> have those. But I find them scary anyway :-)
>
These are among the technical advantages of PostgreSQL,
and I experienced somes, introducing weird data in my tables ;-o

--
Pierre
--------------------------------------------------------------------------
DIDELON :@: pdidelon_at_cea.fr Phone : 33 (0)1 69 08 58 89
CEA SACLAY - Service d'Astrophysique 91191 Gif-Sur-Yvette Cedex
--------------------------------------------------------------------------


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 10:18:19
Message-ID: 20040329061209.V51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Sun, 28 Mar 2004, Mike Nolan wrote:

> I'm not much of an expert in MySQL, but on my ISP 'show databases' only
> shows MY databases.

Right, show databases == \l, I believe ... but, how is security on the
table(s) that 'show databases' dealt with ... can you access those
directly, by passing the "security" on 'show databases'?

> I also wonder how well the pg_hba.conf method will scale. What happens
> if there are hundreds of client databases or thousands of entries in
> pg_hba.conf?

I'd be more concerned with how any server would scale to having thousands
of databases running on it myself ... but, right now, my largest server is
running ~165 databases, servicing 4 physical servers, and the server
itself is still highly responsive. Note that the server that that
database is running on runs two other instances of PostgreSQL (7.2 and
7.4), 2 of MySQL (4.0 and 4.1), one of Firebird and about 25 other
"virtual servers" ... loadavg is generally <2 ...

Only time I've ever really had a problem with it was when we ran
Mnogosearch for the archives ... major dog on resources, since it wasn't
really designed for anything by MySQL ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 10:28:29
Message-ID: 20040329062750.K51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Sun, 28 Mar 2004, Mike Nolan wrote:

> > > Perhaps, but it isn't obvious which directory has which database. I'm not
> > > not sure which system catalogs provide that information, something that
> > > wasn't obvious from the online docs, either.
> >
> > SELECT oid FROM pg_database WHERE datname = '<database>';
>
> Thanks. That should be easier to find in the documentation, perhaps it
> should be mentioned in the docs for the pg_database system catalog.
>
> From an ISP's or DBA's point of view, it would be preferable if there was
> a way to determine which directory held which database without having
> to actually log into the database. I can envision circumstances under
> which postmaster might not be running when that information is needed.

Two valid points ... I've brought them up onto hackers to see about
getting both rectified ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: Alex <alex(at)meerkatsoft(dot)com>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org, uwe(at)oss4u(dot)com
Subject: Re: PG vs MySQL
Date: 2004-03-29 13:44:18
Message-ID: 40682832.80504@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Marc,
I guess we both agree that postgress is in no way as popular with web
hosting companies as MySql (even though you know of 3 such providers
which most likely at the same time also offer MySQL), and I believe with
good reasons as it is more complex than MySQL and most of the
administrators and support stuff are not no dbas either.

I am in no way lobbying for MySQL as I also like to work with Postgres
and have used it for a few years now. It not only saved me and my
clients a lot of money by opting for Postgres instead of Sybase or
Oracle but it is also fun to work with it.

The argument for one or the other probably has been discussed here for
the past 5 years and most likely both dbs will at one point cover the
same functionality or really become specialized for a particular market
segment.

Uwe in a mail mentioned his so called "fake type of hybrid license like
MySQL". I wonder if postgres isn't following the same (natural) path (of
the money).

A

Marc G. Fournier wrote:

>On Mon, 29 Mar 2004, Alex wrote:
>
>
>
>>Frank,
>>pls. apologize. Maybe my description was not so clear. What I was
>>referring to was the fact that under MySQL you have more freedom to give
>>individual users of a shared server rights to create and manage their
>>databases In addition all databases are kept in separate directories
>>unlike postgres.
>>
>>
>
>Huh? Each database under PostgreSQL is kept under a seperate directory on
>the server ... always has been that way ..
>
>As to the ability to create/manage their own databases .. pls elaborate on
>what issues you've had with this under PostgreSQL, as its a simple ALTER
>command to provide a user with both CREATE USER and/or CREATE DATABASE
>permisisons ...
>
>
>
>>MySQL is still the default database offered by any web hosting company
>>
>>
>
>No it isn't ... I can name three companies that offer PostgreSQL as a
>primary database, and at least one of them only has MySQL as a means to do
>migrations ... and those are just the ones that I know personally ...
>
>
>
>>and if Postgres wants to become the designated db engine for these
>>services or become the worlds no.1 open source db then i think lots of
>>things need to be done. Take for example the admin interface (MySQL
>>Administrator) for MySQL which is done very professionally or the ease
>>
>>
>
>Please provide some examples .. I know any attempt I've made to do
>adminstrative stuff under MySQL has ended in a headache, but I've been
>using PostgreSQL for almost a decade now, so I find PostgreSQL the easier
>of the two ...
>
>
>----
>Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
>Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664
>
>
>
>


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org, uwe(at)oss4u(dot)com
Subject: Re: PG vs MySQL
Date: 2004-03-29 14:33:23
Message-ID: 20040329103219.W51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Alex wrote:

> Uwe in a mail mentioned his so called "fake type of hybrid license like
> MySQL". I wonder if postgres isn't following the same (natural) path (of
> the money).

How so? There are no financial requirements when using PostgreSQL, nor
will there ever be ... there are several *support* companies out there
that you can pay for support, but it isn't a requirement to use either ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 16:09:49
Message-ID: 200403290809.50105.uwe@oss4u.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 29 March 2004 06:33 am, Marc G. Fournier wrote:
> On Mon, 29 Mar 2004, Alex wrote:
> > Uwe in a mail mentioned his so called "fake type of hybrid license like
> > MySQL". I wonder if postgres isn't following the same (natural) path (of
> > the money).
>
> How so? There are no financial requirements when using PostgreSQL, nor
> will there ever be ... there are several *support* companies out there
> that you can pay for support, but it isn't a requirement to use either ...
>

The "fake" in MySQL is that, as discussed a thousand times, you can't use it
in any commercial project without buying a license. With MySQL you either use
GPL, or proprietary commercial licenses. Since this includes all client libs
a system like OpenOffice can offer MySQL support, StarOffice basically can't
since it's not under GPL.
I used the work "fake" here because it's pretty much like those "free checking
bank accounts". You have no idea when you will be charged a fee. Since the
legal side of when a license has to be bought for MySQL isn't really clear, I
decided against using or supporting MySQL. This dual policy of "unless it's
100% GPL what you're doing, buy a license" is very hard to follow. Where is
the line of 100% GPL ? Legally my lawyer thinks that MySQL AB could enforce
the "buy a license" if you write a closed source application in PHP. Usually
the GPL ends at the interpreter. However if you write the PHP app to require
MySQL, then you could be busted. Ok, nobody ever heard of someone who was
forced to buy a license for that - but if there is a lot of money in it,
companies suddenly turn around (see SCO vs. IBM and the rest of the world)

So I rather stick with a database that is not only technically superior, but
also guarantees that neither my company, nor any of our cutomers ever has to
pay for the database. They can elect to buy support from us or from any other
company offering PostgreSQL support. But they don't HAVE TO.

UC

- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAaEpOjqGXBvRToM4RAmf0AKDB+FpjDyBjwY3hRDjFRtq5hnjZHgCgqnPP
/ec0r+cobpcltMPPIAtIz/g=
=eCfr
-----END PGP SIGNATURE-----


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 17:26:12
Message-ID: 40685C34.8090709@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> I also wonder how well the pg_hba.conf method will scale. What happens
> if there are hundreds of client databases or thousands of entries in
> pg_hba.conf?

Although I personally would like to see a pg_hba table instead of the
file, I would have to seariously question your implementation if you had
hundreds of databases on a single machine.

If you need separate data spaces for each customer but the application
uses the same schema, use namespaces within a single database.

Sincerely,

Joshua D. Drake

> --
> Mike Nolan
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL

Attachment Content-Type Size
jd.vcf text/x-vcard 640 bytes

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 18:08:29
Message-ID: 20040329140719.B51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Joshua D. Drake wrote:

> If you need separate data spaces for each customer but the application
> uses the same schema, use namespaces within a single database.

What does that buy you that doing seperate databases doesn't? Either way,
you have one connection per client, and each connection is still going to
open the same number of files to do their work ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: jd(at)commandprompt(dot)com (Joshua D(dot) Drake)
Cc: scrappy(at)postgresql(dot)org (Marc G(dot) Fournier), alex(at)meerkatsoft(dot)com (Alex), postgresql(at)finner(dot)de (Frank Finner), pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 18:35:23
Message-ID: 200403291835.i2TIZOqG014932@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> > I also wonder how well the pg_hba.conf method will scale. What happens
> > if there are hundreds of client databases or thousands of entries in
> > pg_hba.conf?
>
> Although I personally would like to see a pg_hba table instead of the
> file, I would have to seariously question your implementation if you had
> hundreds of databases on a single machine.

I know of an ISP who has a large number of customers (in excess of 400)
running similar small (probably under 100MB each) MySQL databases. Since
I know each customer has access only to his own data, I assume it is
implemented using a different database for each customer. Whether or not
it is on one or several machines is a detail I'm not sure of.

Without knowing much about how pg uses the pg_hba.conf file, I don't
know what problems porting that ISP to pg might raise, I only cite it
as an example of an extreme case that might not have been anticipated
and thus possibly an inherent limit in the pg_hba.conf method.

I think it is possible to discuss MySQL features in comparison to pg
without getting into an Annie Oakley/Frank Butler-style argument here.
--
Mike Nolan


From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG vs MySQL
Date: 2004-03-29 19:54:11
Message-ID: Pine.LNX.4.33.0403291252090.22030-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Joshua D. Drake wrote:

> > I also wonder how well the pg_hba.conf method will scale. What happens
> > if there are hundreds of client databases or thousands of entries in
> > pg_hba.conf?
>
> Although I personally would like to see a pg_hba table instead of the
> file, I would have to seariously question your implementation if you had
> hundreds of databases on a single machine.
>
> If you need separate data spaces for each customer but the application
> uses the same schema, use namespaces within a single database.

since the purpose of the pg_hba.conf file is to ensure that you never
manage to lock yourself out of your database, might it make sense to have
a pg_hba table in each database that can be / will be / should be(???)
overidden by the pg_hba.conf file, thus ensuring you never get locked out,
but allowing the vast majority of connection configuration to be handled
by tables, with the pg_hba.conf as an emergency procedure used to get the
warp engines online in case some drunken ensign starts singing "I'll take
you home Kathleen" and shuts them down. (i.e. "delete from pg_hba" or
something like it.)???


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 20:54:04
Message-ID: 8603.1080593644@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> since the purpose of the pg_hba.conf file is to ensure that you never
> manage to lock yourself out of your database, might it make sense to have
> a pg_hba table in each database that can be / will be / should be(???)
> overidden by the pg_hba.conf file,

I don't think we want user authentication driven off of actual tables.
That would mean paying *all* the costs of backend launch before we could
reject an invalid connection request.

It might be possible to do something with a flat file as an intermediary
between the postmaster and the tables that are the master data. We
already do this for pg_shadow passwords, and I've been thinking of
proposing that we add a flat file for the database name -> OID mapping
so we could get rid of the horrid hack that is GetRawDatabaseInfo().
Per-database flat files would be a bit messy though.

regards, tom lane


From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG vs MySQL
Date: 2004-03-29 21:22:20
Message-ID: Pine.LNX.4.33.0403291418380.22124-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Tom Lane wrote:

> "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> > since the purpose of the pg_hba.conf file is to ensure that you never
> > manage to lock yourself out of your database, might it make sense to have
> > a pg_hba table in each database that can be / will be / should be(???)
> > overidden by the pg_hba.conf file,
>
> I don't think we want user authentication driven off of actual tables.
> That would mean paying *all* the costs of backend launch before we could
> reject an invalid connection request.
>
> It might be possible to do something with a flat file as an intermediary
> between the postmaster and the tables that are the master data. We
> already do this for pg_shadow passwords, and I've been thinking of
> proposing that we add a flat file for the database name -> OID mapping
> so we could get rid of the horrid hack that is GetRawDatabaseInfo().
> Per-database flat files would be a bit messy though.

Actually, I had thought of pg_hba as being a global table, not a per
database one. That would mean only one flat file, wouldn't it?

And while we're at it, maybe we should have a setting somewhere should
someone execute the famous "update pg_shadow set usesuper = false" that
someone did a while back to be able to force an account to be a superuser
account. In postgresql.conf or something like it. While it's another
problem, it falls under the same "keeping people from locking themselves
out" thread.


From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: scott(dot)marlowe(at)ihs(dot)com (scott(dot)marlowe)
Cc: jd(at)commandprompt(dot)com (Joshua D(dot) Drake), scrappy(at)postgresql(dot)org (Marc G(dot) Fournier), alex(at)meerkatsoft(dot)com (Alex), postgresql(at)finner(dot)de (Frank Finner), pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 21:32:29
Message-ID: 200403292132.i2TLWUMX017652@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> since the purpose of the pg_hba.conf file is to ensure that you never
> manage to lock yourself out of your database, might it make sense to have
> a pg_hba table in each database that can be / will be / should be(???)
> overidden by the pg_hba.conf file, thus ensuring you never get locked out,
> but allowing the vast majority of connection configuration to be handled
> by tables, with the pg_hba.conf as an emergency procedure used to get the
> warp engines online in case some drunken ensign starts singing "I'll take
> you home Kathleen" and shuts them down. (i.e. "delete from pg_hba" or
> something like it.)???

How about some kind of 'include table pg_hba' statement in the
pg_hba.conf file?

Anything prior to that could not be overridden by entries in the pg_hba
table, and the absence of an include statement means that only the file
entries are used, preserving the current behavior.
--
Mike Nolan


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 21:36:46
Message-ID: 8979.1080596206@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> And while we're at it, maybe we should have a setting somewhere should
> someone execute the famous "update pg_shadow set usesuper = false" that
> someone did a while back to be able to force an account to be a superuser
> account.

We already have an adequate solution for that one: shut down the
postmaster and run a standalone backend. You are always superuser in
a standalone backend, so you can create a new superuser or just reverse
the UPDATE command.

regards, tom lane


From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 21:42:25
Message-ID: 40689841.8030509@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Alex wrote:

> MySQL is still the default database offered by any web hosting company
> and if Postgres wants to become the designated db engine for these
> services or become the worlds no.1 open source db then i think lots of
> things need to be done. Take for example the admin interface (MySQL
> Administrator) for MySQL which is done very professionally or the ease
> of setting up Replication. Postgres still is quite far behind there and
> for normal users that know MySQL best the transition is probably a too
> big step and risk.

How easy is it to setup a reliable replication with failover, switchover
and especially switchback? I have never done that in MySQL, but you seem
to know quite a bit about it. If I have one master and 3 slaves, and I
need to shutdown the master for maintenance purposes, what do I have to
do to switch over to one of the slaves, let the other two slaves
replicate against that new master, and when I'm done and the original
master could take over again, what's the procedure to get it back into
the master role? Keep in mind that our databases are quite a few
gigabytes in size and that longer interruption of accessibility is not
acceptable (that's what we do that replication stuff for in the first
place).

If you don't know the answers to that, I assume it isn't that easy as
people try to make believe. And in case the answer is "that is not
possible but ...", then you better think again what you want that
replication setup for.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #


From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG vs MySQL
Date: 2004-03-29 22:02:08
Message-ID: Pine.LNX.4.33.0403291500170.22124-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Tom Lane wrote:

> "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> > And while we're at it, maybe we should have a setting somewhere should
> > someone execute the famous "update pg_shadow set usesuper = false" that
> > someone did a while back to be able to force an account to be a superuser
> > account.
>
> We already have an adequate solution for that one: shut down the
> postmaster and run a standalone backend. You are always superuser in
> a standalone backend, so you can create a new superuser or just reverse
> the UPDATE command.

Ahhh. Good point. Any chance of having the same behaviour for pg_hba as
a table? I.e. you accidentally remove all connectability and you could
restore it to a pg_hba table? Does that even make sense? I'm not sure.


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 23:06:43
Message-ID: 20040329185204.V51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Mike Nolan wrote:

> I know of an ISP who has a large number of customers (in excess of 400)
> running similar small (probably under 100MB each) MySQL databases. Since
> I know each customer has access only to his own data, I assume it is
> implemented using a different database for each customer. Whether or not
> it is on one or several machines is a detail I'm not sure of.

Note that we are actually talking about two different things here ... I
have a server with 165 databases running on it for clients ... no client
can access another clients database, as access is restricted to a user
created specifically for the client that owns the database, as well as the
IP that they will be connecting from ...

Now, that doesn't preclude clients from seeing the names of another
clients database using \l, but unless there is gross mis-management of the
pg_hba.conf, seeing the names of other databases doesn't give other
clients any benefits ...

> Without knowing much about how pg uses the pg_hba.conf file, I don't
> know what problems porting that ISP to pg might raise, I only cite it as
> an example of an extreme case that might not have been anticipated and
> thus possibly an inherent limit in the pg_hba.conf method.

To be honest, I can't see much in the way of issues with migrating the
above scenario from MySQL -> PostgreSQL ... other then the obvious
migration of table structures and data, but there are more then enough
scripts out here for mysql2pg conversion ...

> I think it is possible to discuss MySQL features in comparison to pg
> without getting into an Annie Oakley/Frank Butler-style argument here.

Agreed, else I wouldn't have jump'd in ... you've brought up a couple of
points that I've raised on the -hackers list ... but, I don't consider
them to be 'high priority' issues, mainly because there is no security
reasons to adopt a 'hide it all' policy similar to MySQL ...

In fact, I'd almost go to the extent of saying that MySQL model of hiding
things would result in a slightly more lazy admin maintaining the server,
since they would be relying more on MySQL to provide security for them,
instead of them providing it themselves ... we (PgSQL) tend to be more
aware of our servers *because* we have to think about whether we've setup
the security properly ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-29 23:12:28
Message-ID: 20040329191036.Y51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Tom Lane wrote:

> It might be possible to do something with a flat file as an intermediary
> between the postmaster and the tables that are the master data. We
> already do this for pg_shadow passwords, and I've been thinking of
> proposing that we add a flat file for the database name -> OID mapping
> so we could get rid of the horrid hack that is GetRawDatabaseInfo().
> Per-database flat files would be a bit messy though.

The ability to manipulate pg_hba via interfaces stuck as phpPgAdmin and
PgAdmin would definitely be a plus, even if it just results in something
like pg_shadow ... in an ISP environment, pg_hba is about the only
'hassle' that I think really exists ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: scrappy(at)postgresql(dot)org (Marc G(dot) Fournier)
Cc: jd(at)commandprompt(dot)com (Joshua D(dot) Drake), scrappy(at)postgresql(dot)org (Marc G(dot) Fournier), alex(at)meerkatsoft(dot)com (Alex), postgresql(at)finner(dot)de (Frank Finner), pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-30 00:16:03
Message-ID: 200403300016.i2U0G4aZ019384@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> Now, that doesn't preclude clients from seeing the names of another
> clients database using \l, but unless there is gross mis-management of the
> pg_hba.conf, seeing the names of other databases doesn't give other
> clients any benefits ...

That rather depends upon what those clients are doing, doesn't it?

I can see benefits from being able to completely isolate one client/database
from another, even to the point of not giving them any hints that they're
sharing the same database server. (Depending on how fanatical I am about
it, there are other solutions, such as separate instances or completely
separate physical systems, but those present a different set of
administrative issues.)

It may be more of a marketing issue than a technical one. If we want
increased commercial acceptance, that may be one of the higher priority
features from an ISP's (or his clients') point of view, if not from ours.
--
Mike Nolan


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-30 00:44:43
Message-ID: 20040329203259.E51637@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Mon, 29 Mar 2004, Mike Nolan wrote:

> > Now, that doesn't preclude clients from seeing the names of another
> > clients database using \l, but unless there is gross mis-management of the
> > pg_hba.conf, seeing the names of other databases doesn't give other
> > clients any benefits ...
>
> That rather depends upon what those clients are doing, doesn't it?

I don't know, does it? I can't think of any circumstance that this would
give a client any advantage ... can you?

> It may be more of a marketing issue than a technical one. If we want
> increased commercial acceptance, that may be one of the higher priority
> features from an ISP's (or his clients') point of view, if not from
> ours.

Coming from the ISP side, I can't say that, in the 8 or so years I've been
providing PostgreSQL, I've ever had anyone voice a concern about being
able to see other clients databases ... most of my clients don't even see
the database, as they are using such thinks as OpenACS (they plug in the
connection details, and OpenACS loads the schema/data for them) or
phpPgAdmin (which has an option to hide databases not owned by them) ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664


From: Andrew Rawnsley <ronz(at)ravensfield(dot)com>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Alex <alex(at)meerkatsoft(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org, Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Subject: Re: PG vs MySQL
Date: 2004-03-30 04:08:25
Message-ID: E462E0D1-81FF-11D8-90A8-000393A47FCC@ravensfield.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


On Mar 29, 2004, at 7:44 PM, Marc G. Fournier wrote:

> On Mon, 29 Mar 2004, Mike Nolan wrote:
>
>>> Now, that doesn't preclude clients from seeing the names of another
>>> clients database using \l, but unless there is gross mis-management
>>> of the
>>> pg_hba.conf, seeing the names of other databases doesn't give other
>>> clients any benefits ...
>>
>> That rather depends upon what those clients are doing, doesn't it?
>
> I don't know, does it? I can't think of any circumstance that this
> would
> give a client any advantage ... can you?

Depends what you name the databases, honestly. Never underestimate the
power of the belief in
confidentiality (paranoia to the rest of us) inherent in certain
industries - actual advantage
gained means nothing compared to the perception thereof. I do much work
in the financial and
environmental industries - you can't spit without offending a lawyer
(particularly in the environmental
space. The lawyers are the only ones who make any money...).

--------------------

Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com


From: Gregory Wood <gwood(at)ewebengine(dot)com>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-30 09:55:18
Message-ID: 40694406.5020003@ewebengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Jan Wieck wrote:
> If you don't know the answers to that, I assume it isn't that easy as
> people try to make believe. And in case the answer is "that is not
> possible but ...", then you better think again what you want that
> replication setup for.

Although I agree with your points (especially having set up
contrib/dbmirror in the past, and anticipating Slony all the more
because of that experience), I would like to point out that
failover/high-availability is not the only reason to set up replication.
Lots of people just want the ability to load balance between several
servers.

Personally, I'd want the failover capabilities as well, just as I'd much
rather run RAID 0+1/10 or RAID 5 than RAID 0. That's not to say that
there aren't people that only care about speed through parallelism
though. In which case, your scenario isn't necessarily valid, with
regards to ease of setup/maintenence of replication.

Greg


From: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
To: (Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, scrappy(at)postgresql(dot)org (Marc G(dot) Fournier))
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-30 13:26:25
Message-ID: 5.2.1.1.1.20040330212112.0339c7c0@mbox.jaring.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

At 06:16 PM 3/29/2004 -0600, Mike Nolan wrote:

> > Now, that doesn't preclude clients from seeing the names of another
> > clients database using \l, but unless there is gross mis-management of the
> > pg_hba.conf, seeing the names of other databases doesn't give other
> > clients any benefits ...
>
>That rather depends upon what those clients are doing, doesn't it?
>
>I can see benefits from being able to completely isolate one client/database
>from another, even to the point of not giving them any hints that they're
>sharing the same database server. (Depending on how fanatical I am about
>it, there are other solutions, such as separate instances or completely
>separate physical systems, but those present a different set of
>administrative issues.)

It would just be better to run separate postgres instances.

The resources used may be higher, but the isolation is better.

If RAM was cheaper I'd give each customer their own virtual machine.

Regards,
Link.


From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Gregory Wood <gwood(at)ewebengine(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-03-30 15:01:11
Message-ID: 40698BB7.5030004@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Gregory Wood wrote:
> Jan Wieck wrote:
>> If you don't know the answers to that, I assume it isn't that easy as
>> people try to make believe. And in case the answer is "that is not
>> possible but ...", then you better think again what you want that
>> replication setup for.
>
> Although I agree with your points (especially having set up
> contrib/dbmirror in the past, and anticipating Slony all the more
> because of that experience), I would like to point out that
> failover/high-availability is not the only reason to set up replication.
> Lots of people just want the ability to load balance between several
> servers.

Exactly. And as you have correctly read between the lines, my real point
is that people are looking at replication from different points of view
and that everyone sees a different benefit from it, or a different set
of problems solved by it. And because of that, a statement like "the
ease of setting up replication" is a marketing phrase that has no value.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Alex <alex(at)meerkatsoft(dot)com>, Frank Finner <postgresql(at)finner(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: PG vs MySQL
Date: 2004-07-09 15:15:41
Message-ID: 200407091515.i69FFgo16847@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


Is this a TODO here, perhaps dumping authentication from tables?

---------------------------------------------------------------------------

Tom Lane wrote:
> "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> > since the purpose of the pg_hba.conf file is to ensure that you never
> > manage to lock yourself out of your database, might it make sense to have
> > a pg_hba table in each database that can be / will be / should be(???)
> > overidden by the pg_hba.conf file,
>
> I don't think we want user authentication driven off of actual tables.
> That would mean paying *all* the costs of backend launch before we could
> reject an invalid connection request.
>
> It might be possible to do something with a flat file as an intermediary
> between the postmaster and the tables that are the master data. We
> already do this for pg_shadow passwords, and I've been thinking of
> proposing that we add a flat file for the database name -> OID mapping
> so we could get rid of the horrid hack that is GetRawDatabaseInfo().
> Per-database flat files would be a bit messy though.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

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