On 5th of April, Simon Riggs committed patch: Reduce lock levels of some trigger DDL and add FKs Reduce lock levels to ShareRowExclusive for the following SQL CREATE TRIGGER (but not DROP or ALTER) ALTER TABLE ENABLE TRIGGER ALTER TABLE DISABLE TRIGGER ...

On 7th of October, Alvaro Herrera committed patch: Implement SKIP LOCKED for row-level locks This clause changes the behavior of SELECT locking clauses in the presence of locked rows: instead of causing a process to block waiting for the locks held by other processes ...

On 16th of July, Kevin Grittner committed patch: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY. This allows reads to continue without any blocking while a REFRESH runs. The new data appears atomically as part of transaction commit. Review questioned the Assert that a matview ...

On 6th of April, Simon Riggs committed patch: Add DROP INDEX CONCURRENTLY [IF EXISTS], uses ShareUpdateExclusiveLock

If you have production DB servers, chances are you're running variant of these queries: SELECT sum(pg_relation_size(oid)) from pg_class where relkind = 'i' SELECT sum(pg_relation_size(oid)) from pg_class where relkind = 'r' To get summarized size of tables and/or indexes in your database (for example ...

July 6th, 2011 by depesz | Tags: , , , , , , , | 20 comments »

For various reasons, and in various cases, bloat happens. Theoretically autovacuum protects us all, but sometimes it doesn't. Sometimes someone disables it, or mis-configures, or bad planet alignment happens, and we end up in deep bloat. What to do then? Vacuum? ...

On 18th of February, Itagaki Takahiro committed patch: Add transaction-level advisory locks.   They share the same locking namespace with the existing session-level advisory locks, but they are automatically released at the end of the current transaction and cannot be released explicitly via unlock functions.   Marko Tiikkaja, ...

On 8th of February, Simon Riggs committed patch: Extend ALTER TABLE to allow Foreign Keys to be added without initial validation. FK constraints that are marked NOT VALID may later be VALIDATED, which uses an ShareUpdateExclusiveLock on constraint table and RowShareLock on referenced table. ...

On 28th of July, Simon Riggs committed patch which: Log Message: ----------- Reduce lock levels of CREATE TRIGGER and some ALTER TABLE, CREATE RULE actions. Avoid hard-coding lockmode used for many altering DDL commands, allowing easier future changes of lock levels. Implementation of initial analysis ...