CartoDB / pg_schema_triggers

PostgreSQL 9.3+ Schema Triggers extension
BSD 2-Clause "Simplified" License
11 stars 6 forks source link

schema_triggers not compatible with pg_stats_statements #4

Open javisantana opened 9 years ago

javisantana commented 9 years ago

if you try to load both at the same time postgres is not able to start

pramsey commented 9 years ago

OK, it looks like pg_stats_statements is careful about allowing existing hooks to run, while pg_schema_triggers just errors out if someone has gotten to the hook before it has. As a first workaround, I would hope that loading pg_schema_triggers first would avoid the problem (and then pg_stats_statements would just happily delegate to it). I'll test this supposition and look at making pg_schema_triggers more friendly to other hooks.

pramsey commented 9 years ago

Confirmed, this works

shared_preload_libraries = 'schema_triggers.so,pg_stat_statements.so'

and this does not

shared_preload_libraries = 'pg_stat_statements.so,schema_triggers.so'