PostgreSQL is an open-source object-relational database system that uses and extends the SQL language.
- ACID compliance
- Complex queries
- Foreign keys
- Triggers
- Views
- Multiversion concurrency control
- Streaming replication
A non-clustered index is a type of index where the order of the rows does not match the order of the actual data.
- B-tree
- Hash
- GiST
- SP-GiST
- GIN
- BRIN
Indexes improve query performance by providing quick access paths to data, but they add overhead for write operations.
Yes, using either bytes or the large object feature.
- Better performance for reading
- Indexing support
- No parsing needed
- Compression
PostgreSQL allows columns of a table to be defined as variable-length multidimensional arrays.
Functions in PostgreSQL are also known as stored procedures. They can be created in several languages such as SQL, PL/pgSQL, C, Python, etc.
- Query functions
- Aggregate functions
- Window functions
- Trigger functions
- Table functions
- Functions must return a value
- Procedures are designed to execute operations
- Functions can be used in SELECT statements
- Procedures are called using CALL statement
Using ALTER TABLE with ALTER COLUMN statement.
- NOT NULL
- UNIQUE
- PRIMARY KEY
- FOREIGN KEY
- CHECK
- EXCLUDE
Using IS NULL, IS NOT NULL, COALESCE, and NULLIF functions.
MVCC provides concurrent access to the database without unnecessary locking.
- Read Uncommitted
- Read Committed
- Repeatable Read
- Serializable
PostgreSQL automatically detects deadlocks and resolves them by aborting one of the transactions.
- pg_dump
- pg_dumpall
- Continuous archiving
- Physical backups
- Streaming replication
- Logical replication
- Trigger-based replication
- Slony-I
WAL ensures data integrity by logging changes before they are written to the database.
- Use EXPLAIN ANALYZE
- Proper indexing
- Query rewriting
- Table partitioning
- Regular VACUUM
- shared_buffers
- work_mem
- maintenance_work_mem
- effective_cache_size
- max_connections
- Partitioning
- Table inheritance
- Regular cleanup
- Archiving old data
- Authentication methods
- Role-based access control
- SSL support
- Row-level security
- Column-level encryption
Using CREATE POLICY and ALTER TABLE ... ENABLE ROW LEVEL SECURITY.
- Password
- LDAP
- GSSAPI
- Certificate
- PAM
- Radius
- pg_stat_activity
- pg_stat_statements
- System catalogs
- Log analysis
- External monitoring tools
VACUUM reclaims storage occupied by dead tuples and updates statistics.
- Regular VACUUM
- CLUSTER command
- Table rewriting
- Monitoring bloat levels
- Streaming replication
- Patroni
- pgPool-II
- Stolon
- Repmgr
Using tools like:
- Patroni
- pgPool-II
- Repmgr
- Custom scripts
Connection pooling manages a pool of connections to reduce overhead of creating new connections.
- Replication setup
- Failover mechanisms
- Load balancing
- Monitoring
- Backup strategies
A storage repository that holds a vast amount of raw data in its native format.
A system for reporting and data analysis, considered a core component of business intelligence.
A decentralized socio-technical approach to share, access, and manage analytical data.
Storing data as a sequence of events rather than just the current state.
Pattern that separates read and write operations for a data store.
Using different data storage technologies for different data storage needs.
The process of storing data in more than one site or node.
A type of database partitioning that separates large databases into smaller, faster, more easily managed parts.
Representational State Transfer - architectural style for distributed hypermedia systems.
A query language for APIs and a runtime for executing those queries.
A high-performance, open-source universal RPC framework.
Strategies for managing changes to APIs without breaking existing clients.
A server that acts as an API front-end, receiving API requests and routing them to appropriate backends.
Tools and practices for documenting APIs effectively.
Methods and practices for securing APIs against various threats.
Controlling the rate of requests a client can make to an API.
Pattern that prevents an application from repeatedly trying to execute an operation that's likely to fail.
Pattern that enables an application to retry an operation in anticipation of it eventually succeeding.
Defining alternative actions when a service fails.
Isolating elements of an application into pools so that if one fails, the others will continue to function.
A service implementation to store messages that meet one or more of the following criteria:
- Message that is sent to a queue that does not exist.
- Queue length limit exceeded.
- Message length limit exceeded.
- Message is rejected by another queue exchange.
- Message reaches a threshold read counter number, because it is not consumed.
- Message TTL is exceeded.
Tools and practices for monitoring and tracking application errors.
Practices for effective application logging and monitoring.
The ability of a system to maintain limited functionality even when a large portion of it is inoperable.