PostgreSQL

PostgreSQL (/ˌpoʊstɡrɛskjuˈɛl/ POHST-gres-kew-EL)[11][12] also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance.

[26] He returned to Berkeley in 1985, and began a post-Ingres project to address the problems with contemporary database systems that had become increasingly clear during the early 1980s.

The new project, POSTGRES, aimed to add the fewest features needed to completely support data types.

[30] These features included the ability to define types and to fully describe relationships – something used widely, but maintained entirely by the user.

In POSTGRES, the database understood relationships, and could retrieve information in related tables in a natural way using rules.

[31] Starting in 1986, published papers described the basis of the system, and a prototype version was shown at the 1988 ACM SIGMOD Conference.

Version 3, released in 1991, again re-wrote the rules system, and added support for multiple storage managers[32] and an improved query engine.

At the time, POSTGRES used an Ingres-influenced POSTQUEL query language interpreter, which could be interactively used with a console application named monitor.

[3] With the participation of Bruce Momjian and Vadim B. Mikheev, work began to stabilize the code inherited from Berkeley.

[2] The project continues to make releases available under its free and open-source software PostgreSQL License.

This largely eliminates the need for read locks, and ensures the database maintains ACID principles.

[35] The PostgreSQL MVCC implementation is prone to performance issues that require tuning when under a heavy write load which updates existing rows.

Unlike other database systems, the durability of a transaction (whether it is asynchronous or synchronous) can be specified per-database, per-user, per-session or even per-transaction.

Examples of these include the geographic information system (GIS) data types from the PostGIS project for PostgreSQL.

Inheritance provides a way to map the features of generalization hierarchies depicted in entity–relationship diagrams (ERDs) directly into the PostgreSQL database.

PostgreSQL supports a binary communication protocol that allows applications to connect to the database server.

[48] In addition, the officially supported ECPG tool allows SQL commands to be embedded in C code.

[50] Third-party libraries for connecting to PostgreSQL are available for many programming languages, including C++,[51] Java,[52] Julia,[53][54][55] Python,[56] Node.js,[57] Go,[58] and Rust.

PostgreSQL provides an asynchronous messaging system that is accessed through the NOTIFY, LISTEN and UNLISTEN commands.

A session can issue a NOTIFY command, along with the user-specified channel and an optional payload, to mark a particular event occurring.

This functionality can be used for a wide variety of purposes, such as letting other sessions know when a table has updated or for separate applications to detect when a particular action has been performed.

Such a system prevents the need for continuous polling by applications to see if anything has yet changed, and reducing unnecessary overhead.

Many connectors for PostgreSQL provide support for this notification system (including libpq, JDBC, Npgsql, psycopg and node.js) so it can be used by external applications.

[76][77] PostgreSQL natively supports a broad number of external authentication mechanisms, including: The GSSAPI, SSPI, Kerberos, peer, ident and certificate methods can also use a specified "map" file that lists which users matched by that authentication system are allowed to connect as a specific database user.

Other shortcomings concern the absence of temporal tables allowing automatic logging of row versions during transactions with the possibility of browsing in time (FOR SYSTEM TIME predicate),[citation needed] although relatively SQL compliant third-party extensions are available.

[84] The default configuration of PostgreSQL uses only a small amount of dedicated memory for performance-critical purposes such as caching database blocks and sorting.

This limitation is primarily because older operating systems required kernel changes to allow allocating large blocks of shared memory.

[86] In April 2012, Robert Haas of EnterpriseDB demonstrated PostgreSQL 9.2's linear CPU scalability using a server with 64 cores.

[87] Matloob Khushi performed benchmarking between PostgreSQL 9.0 and MySQL 5.6.15 for their ability to process genomic data.

PostgreSQL can be expected to work on any of the following instruction set architectures (and operating systems): 64-bit x86-64 and 32-bit x86 on Windows and other operating systems; these are supported on other than Windows: 64-bit ARM[93] and the older 32-bit ARM, including older such as ARMv6 in Raspberry Pi[94]), RISC-V, z/Architecture, S/390, PowerPC (incl.