Pigsty Blog Articles

Posts in 2018
  • Monitoring Table Size in PostgreSQL

    May 14, 2018 in PostgreSQL

    Monitoring Table Size in PostgreSQL

    Tables in PostgreSQL correspond to many physical files. This article explains how to calculate the actual size of a table in PostgreSQL.

    Read more

    Tables in PostgreSQL correspond to many physical files. This article explains how to calculate the actual size of a table in PostgreSQL.

    Read more

  • Consistency: An Overloaded Term

    May 08, 2018 in Database

    Consistency: An Overloaded Term

    The term "consistency" is heavily overloaded, representing different concepts in different contexts. For example, the C in ACID and the C in CAP actually refer to different concepts.

    Read more

    The term "consistency" is heavily overloaded, representing different concepts in different contexts. For example, the C in ACID and the C in CAP actually refer to different concepts.

    Read more

  • Why Study Database Principles

    April 20, 2018 in Database

    Why Study Database Principles

    Those who only know how to code are just programmers; **learn databases well, and you can at least make a living**; but for **excellent** engineers, merely **using** databases is far from enough.

    Read more

    Those who only know how to code are just programmers; **learn databases well, and you can at least make a living**; but for **excellent** engineers, merely **using** databases is far from enough.

    Read more

  • PgAdmin Installation and Configuration

    April 14, 2018 in PostgreSQL

    PgAdmin Installation and Configuration

    PgAdmin is a GUI program for managing PostgreSQL, written in Python, but it's quite dated and requires some additional configuration.

    Read more

    PgAdmin is a GUI program for managing PostgreSQL, written in Python, but it's quite dated and requires some additional configuration.

    Read more

  • Incident-Report: Uneven Load Avalanche

    April 08, 2018 in PostgreSQL

    Incident-Report: Uneven Load Avalanche

    Recently there was a perplexing incident where a database had half its data volume and load migrated away, but ended up being overwhelmed due to increased load.

    Read more

    Recently there was a perplexing incident where a database had half its data volume and load migrated away, but ended up being overwhelmed due to increased load.

    Read more

  • Bash and psql Tips

    April 07, 2018 in PostgreSQL

    Bash and psql Tips

    Some tips for interacting between PostgreSQL and Bash.

    Read more

    Some tips for interacting between PostgreSQL and Bash.

    Read more

  • Implementing Mutual Exclusion Constraints with Exclude

    April 06, 2018 in PostgreSQL

    Implementing Mutual Exclusion Constraints with Exclude

    Exclude constraint is a PostgreSQL extension that can implement more advanced and sophisticated database constraints.

    Read more

    Exclude constraint is a PostgreSQL extension that can implement more advanced and sophisticated database constraints.

    Read more

  • Function Volatility Classification Levels

    April 06, 2018 in PostgreSQL

    Function Volatility Classification Levels

    PostgreSQL functions have three volatility levels by default. Proper use can significantly improve performance.

    Read more

    PostgreSQL functions have three volatility levels by default. Proper use can significantly improve performance.

    Read more

  • Distinct On: Remove Duplicate Data

    April 06, 2018 in PostgreSQL

    Distinct On: Remove Duplicate Data

    Use Distinct On extension clause to quickly find records with maximum/minimum values within groups

    Read more

    Use Distinct On extension clause to quickly find records with maximum/minimum values within groups

    Read more

  • PostgreSQL Routine Maintenance

    February 10, 2018 in PostgreSQL

    PostgreSQL Routine Maintenance

    Cars need oil changes, databases need maintenance. For PG, three important maintenance tasks: backup, repack, vacuum

    Read more

    Cars need oil changes, databases need maintenance. For PG, three important maintenance tasks: backup, repack, vacuum

    Read more