Skip to content

Instantly share code, notes, and snippets.

@lfittl
Last active December 11, 2018 00:39
Show Gist options
  • Save lfittl/45b7f7de4f02996c14b79c6750161f9c to your computer and use it in GitHub Desktop.
Save lfittl/45b7f7de4f02996c14b79c6750161f9c to your computer and use it in GitHub Desktop.
Postgres 12 patches worth writing

Postgres Patches for 12

  • queryid in log_min_duration_statement
  • queryid generation in core instead of contrib/pg_stat_statements
  • pg_stat_plans in contrib (think of pg_stat_statements + auto_explain, possibly just store the EXPLAIN output as the text)
  • pg_stat_statements in core
  • pg_stat_statements should have idx_scan and seq_scan counters
  • changefeeds (aka logical decoding for realtime updates, instead of LISTEN/NOTIFY)
  • JSON logical decoder in core
  • COPY from URL / Make COPY extendable (so there can be an S3 handler)
  • failover++ (any step towards a self-managed cluster is a good step)
  • TX connection pooler in contrib
  • logical rep for upgrades (DDL changes replicated, ALL TABLES persisting when new changes come in)
  • logical rep for analytics (omit columns, document query cancel behaviour)
  • allow standby to have lower max connections than primary
  • any improvements to exclusive locks for DDL changes (e.g. https://twitter.com/bjeanes/status/851246217065398272)
  • Filter out PII from logs more easily (log_error_verbosity is the only thing that kind of solves this right now, this should be possible in an extension according to Andres since there are hooks for log output)
  • Error statistics (SQL error code, source file, source line, calls)
  • "Tags" for pg_stat_statements
  • Ring buffer that remembers transaction context (so you know what ran before, e.g. for deadlock detected)
  • In-core UUID generation method that is part timestamp, part random
  • TODO List Item: Prevent PL/pgSQL comment from throwing an error in a non-superuser restore
  • almost_superuser extension for Postgres (like RDS superuser)
  • pg_stat_statements: Improve handling of cursor and temporary table names (ignore them for fingerprint)
  • Soft-delete of ENUM values
  • pg_restore --no-operator-families
  • "Master Server" => "Primary Server" in GUC group name
  • Bug #14860 pg_monitor role is missing access to wal_sender data (see https://www.postgresql.org/message-id/attachment/49958/pg_monitor.diff for original patch that patched wal_receiver but not wal_sender)
  • auto_explain regression tests
  • planning time in pg_stat_statements
  • memory statistics tracking (per connection)
    • this can be a starting patch for better resource management in Postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment