3 ms·
Just wanted to point out a few differences to people hitting PGSQL after getting their feet wet with MySQL. 1. While installing PGSQL get your configuration v
by sandGorgon 17y ago
Just wanted to point out a few differences to people hitting PGSQL after getting their feet wet with MySQL.
1. While installing PGSQL get your configuration variables correct, or it wont work out-of-the-box (kernel.shmmax, autovacuum, shared_buffers)
2. learn about authentication. PGSQL depends on authentication of the OS ("sameuser" on pg_hba.conf). MySQL behaves by default as the "password" authentication method of PGSQL.
3. Learn about template databases. Your first database is a template database.
4. PGSQL has "pg_" databases and slash commands (\dt, \connect, \q) for system administration.
- neilc 17y agoget your configuration variables correct, or it wont work out-of-the-box (kernel.shmmax, autovacuum, shared_buffers) The only thing you really need to worry about is making sure the kernel SysV limits are appropriate (kernel.shmmax); autovacuum and shared_buffers are configured reasonably out of the box. GSQL depends on authentication of the OS ("sameuser" on pg_hba.conf) That depends on how PostgreSQL is packaged by your OS. Learn about template databases. Your first database is a template database. No; the default database is called "postgres", and it is not a template database.
- sandGorgon 17y agoSorry - I should have clarified. These are specific to Ubuntu packaging. I worked on MySQL before I had to work on PostGres and these were the major turning points in my understanding. Hope it helps someone else.
- catch23 17y agoI use ubuntu all the time, I don't remember having to configure shmmax to get it working with my blog. I think you only need to mess with that stuff if you're trying to increase the number of connections or "scale" your blog. I think 90% of the people who use mysql, use it without touching a configuration variable, and those people could just as easily use postgresql without configuring kernel.shmmax. I don't know, but I'm guessing that 90% includes people messing around with django/rails/lift etc, or they're running a blog/cms/wiki on some shared virtual hosting somewhere.
- pilif 17y agothe configuration that comes out-of-the-box actually is correct in a sense that it works. shared_buffers is low enough so that kernel.shmmax and kernel.shmall don't need to be changed. Of course that means that there isn't enough shared memory available to achieve maximum performance, but chances are that you don't need to worry about that while you are still a beginner. Later, when the amount of data grows, then it's time to learn about that stuff and this is when you will change shared_buffers - and the kernel resources with it. Agreed about the other stuff, though it has pg_-tables, not databases. And having database metadata exposed in database tables is quite the common case and has indeed been made into a standard, though not in the form of pg_* but in form of the information_schema (though pg_* still expose a lot of additional information)