text: create table emserr_tmp
  (
      time       timestamp with time zone,
      host       text,
      path       text,
      date       text,
      error_text text,
      gentime    text,
      source     text
  );
  
  comment on column emserr_tmp.host is 'tag';
  
  comment on column emserr_tmp.path is 'tag';
  
  alter table emserr_tmp
      owner to pgwriter;
  
  grant select on emserr_tmp to grafanareader;
  
  SELECT create_hypertable('emserr_tmp', 'time', chunk_time_interval => 86400000000);
  
  DROP TABLE emserr; 
  
  ALTER TABLE emserr_tmp RENAME TO emserr; 