Postgres also known as PostgreSQL, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. PostgreSQL features transactions with atomicity, consistency, isolation, durability (ACID) properties, automatically updatable views, materialized views, triggers, foreign keys, and stored procedures. It is supported on all major operating systems, including Linux, FreeBSD, OpenBSD, macOS, and Windows, and handles a range of workloads from single machines to data warehouses or web services with many concurrent users. It’s a popular choice for storing and managing large amounts of data due to its reliability, scalability, and flexibility.
Key Features:
- Relational database: Stores data in tables with well-defined schemas
- ACID compliant: Ensures database transactions are secure and reliable
- Extensive indexing: Supports various indexing techniques for fast data retrieval
- SQL and NoSQL capabilities: Supports both structured and unstructured data
- Cross-platform: Runs on various operating systems, including Windows, Linux, and macOS
Common Use Cases:
- Web applications: Powering backend databases for web apps
- Data analytics: Storing and processing large datasets for analysis
- Enterprise software: Supporting complex, data-driven applications
Install Postgres
sudo apt updatesudo apt install postgresql
Configure Postgres
sudo vim /etc/postgresql/12/main/postgresql.conf
# Configure this in the file:
# listen_addresses = '*'
sudo service postgresql restart
sudo vim /etc/postgresql/12/main/pg_hba.conf
# Configure this in the file:
# # TYPE DATABASE USER CIDR-ADDRESS METHOD
# host all all 0.0.0.0/0 md5
sudo service postgresql restart