VMware vFabric Postgres 9.1 User guide

Type
User guide
vFabric Postgres Standard Edition User
Guide
vFabric Postgres 9.1
This document supports the version of each product listed and
supports all subsequent versions until the document is replaced
by a new edition. To check for more recent editions of this
document, see http://www.vmware.com/support/pubs.
EN-000872-00
vFabric Postgres Standard Edition User Guide
2 VMware, Inc.
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
Copyright
©
2012 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual
property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks
and names mentioned herein may be trademarks of their respective companies.
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
Contents
Preface 5
1
VMware Customizations for Postgres 7
Differences Between vFabric Postgres and PostgreSQL Databases 7
2
Installation Overview 9
Installing vPostgres as a Virtual Appliance 10
Installing vPostgres Using RPM Files 13
3
vPostgres Client Tools and Libraries 15
Client Tool Packages and Drivers 16
Install the Client Tools Package 17
Installing vPostgres Client Tools 18
Add an x86 vPostgres ODBC Data Source on Windows 18
Using vPostgres libpq with Your Application 18
4
Restarting the Service 21
5
Adding a License Key 23
6
Connection to a vPostgres Database with JDBC or psql 25
7
Security and Services 27
8
Troubleshooting 29
Index 31
VMware, Inc. 3
vFabric Postgres Standard Edition User Guide
4 VMware, Inc.
Preface
The vFabric Postgres Standard Edition User Guide provides information about installing and using VMware
vFabric Postgres Standard Edition database. You can use the database alone, or as part of the VMware vFabric
Data Director Suite.
The vFabric Postgres Standard Edition database may also be referred to in this manual by the official nickname
of 'vPostgres'.
Revision History
The vFabric Postgres Standard Edition User Guide is revised with each release of the product or when necessary.
A revised version can contain minor or major changes.
Table 1. Revision History
Revision Date Description
22 May 2012 Version 9.1
Intended Audience
This information is intended for anyone who wants to install or use a vFabric Postgres Standard Edition
database. The information is written for experienced Windows or Linux system administrators who are
familiar with virtual machine technology and datacenter operations.
Related Publications
The Data Director Administration Guide contains information about using the vFabric Data Director to manage
your vPostgres databases.
While you can use your vFabric Postgres Standard Edition database as a stand-alone product (independent of
vFabric Data Director), these products are compatible and are designed to work together.
To access the current versions of these and other VMware books, go to
http://www.vmware.com/support/pubs.
VMware, Inc.
5
vFabric Postgres Standard Edition User Guide
6 VMware, Inc.
VMware Customizations for Postgres 1
VMware vFabric Postgres (vPostgres) is an ACID-compliant, ANSI-SQL-compliant transactional, relational
database designed for the virtual environment and optimized for vSphere. It is based on the Postgres open-
source relational database and is compatible with Postgres SQL dialect and tools. Its features include elastic
database memory, database-aware high availability, and automated database configuration. vFabric Postgres
contains enhancements and customizations for Data Director.
Differences Between vFabric Postgres and PostgreSQL Databases
The VMware vFabric Postgres database includes memory, checksum, and performace features that are not
available on open source Postgres/PostgreSQL databases. The section describes the differences in more detail.
You can deploy a vPostgres database as a virtual applicance or using RPM files.
n
Deploying a virtual applicance from a VMware Virtualization Platform results in an embedded vPostgres
deployment. This method creates a virtual machine with the operating system (SLES 11, sp1 64-bit Linux),
vPostgres server, and client preinstalled. The appliance version of the vFabric Postgres Standard Edition
database includes VMware virtualization technology.
n
Using the -ivh command line option with RPM files to deploy a vPostgres stand-alone database results in
an embedded vPostgres deployment. In this option, you must create a virtual machine and install an SLES
11 (sp1) or RHEL 6.2 operating system followed by the -ivh commands mentioned above. You can use this
method to install the vPostgres server and client software.
vFabric Postgres Enhancements
VMware vFabric Postgres enhancements include elastic database memory, ease of tuning, checksums, and
configurable checkpoint intervals.
Elastic Database
Memory
Elastic database memory enables vPostgres to run with graceful performance
degradation under heavy over-commitment of memory. vPostgres participates
in memory resource management with the guest operating system and vSphere
Hypervisor to achieve elastic database memory.
VMware, Inc. 7
vPostgres monitors requests for memory from vSphere Hypervisor as well as
swap activity within the guest operating system. When the hypervisor or the
guest operating system need more memory, the vPostgres buffer manager
shrinks the database buffer pool to make memory available. When more
memory becomes available, the buffer manager increases the amount of
memory dedicated to the buffer pool.
Elastic database memory is enabled by default in the virtual appliance, but is
disabled in the RPM files.
Ease of Tuning When
Deployed As Appliance
vPostgres databases that are deployed as an applicance have higher default
values than standard Postgres databases for many critical settings, including
shared_buffers, checkpoint_segments, and wal_buffers. The higher default
values improve out-of-the-box vPostgres performance with a slight increase in
disk space and memory requirements. The result is that users of embedded
vPostgres databases can more easily tune the database for their workload.
Automatic Checksums
vPostgres performs checksums on each write operation to tables or indexes.
Performing checksums on each write ensures that when vPostgres retrieves
data, that data is clean.
Checksums are enabled by default.
Checkpoint Tuning
vPostgres improves on the Postgres algorithm, to make the tuning more
dynamic.
In I/O-constrained environments, periods of heavy checkpointing activity often
alternate with periods of light checkpoint activity.
Therefore, vPostgres performs dynamic tuning of checkpoint parameters so
that rapid changes in available I/O bandwidth or changes in the database
workload reduce the likelihood of database throughput oscillations.
Checkpoint tuning is enabled by default
Differences for vPostgres Databases within the Data Director Suite
vPostgres databases that are deployed with Data Director differ from stand-alone vPostgres databases in
several ways.
Simplified Configuration
To configure Data Director deployed vPostgres databases, users select a
database configuration template, and then customize settings such as name,
storage allocation, database owner account, and backup template. Data
Director updates the postgresql.conf file’s tunable parameters.
No Superuser Admin
Privileges
Each Data Director database user has only database administrator rights. This
means tools that require superuser privileges, such as COPY FROM, COPY TO,
and tools that operate on the system catalog, do not work.
No pg_dumpall
The pg_dumpall tool requires superuser privileges, and does not work with
Data Director deployed vPostgres databases.
No CREATE or DROP
Database Privileges
Data Director users have privileges only within the database. You cannot use
database client tools to create or drop databases. Use the Data Director UI to
create and drop databases.
Object Naming
Database names must use alphanumeric characters, underline (‘_’) or hyphen
(‘-’).
For object names, only the standard Postgres requirements apply.
vFabric Postgres Standard Edition User Guide
8 VMware, Inc.
Installation Overview 2
This section discusses the system requirements for installing the vFabric Postgres Standard Edition (vPostgres)
software, followed by an overview of the installation steps.
The vPostgres server and client software is distributed together as an Open Source Virtual Appliance (.ova)
file, and as a series of .rpm files.
System Requirements
You can install the server .ova file on the latest edition of any VMware Virtualization Platform, such as VMware
vSphere 5.x, VMware Workstation 8.x, VMware Fusion 4.x, or VMware Player 4.x to perform development
tasks and run tests.
In a production environment, it must be installed on VMware vSphere 5.x.
The host where you install the .ova file or the virtual machine where you install the .rpm files must include
the resources listed in the following table.
Table 2-1. Resource Requirements
RAM vCPUs Disk Space
Minimum 512 MB 1 12 GB
The vPostgres product provides custom JDBC, ODBC, and LIBPQ drivers that work with both Standard Edition
(stand alone) and Studio (Data Director integrated) deployments.
Table 2-2. Supported Database Clients
Included Clients 32-bit 64-bit
Windows X X
Linux X X
MAC OSX X X
Many community PostgreSQL clients, such as Npgsql, and psycopg2 are also supported in both 32- and 64-bit
configurations.
Note that if you are using the 'File DSN' option to create an ODBC connection, you must observe the following
syntax rules when adding the server name.
The keywords and their values should not contain the []{}(),;?*=!@ characters. The value of the DSN keyword
cannot consist only of blanks and should not contain leading blanks. Because of the registry grammar,
keywords and data source names cannot contain the backslash (\) character. Spaces are not allowed around
the equal sign in the keyword-value pair.
VMware, Inc.
9
Installation Process
Read the steps below to get an overview of the installation process. Then proceed to download the necessary
files.
1 Install one of the VMware Virtualization Platforms such as vSphere 5.x, Workstation 8.x, Fusion 4.x, or
Player 4.x.
2 Open the VMware application and choose the aurora_dbvm-9.1.3.0-683886.ova file when asked by the
'File ->Open' or 'File-Deploy OVF' command (depending on your virtualization platform).
3 If you want to build the vPostgres database on an existing virtual machine, make sure the virtual machine
is running one of the supported operating systems and then download and install the client, server, and
init .rpm files that are included in this release (client package first, then server package, init, and eula),
instead of using the appliance file.
4 Install the software for one of the supported clients.
5 Install the Client Tools.
6 Log into the new database using your new database client.
For more detailed steps about installing the .ova file for each VMware application, see Installing vPostgres as
a Virtual Appliance.
This chapter includes the following topics:
n
“Installing vPostgres as a Virtual Appliance,” on page 10
n
“Installing vPostgres Using RPM Files,” on page 13
Installing vPostgres as a Virtual Appliance
Many of the VMware Virtualization Platforms allow you to deploy vPostgres as a virtual appliance, which
creates a virtual machine and then loads specific software onto that virtual machine.
You can install vPostgres as an .ova file on VMware vSphere 5.x (recommened for a production system),
VMware Workstation 8.x, VMware Fusion 4.x or VMware Player 4.x.
Note: If you want to install vPostgres on an existing virtual machine, you can use the .rpm files to install the
vPostgres database.
See Installing vPostgres Using RPM Files, if you want to deploy vPostgres using RPM files.
After you have installed the appliance, you will have a new virtual machine running the SUSE 11 sp1 operating
system with vPostgres server and client database software. You will also have four virtual hard disks: hard
disk 1 (root), hard disk 2 (PGDATA), hard disk 3 (swap) and hard disk 4 (diagnostic/core).
These hard disks are created in the order mentioned above, and are assigned names that match your virtual
machine name, but have slightly different disk numbering (see the following steps for the default disk creation).
The following steps assume you have already downloaded the vPostgres appliance (.ova) file and extracted
the archive to a directory that contains the following files.
Installing on vSphere 5.x
Use the following steps to install the vPostgres appliance on vSphere 5.x.
1. Power on your vSphere host.
2. Connect to the host with your vSphere client.
3. Select File -> Deploy OVF Template
vFabric Postgres Standard Edition User Guide
10 VMware, Inc.
4. Browse to the .ovf file
5. Accept the license agreement (EULA)
6. Wait for the appliance to deploy
7. Revise your resources as needed. This step is optional. The default configuration is:
n
Memory: 512 MB
n
vCPU: 1
n
Hard Disk 1 - Root disk: 2 GB (vmname.vmdk)
n
Hard Disk 2 - Data disk (PGDATA): 8 GB (vmname_1.vmdk)
n
Hard Disk 3 - Swap disk: 1 GB (vmname_2.vmdk)
n
Hard Disk 4 - Diagnostic/core disk: 1 GB (vmname_3.vmdk)
8. Set the network configuration if you want to use a static ip address, or leave the settings blank and the virtual
machine with default to use dhcp settings.
You can use the following network configuration script to change the ip address of the deployed virtual
machine: /opt/vmware/share/vami/vami_config_net.
9. Power on the new virtual machine.
10. Open the console and check the random password on the screen.
11. Log in as root, using the random password.
12. Change the password using /opt/aurora/sbin/set_password. This sets the password for both the root and
the 'postgres' user (on both system and database).
Now you can connect to the database from a client.
Installing on Workstation 8.x
Use the following steps to install the vPostgres appliance on Workstation 8.x.
1. Select File -> Open.
2. Browse to the .ovf file, and double-click to open it.
3. Accept the license agreement (EULA).
4. Wait for the appliance to deploy.
5. Revise your resources as needed. This step is optional. The default configuration is:
n
Memory: 512 MB
n
vCPU: 1
n
Hard Disk 1 - Root disk: 2 GB (vmname.vmdk)
n
Hard Disk 2 - Data disk (PGDATA): 8 GB (vmname_1.vmdk)
n
Hard Disk 3 - Swap disk: 1 GB (vmname_2.vmdk)
n
Hard Disk 4 - Diagnostic/core disk: 1 GB (vmname_3.vmdk)
6. The network configuration is set to dhcp by default. Add network configuration values if you want to use
a static ip address.
7. You can use the following network configuration script to change the ip address of the deployed virtual
machine: /opt/vmware/share/vami/vami_config_net.
8. Power on the virtual machine.
Chapter 2 Installation Overview
VMware, Inc. 11
9. Open the console and locate the random password on the screen.
10. Log in as root, using the random password.
11. Change the password using /opt/aurora/sbin/set_password. This sets the password for both the root and
the 'postgres' user (on both system and database).
Now you can connect to this database from a client.
Installing on Fusion
1. Install the ovftool on your Fusion application.
2. In a terminal/command window, type ovftool path/aurora_dbvm-9.1.3.0-683886.ovf
path/aurora_dbvm-9.1.3.0-683886.vmx to change the format.
3. Use the File ->Open command to select and open the .vmx file.
4. The appliance will install and create a vPostgres virtual machine.
5. Revise your resources as needed. This step is optional. The default configuration is:
n
Memory: 512 MB
n
vCPU: 1
n
Hard Disk 1 - Root disk: 2 GB (vmname.vmdk)
n
Hard Disk 2 - Data disk (PGDATA): 8 GB (vmname_1.vmdk)
n
Hard Disk 3 - Swap disk: 1 GB (vmname_2.vmdk)
n
Hard Disk 4 - Diagnostic/core disk: 1 GB (vmname_3.vmdk)
6. Set the network configuration if you want to use a static ip address, or leave the settings blank and the virtual
machine with default to use dhcp settings.
You can use the following network configuration script to change the ip address of the deployed virtual
machine: /opt/vmware/share/vami/vami_config_net.
7. Power on the virtual machine.
8. Open the console and locate the random password on the screen.
9. Log in as root, using the random password.
10. Change the password using /opt/aurora/sbin/set_password. This sets the password for both the root and
the 'postgres' user (on both system and database).
Now you can connect to this database from a client.
Installing on Player 4.x
1. Use the File ->Open command to select and open the .vmx file.
2. The appliance will install and create a vPostgres virtual machine.
3. Revise your resources as needed. This step is optional. The default configuration is:
n
Memory: 512 MB
n
vCPU: 1
n
Hard Disk 1 - Root disk: 2 GB (vmname.vmdk)
n
Hard Disk 2 - Data disk (PGDATA): 8 GB (vmname_1.vmdk)
n
Hard Disk 3 - Swap disk: 1 GB (vmname_2.vmdk)
vFabric Postgres Standard Edition User Guide
12 VMware, Inc.
n
Hard Disk 4 - Diagnostic/core disk: 1 GB (vmname_3.vmdk)
4. Set the network configuration if you want to use a static ip address, or leave the settings blank and the virtual
machine with default to use dhcp settings.
You can use the following network configuration script to change the ip address of the deployed virtual
machine: /opt/vmware/share/vami/vami_config_net.
5. Power on the virtual machine.
6. Open the console and locate the random password on the screen.
7. Log in as root, using the random password.
8. Change the password using /opt/aurora/sbin/set_password. This sets the password for both the root and the
'postgres' user (on both system and database).
Now you can connect to this database from a client.
Installing vPostgres Using RPM Files
Use the .rpm files to install the vFabric Postgres Standard Edition database, if the you want to install the
database on a new or exising virtual machine.
The vPostgres server software is currently only supported on the operating systems listed in the following
table.
Table 2-3. Server Operating System Requirements
Red Hat Linux SUSE Linux
Supported Versions RHEL 6.2 (64-bit) SLES 11 sp1 (64-bit)
Before you install the .rpm files, create a new virtual machine running either the SUSE 11 sp1 operating system
or the RHEL 6.2 operating system, or log onto a virtual machine where one of these operating systems is already
running.
Download the RPM Files
Ensure that your virtual machine or Linux computer can see the web, and then download the following files
from the VMware Web site.
n
vfabric-eula-9.1.3.0-683886.x86_64.rpm
n
VMware-vPostgres-client-9.1.3.0-683886.x86_64.rpm
n
VMware-vPostgres-9.1.3.0-683886.x86_64.rpm
n
VMware-vPostgres-server-tools-9.1.3.0-683886.x86_64.rpm (recommended)
n
VMware-vPostgres-server-extensions-9.1.3.0-683886.x86_64.rpm (recommended)
n
VMware-vPostgres-client-devel-9.1.3.0-683886.x86_64.rpm (optional)
n
VMware-vPostgres-server-devel-9.1.3.0-683886.x86_64.rpm (optional)
n
VMware-vPostgres-server-init-9.1.3.0-683886.x86_64.rpm
Note that if you install 32-bit binaries on a 64-bit system, you will need to install compatibility libraries as well.
On RHEL6, use "yum install glibc.i686 nss-softokn-freebl.i686".
Install the RPM Files
Install each of the .rpm files using the rpm -ivh command, in the order shown below. You can install all of the
files at once, with a single 'rpm -ivh' command.
Chapter 2 Installation Overview
VMware, Inc. 13
Note that the files that contain 'devel' in the name are optional.
>rpm -ivh VMware-vPostgres-client-9.1.3.0-683886.x86_64.rpm
VMware-vPostgres-9.1.3.0-683886.x86_64.rpm
VMware-vPostgres-server-tools-9.1.3.0-683886.x86_64.rpm
VMware-vPostgres-server-extensions-9.1.3.0-683886.x86_64.rpm
VMware-vPostgres-client-devel-9.1.3.0-683886.x86_64.rpm
VMware-vPostgres-server-devel-9.1.3.0-683886.x86_64.rpm
VMware-vPostgres-server-init-9.1.3.0-683886.x86_64.rpm
After these files have been installed, you will have a database instance in the var/vmware/vpostgres/9.1/pgdata
directory, where the user name is "postgres", and you will have a "postgres" user for your operating system.
Log into with the 60-day license key and set the password manually.
To set the password for the "postgres" database user (optional if you only need to connect to the database from
the local host):
$/opt/vmware/vpostgres/current/bin/psql -c
To set the password for the "postgres" operating system user (optional):
Log in as "root".
$passwd postgres
vFabric Postgres Standard Edition User Guide
14 VMware, Inc.
vPostgres Client Tools and Libraries 3
You can use vPostgres client tools to print configuration parameters and to back up and restore vPostgres
databases. The command line front end to PostgreSQL, psql, is also included.
The vPostgres client tools are based on the Postgres client database tools and are customized for vPostgres.
Versions for Linux x86, 32 bit and 64 bit, and for Windows x86, 32 bit and 64 bit are available.
Linux
The Linux RPM includes ODBC drivers for vPostgres. The Linux ODBC driver
requires unixODBC-2.3.1 or greater.
Windows
The vPostgres installer package for Windows includes ODBC and JDBC drivers
for vPostgres.
The following vPostgres client database tools are included in the vPostgres client tools package.
Table 3-1. vPostgres Client Tools
Tool Description
pg_config Prints the current vPostgres installation's configuration
parameters.
pg_dump Backs up vPostgres databases
pg_restore Restores vPostgres databases from archives created by
pg_dump.
psql Command line based front end to PostgreSQL.
The vPostgres client tools ship with the following libraries.
Table 3-2. vPostgres Client Tool Libraries
Library Description
libpq.so (Linux) or libpq.dll (Windows) The C API to PostgreSQL. Libpq is the underlying engine for
several PostgreSQL APIs such as those written for C++, Perl,
Python, Tcl, and ECPG.
psqlodbcw.so (Linux) or psqlodbc35w.dll (Windows) The ODBC driver for PostgreSQL.
The vPostgres client tool libraries are customized for use with vPostgres databases, but you can use the
standard Postgres libraries. To ensure that you link with the vPostgres libraries, do one of the following.
n
If you want to keep the standard Postgres libraries on your system, ensure that your LD_LIBRARY_PATH
environment variable specifies the location of the vPostgres libraries first.
n
If you do not want to keep the standard Postgres libraries, remove them and ensure that your
LD_LIBRARY_PATH environment variable points to the location of the vPostgres libraries on your
system.
VMware, Inc.
15
This chapter includes the following topics:
n
“Client Tool Packages and Drivers,” on page 16
n
“Install the Client Tools Package,” on page 17
n
“Installing vPostgres Client Tools,” on page 18
n
“Add an x86 vPostgres ODBC Data Source on Windows,” on page 18
n
“Using vPostgres libpq with Your Application,” on page 18
Client Tool Packages and Drivers
Packages
If you plan to write code, and you plan on compiling an application to link with libpq, download both the
client package and the development package.
You can download the client tool package for your platform from the VMware download site at
http://www.vmware.com/go/download-datadirector.
Table 3-3. Client Tool Packages
Operating System Packages
Microsoft Windows Windows client tools packages are available for 32-bit and
64-bit systems.
Linux The following Linux client tools packages are available for
32-bit and 64-bit systems.
n
A JDBC package in ZIP format. The JDBC package
provides the JDBC driver and sample code.
n
Client RPMs for 32-bit and 64-bit systems. The client
RPMs provide platform-appropriate binaries, ODBC
driver, and libraries.
n
Client development RPMs for 32-bit and 64-bit systems.
The client development RPMs provide platform-
appropriate include files for application development.
Client Drivers
The vPostgres client tools package includes a JDBC driver and an ODBC driver customized for vPostgres. Use
the vPostgres JDBC or ODBC drivers, not the standard Postgres drivers, to connect to Data Director.
JDBC Driver
After installation, you can find the JDBC driver in the following locations.
Table 3-4. Location of JDBC Driver
Operating System JDBC Driver Location
Microsoft Windows
C:\Program
Files\VMware\vPostgres\9.1\JDBC
Linux
/opt/vmware/vpostgres/9.1/JDBC
The Samples directory contains a simple Java example and README file that show
how to connect to Data Director using JDBC.
vFabric Postgres Standard Edition User Guide
16 VMware, Inc.
If your application uses the JDBC driver to access a database, and you install
the application as /usr/local/lib/myapp.jar and the PostgreSQL JDBC driver
as /usr/local/pgsql/share/java/postgresql.jar, you run the application as
follows.
export
CLASSPATH=/usr/local/lib/myapp.jar:/usr/local/pgsql/share/java/postgr
esql.jar:.java MyApp
ODBC Driver
The vPostgres installation process installs the vPostgres ODBC driver. To
verify the Windows ODBC driver installation, go to Start > Administrative
Tools > Data Sources (ODBC), and click the Drivers tab. The VMware vPostgres
ODBC driver appears in the list of installed ODBC drivers.
Install the Client Tools Package
Prerequisites
Download the package. See “Client Tool Packages and Drivers,” on page 16.
The ESXi host for Data Director is up and running.
Procedure
1 Install the package.
Operating System Installation Process
Linux
Run the RPM package by using the following command.
rpm -ivh pathToClientRpms
pathToClientRpms is the full pathname of the RPM package location on your
system. The default installed location is /opt/vmware/vpostgres/9.1.
Use -Uvh instead of -ivh if you perform an upgrade.
Windows
Double-click the installer to start the installer. Accept the license agreement
and confirm the install location. Installation proceeds. The default installed
location is \Program Files\VMware\vPostgres\9.1\. If you install the
x86 vPostgres client tools on a Windows 64-bit system, the Windows installer
places the client tools in \Program Files
(x86)\VMware\vPostgres\9.1\.
2 Ensure that your PATH environment variable includes the location of the vPostgres client tools, for
example C:\Program Files\VMware\vPostgres\1.0\bin
What to do next
If you install both the x86 and the 64 bit vPostgres client tools on the system, you can add an x86 ODBC data
source. See “Add an x86 vPostgres ODBC Data Source on Windows,” on page 18.
If you are developing a custom application, relink with libpq. See “Using vPostgres libpq with Your
Application,” on page 18.
Chapter 3 vPostgres Client Tools and Libraries
VMware, Inc. 17
Installing vPostgres Client Tools
You can install the vPostgres Client Tools on Windows or Linux systems. The package includes drivers
customized for vPostgres. You can install only the base package, or install the development RPMs as well.
Add an x86 vPostgres ODBC Data Source on Windows
If you install both the x86 and the 64-bit vPostgres client tools on the same 64-bit Windows system, you must
explicitly add an x86 ODBC data source.
Prerequisites
Install the x86 and the 64-bit vPostgres client tools.
Procedure
1 In Windows Explorer, go to C:\Windows\SysWOW64\.
2 Double-click Odbcad32.exe.
3 Select the System DNS tab and click Add.
4 Click the VMware vPosgres PostgreSQL Unicode 32bit data source.
5 Click Finish.
Using vPostgres libpq with Your Application
If you want to use an existing Postgres application with vPostgres, you can relink the application.
Prerequisites
Install the vPostgres client tools. You do not have to install the development RPMs if you relink.
Because our libpq.so is dynamically linked with libssl, the static ld linker doesn't recognize the rpath of
$ORIGIN. Therefore, it is important to specify the rpath when building. See the Linux example in the table
below for the correct syntax.
vFabric Postgres Standard Edition User Guide
18 VMware, Inc.
Procedure
u
Relink with vPostgres based on your operating system.
Operating System Relinking Process
Linux
a See /opt/vmware/vpostgres/1.0/share/libpq-
doc/README.vpostgres-libpq.
b Override the dynamic library search path by
adding /opt/vmware/vpostgres/current/lib-public to
LD_LIBRARY_PATH.
# export LD_LIBRARY_PATH=/opt/vmware/vpostgres/
1.0/lib-public
# mypgapp
- or -
c Relink using the vPostgres libpq.
# gcc -o t t.c -L/opt/vmware/vpostgres/current
/lib -Wl,'-rpath=/opt/vmware/vpostgres/current/lib' -lpq
Windows
Copy the libpq and other libraries into the directory of the application
binaries and relink.
By default , the libraries and header files are in the following locations.
Development
libraries
C:\Program Files\VMware\vPostgres\9.1\dev
libpgport.lib and
libpq.lib libraries
C:\Program
Files\VMware\vPostgres\9.1\dev\lib
libpq header
files
C:\Program
Files\VMware\vPostgres\9.1\dev\include
Chapter 3 vPostgres Client Tools and Libraries
VMware, Inc. 19
vFabric Postgres Standard Edition User Guide
20 VMware, Inc.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32

VMware vFabric Postgres 9.1 User guide

Type
User guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI