Cybertec

Download

PostgreSQL Database Links: ODBC-Link 1.0.3
ODBC-Link 1.0.3 is a dblink-style implementation of database links for PostgreSQL. It allows people to connect from PostgreSQL to any ODBC compliant data source and fetch data from any ODBC compliant remote data source. Using ODBC Link you can easily integrate PostgreSQL with other databases and easily send data across a network. In contrast to other implementations ODBC-Link is entirely written in C and offers superior performance and little overhead.

You can either read its documentation online or download as pdf.

ODBC-Link-1.0.3.tar.gz

—————————————————————–

Enhanced Linux OOM-killer functionality

This patch allows administrators to flexibly configure the Linux kernel OOM-killer to kill processes defined by the administrator rather and processes selected internally.

To use this feature, edit /proc/sys/vm/oom_preferred_tasks.

Here are some examples:

  • mallocbomb”
  • mytask,mallocbomb”
  • mytask,mallocbomb,myprog”

The string accepted is up to 4096 bytes. Processes can be listed using a comma separated list.
3 types of config are allowed:

  1. full path of the executable, checked using the /proc/PID/exe link
  2. file name of the executable without the path, also checked as above
  3. file name of the executable without the path, checked using the “comm” property of struct task_struct, which is approximately the process name as visible in top/ps.

A small test program and the patch itself for 3 different kernel versions:

mallocbomb.c

—————————————————————–

CONNECT BY for PostgreSQL 8.3

Many people from around the globe have been asking for a method to perform recursive queries with PostgreSQL.
Here is an example:

SELECT METIER_ID||'|'||ORGANISATION_ID AS JOBORG
FROM INTRA_METIER,INTRA_ORGANISATION
WHERE METIER_ID IN(
       SELECT METIER_ID
       FROM INTRA_METIER
       START WITH METIER_ID= '99533220-e8b2-4121-998c-808ea8ca2da7'
       CONNECT BY METIER_ID= PRIOR PARENT_METIER_ID
     ) AND ORGANISATION_ID IN (
       SELECT ORGANISATION_ID
       FROM INTRA_ORGANISATION
       START WITH ORGANISATION_ID='025ee58f-35a3-4183-8679-01472838f753'
       CONNECT BY ORGANISATION_ID= PRIOR PARENT_ORGANISATION_ID
    );

 

CONNECT BY will help you to query trees fast and efficiently.

A PostgreSQL 8.3 RC2 based tarball can be downloaded here: postgresql-8.3RC2_recursive_edition.tar.gz

Cybertec is a company offering a comprehensive set of services for the world's most advanced Open Source database, PostgreSQL.
Our products work on all platforms including Linux, Solaris, and Windows. No matter whether your application is small or complex - we have the right solution for you.