I just installed PostgreSQL 8.4 from EnterpriseDB. I wonder what is the recommended configuration?
I am about to create the servoy_repository database. These are my questions:
Is it Ok if I install Servoy with PostgreSQL (installation with database server) in addition to the above mentioned standalone installation of PostgreSQL? The idea is to have PostgreSQL service, and also get running the database for the servoy_repository upon installation.
In Developer (my development machine)
Should servoy_repository owner be the user (login role) postgres?
Should servoy_repository owner be a new superuser? PGservoy for instance?
Shouldn’t it be a superuser at all?
About collation. What collation and char type should I use? C? English_United Stated.1252? POSIX?
[attachment=0]postgresqlCapture.GIF[/attachment]
In the Server Machine (installation without developer)
Should servoy_repository owner be a superuser?
What about if I install Servoy without the database server. How do I start Servoy Server? I am sure this is documented, but your fast tip is more than appreciated!
Excellent links! There answer my last and most important question, but they don’t answer the questions:
In Developer (my development machine) 1) Should servoy_repository owner be the user (login role) postgres? 2) Should servoy_repository owner be a new superuser? PGservoy for instance? 3) Shouldn’t it be a superuser at all? 4) About collation. What collation and char type should I use? C? English_United Stated.1252? POSIX? In the Server Machine (installation without developer) 1) Should servoy_repository owner be a superuser?
jcarlos: In Developer (my development machine) 1) Should servoy_repository owner be the user (login role) postgres?[/quote] Should ? Not really. As long as your user (role) is the owner of the database and is allowed to alter the schema (tables/columns/etc) > jcarlos: > 2) Should servoy_repository owner be a new superuser? PGservoy for instance? No need to be a superuser. Again, as long as the user is the owner of this database and is allowed to alter the schema. > jcarlos: > 3) Shouldn’t it be a superuser at all? Security-wise its considered bad practice to let applications connect to databases with a superuser role. Servoy does need some privileges in the database it connects to but that is only to be able to create/alter tables and columns. Security-wise it should not have any more privileges. Of course things also depend on what your solution does (trigger stored procedures, create db objects via custom sql, etc). > jcarlos: > 4) About collation. What collation and char type should I use? C? English_United Stated.1252? POSIX? When you use C then it will use the collation of your underlying OS. In general you simply use C unless you want to support a specific language (and it’s sorting rules). Ditto for character type. > jcarlos: > In the Server Machine (installation without developer) > 1) Should servoy_repository owner be a superuser?[/b] See answer above.
I think i decided just to install PostgreSQL with Servoy. I don’t see the need of a separate installation, which later (after subsequence Servoy updates) will required upgrades. I also will follow Tom Parry’s and Patrick’s recipe to create a service for PostgreSQL and configure the Servoy/Service/wrapper (http://www.servoy.com/forum/viewtopic.php?f=5&t=14613).
jcarlos:
I don’t see the need of a separate installation, which later (after subsequence Servoy updates) will required upgrades…
I am not sure how one relate to the other. Servoy will keep working with any older or even newer version of PostgreSQL or any other RDBMS for that matter so no upgrades are required.
But I would actually reverse your logic and say you should install the third-party install so you could install (security) updates for PostgreSQL that the PostgreSQL community (EnterpriseDB is part of that community) brings out. I don’t think Servoy has anything in place for this right now to give us any PostgreSQL security updates (other then a whole new install of Servoy).
With the EnterpriseDB installer you simply run the installer to update PostgreSQL and 1 minute later you are back in business. It’s as simple as that.
Robert,
I did install the Postgresql server but could not figure out how to tell it to use the Servoy database (to use the examples etc). Have you tried that and what did you have to do to specify it?
Just like in the Sybase days Servoy installer will create and populate those databases for you. Of course when you use your own PostgreSQL install this is not the case.
What you can do is create those (empty) databases yourself (using PgAdmin), create the connections and then import the example solution (see the solutions directory) which create the tables for you and (I assume) also load the data.
I guess the only trick is to know the connection names beforehand. The actual database name is not important to a Servoy solution anyway (it only references the connection name).
ROCLASI:
I guess the only trick is to know the connection names beforehand.
How would you know the connection names of new sample databases? I guess we’ll do by installing first Servoy with the database repository (default) and getting the connection names. Then install again without the databases. Correct?
BTW, thanks a lot for this info. I wouldn’t have known that.
ROCLASI:
Servoy will keep working with any older or even newer version of PostgreSQL or any other RDBMS for that matter so no upgrades are required.
But I would actually reverse your logic and say you should install the third-party install so you could install (security) updates for PostgreSQL that the PostgreSQL community (EnterpriseDB is part of that community) brings out. I don’t think Servoy has anything in place for this right now to give us any PostgreSQL security updates (other then a whole new install of Servoy).
With the EnterpriseDB installer you simply run the installer to update PostgreSQL and 1 minute later you are back in business. It’s as simple as that.
Excellent. I think I’m changing my mind again. “Your logic is undeniable” (I, Robot - 2004)
However, in the wiki is stated: “The datamodel structure is versioned, so new version of Servoy might require an upgrade of the repository.” For example, let’s say that I install a new version of Servoy (Servoy 6). If so, the repository database structure might go out of sync with the new Servoy installation. To fix this, we need to do the following:
Macintosh/Linux/Unix
-------------------------------------------------------------------
./servoy_server.sh -upgradeRepository
================================================
Windows
-------------------------------------------------------------------
servoy_server.bat -upgradeRepository
You are correct when you explained that “Servoy will keep working with any older or even newer version of PostgreSQL or any other RDBMS for that matter so no upgrades are required.” My concern wasn’t actually about the database server, but the repository database structure. Using a third party installation (although it’'s best for the reason that you explained) requires more attention when installing or upgrading Servoy. Correct?
The connection names are stored in the .servoy files which are in fact .zip files (just like .jar files are).
So you could duplicate such a file, rename it with a .zip extension and then unzip it. After this you can examine the content of database_info.xml to find the connection name(s).
So I did exactly that and found that the used connection names are the following:
jcarlos:
My concern wasn’t actually about the database server, but the repository database structure. Using a third party installation (although it’'s best for the reason that you explained) requires more attention when installing or upgrading Servoy. Correct?
Correct. But you could always create another repository database and point your newer (or older) Servoy version to that so that you always have the option to go back to your old repository. I have repository databases going back to Servoy 2.x in my PostgreSQL instance (I guess I should clean that up by now ).
As said before Servoy only looks at the connection name so you can name your repository database however you like inside PostgreSQL (or any other RDBMS) as long as your connection name in Servoy is ‘repository_server’.
Of course you have the same issue with your workspace (being upgraded or not). Eclipse allows you to switch between workspaces (and can be made to ask what workspace to use when launched) so this way you can, lets say, keep your Servoy 4 workspace intact when you move to Servoy 5 by using a new workspace for that.
I flip back and forth between workspaces all the time, even using the same version of Servoy. It’s a great way to organize your projects.