mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
perf scripts python: export-to-postgresql.py: Fix DROP VIEW power_events_view
PostgreSQL can error if power_events_view is not dropped before its
dependent tables e.g.
Exception: Query failed: ERROR: cannot drop table mwait because other
objects depend on it
DETAIL: view power_events_view depends on table mwait
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Fixes: aba44287a2
("perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events")
Link: http://lkml.kernel.org/r/20190708055232.5032-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ceb75476db
commit
d8d051df9f
1 changed files with 1 additions and 1 deletions
|
@ -898,11 +898,11 @@ def trace_end():
|
|||
if is_table_empty("ptwrite"):
|
||||
drop("ptwrite")
|
||||
if is_table_empty("mwait") and is_table_empty("pwre") and is_table_empty("exstop") and is_table_empty("pwrx"):
|
||||
do_query(query, 'DROP VIEW power_events_view');
|
||||
drop("mwait")
|
||||
drop("pwre")
|
||||
drop("exstop")
|
||||
drop("pwrx")
|
||||
do_query(query, 'DROP VIEW power_events_view');
|
||||
if is_table_empty("cbr"):
|
||||
drop("cbr")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue