Child pages
  • PostgreSQL Primer

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As of Servoy 5.2 Servoy comes bundled with PostgreSQL. This means that when the option to install the databases in the All-In-One installer is checked, the installer will install the PostgreSQL database engine. 

(lightbulb) While Servoy comes bundled with PostgreSQL, Servoy is 100% database agnostic. The PostgreSQL database can therefor be replaced by any type of database. 

...

As of Servoy 6.0 the Servoy All-In-One installer provides 2 different options to install PostgreSQL:

When using Servoy 5.2, the EnterpriseDB PostgreSQL Standard Server installer can be manually downloaded from the EnterpriseDB website here.

Embedded PostgreSQL database engine

Compared to the EnterpriseDB PostgreSQL Standard Server the embedded PostgreSQL database engine is a no frills PostgreSQL installation, just just the bare minimal options installed to run, backup and upgrade the PostgreSQL database. 

The PostgreSQL database engine is installed in the ../application_server/postgres_db/ directory. The actual databases and configuration files are stored in the ../application_server/database/ directory. As of Servoy 6.0, the location of the database engine and database files can be configured during installation

While PostgreSQL comes bundled with Servoy, the PostgreSQL installation provided through the Servoy All-In-One installer is a basic installation. Thus many people prefer the EnterpriseDB installer, that installed PostgreSQL

...

Setting the port

...

TBD

Upgrading PostgreSQL

...

Servoy bundled version

...

TODO

...

EnterpriseDB installed version

...

Installing an update, lets say 9.

EnterpriseDB PostgreSQL Standard Server

The Standard Server offering of EnterpriseDb adds to enterprise level tools to PostgreSQL, like replication. Besides that the Standard Server installer is more sophisticated than the Servoy installer. It will for example install the PostgreSQL database under it's own user.

Which installation to choose

For production purposes, it's advised to use the EnterpriseDb Standard Server installer. For development and test purposes, both the embedded PostgreSQL database  engine and the EnterpriseDB option would be sufficient.

Upgrading PostgreSQL

...

Embedded PostgreSQL database engine

...

TODO

...

EnterpriseDB installation

...

Upgrading an EnterpriseDB Standard Server installation to the next maintenance release, lets say 9.0.1 to 9.0.2 literally means you just run the installer of , can be done by running the 9.0.2 installer. It will automatically find the 9.0.2 and you are done. Just make sure you stop 1 installation and update it. Make sure to stop Servoy (and any other client connecting to PostgreSQL) before you do thisperforming the upgrade.

Upgrading PostgreSQLmajor or minor versions, lets say from 9.0.2 to 9.1 , you can run is not possible in the same manner. Running the 9.1 installer and this will be installed will install 9.1 next to the 9.0 installation. The installer automatically set the port of this version to one that doesn't collide with the one already installed. So the 2 versions can run at the same time.

Now to To get your the databases over to the new version you need to backup your whole a backup can be made of the entire database cluster using the command-line pg_dumpall backup utility and load it , after which the backup can be loaded back into the new instance using the psql utility. You could also use PgAdmin for this.It This operation an also be performed using PgAdmin. It is recommended to use the tools from the newer version to backup the databases from the older version.

...

The pg_ctl utility that comes with PostgreSQL has a built-in command to register the PostgreSQL database as a Windows Service

Registering the Windows Service:

Code Block
postgres_db\bin\pg_ctl register -N PostgreSQL -D database

Unregistering the Windows Service:

Code Block
postgres_db\bin\pg_ctl unregister -N PostgreSQL

...

The -N option specifies the name for the Windows Service. Make sure the name is unique. 

When also running the Servoy Application Server using the Service Component, a dependency can be setup between the Windows Service for the database and the Application Server. See Running the server as a service for more information.

OSX

TODO, for now see http://www.postgresql.org/docs/9.0/interactive/server-start.html

...