/ home / computer / postgresql / .
My notes of the presentatons of the Swiss PostgreSQL Conference, 26./27. June 2025 in Rapperswil (SG/CH).
Bruce Momjian, EDB
Laurenz Albe, Cybertec
TIMESTAMP WITH TIMEZONE → 8 bytesTIMESTAMP WITH TIMEZONE (Optimizer)INTERVALBYTEAINT = INTEGER → BIGINTJSONB, XMLINTEGER 4 byte → BIGINT (immer!) 8 byteINTEGER, SMALLINTALTER TABLE:foreach chunk {
UPDATE (1M rows)
VACCUM
}
VARCHAR() → TEXT selbe ImplementierungNOT NULL definierenOIDpg_largeobjectBYTEA verwenden (schlechtes Beispiel: Hybernate)ENUM nur wenn keine Werte je gedropped werden müssen → Lookup Table verwendenJSONBPatrick Stählin, aiven
WHERE filterpg_waldump (similar to mysqlbinlog)pg_createsubscriber → log replication from physical backupGianni Ciolli, EDB
pgvector for performanceDaniel Krefl, Sednai
Andreas Geppert, ZKB
JSON
JSON (ungeparst) + JSONB (binary, geparst)JSONB onlyTEXT → JSON (validated) → JSONB (functions)Devrim Gunduz, EDB
SELECT * means: “all user columns” → visible, system columnsxact - Transactiontxid - Transaction ID, 32 bit, 4 billions: circle → 2 billion transactions
ctid - physical location of data on disk (block nr + location of tuple in block). Do NOT depend on it.xmin - txid of the inserting trx for this row version: UPDATE is DELETE + INSERT!xmax - txid of deleting or updating trx - zero for undeleted rowcmin - command identifierINSERT: xmin = txid, xmax = 0autocommit = on default!DELETE leads to dead tuples (xmax = txid)$datadir/base direectory → databases$datadir/pg_xact directory → Commit Log (CLOG) maintains the state of transactions$datadir/pg_wal directory → WALxid
trxid wrap and problem” → AUTOVACUUMJosef Machytka, Credative
pg_duckdb (from MotherDuck), Column Store Enterprise versionpg_mooncake, Google AlloyDB, ParadeDBLuigi Nardi, DBtune
work_mem, shared_buffers, max_wal_size → Memorymax_parallel_workers_per_gather → complex queries, CPUrandom_page_cost → diskmax_parallel_workers_per_gather vs. random_page_costshared_buffers (requires restart) = 25% RAMmax_worker_processes (requires restart) ~ vCPUwork_memmax_parallel_workersmax_parallel_workers_per_gathereffective_io_concurrencybgwriter_lru_maxpagesrandom_page_costseq_page_costbgwriter_delaymax_wal_sizemin_wal_sizecheckpoint_completion_targetpgtune or on the webRenzo Dani, Log Object
Andrew Farries, Xata
Grant Fritchey, redgate
log_durationlog_min_duration file_fdwpg_read_file() → CSV + JSONpg_read_file(/var/log/postgres/*.log)auto_explain module: LOAD 'auto_explain';[ALTER SYSTEM](https://www.postgresql.org/docs/current/sql-altersystem.html) SET auto_explain.log_min_durationALTER SYSTEM SET auto_explain.log_analyzeALTER SYSTEM SET auto_explain.log_buffersALTER SYSTEM SET auto_explain.log_timingALTER SYSTEM SET auto_explain.log_verbose = truepg_stats_statements disabled → restart[pg_stats_statements.track](https://www.postgresql.org/docs/current/pgstatstatements.html#PGSTATSTATEMENTS-CONFIG-PARAMS) = 'top'
top → user queriesall → top + morenone → system queries[pg_stats_statement_track_plug](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-STATS-SETUP) = 'on'pg_stat_activitypg_stat_activity_statements !pg_stat_activity_statements_infopg_stat_statements_reset() → pgwatch
→ Aggregation only, no historyEXPLAIN SELECT ...: stats + planEXPLAIN ANALYZE SELECT...: + actual + measureEXPLAIN (ANALYZE, BUFFERS) SELECT ...: + count of blocks touchedVik Fearing
MIN/MAX/GREATEST/LEAST: PostgreSQL is not compliant with standard.pg_stats_statements table.