Suppressing CONTEXT lines in psql

CONTEXT messages are quite informative, but when you don't need them, they can be real pain in the eyes:

psql:trees.sql:68: NOTICE:  Adding tree structures to table public.testit.
CONTEXT:  SQL function "add_tree_structure" statement 1
psql:trees.sql:68: NOTICE:  Tree table will be public.testit_tree.
CONTEXT:  SQL function "add_tree_structure" statement 1
psql:trees.sql:68: NOTICE:  Primary key in source table is: id
CONTEXT:  SQL function "add_tree_structure" statement 1

I mean – I know the context. I'm writing the sql file right now, how to disable it?

Continue reading Suppressing CONTEXT lines in psql

Who/what is trashing db performance?

Every so often I need to find who exactly is damaging database performance. I mean – I have db connection which does something strange/wrong with the database, but what exactly is responsible?

Switching to separate user for every program, script and developer would solve the problem, but it is not always an option. So, what should I do?

Continue reading Who/what is trashing db performance?

Waiting for 8.4 – partial-match support in GIN, and sequence restart

Today we have two interesting patches:

  • patch by Teodor Sigaev and Oleg Bartunov, and committed by Tom Lane, which adds interesting capability to GIN indexes
  • patch by Zoltan Boszormenyi, also committed by Tom, which adds “RESTART" option to ALTER SEQUENCE. With some interesting consequences

Continue reading Waiting for 8.4 – partial-match support in GIN, and sequence restart