-1

I am using postgresql with pgadmin, I am getting following error

DBD::Pg::st execute failed: ERROR:  canceling statement due to user request
CONTEXT:  SQL statement "TRUNCATE mystats_na_apple.mv_xrx_cal_ids"
PL/pgSQL function mystats_na_apple.ld_mv_xrx_cal_ids() line 9 at SQL statement at line 187.

This is the function ld_mv_xrx_cal_ids

DECLARE

  err text;
  msg text;

BEGIN

TRUNCATE mystats_na_apple.mv_xrx_cal_ids;

INSERT INTO mystats_na_apple.mv_xrx_cal_ids
SELECT 
  dte,
  win_id,
  user_id,
  agt_name,
  lvl,
  job_code,
  sbu,
  cost_center,
  lob,
  hire_date,
  prod_date,
  sup_userid,
  sup_name,
  om_userid,
  om_name,
  gm_userid,
  gm_name,
  tenure_id,
  tenure_name,
  entity_id,
  genesys_id,
  nt_id,
  iex_id,
  mu_id
FROM dbi_link.remote_select(10,
'SELECT   dte,
  win_id,
  user_id,
  agt_name,
  lvl,
  job_code,
  sbu,
  cost_center,
  lob,
  hire_date,
  prod_date,
  sup_userid,
  sup_name,
  om_userid,
  om_name,
  gm_userid,
  gm_name,
  tenure_id,
  tenure_name,
  entity_id,
  null as genesys_id,
  null as nt_id,
  null as iex_id,
  mu_id
  FROM mystats_apple.mv_xrx_cal_ids
  where dte >= now()::DATE - 45'::TEXT)
remote_select(
    dte date,
  win_id bigint,
  user_id text,
  agt_name text,
  lvl integer,
  job_code text,
  sbu text,
  cost_center text,
  lob text,
  hire_date date,
  prod_date date,
  sup_userid text,
  sup_name text,
  om_userid text,
  om_name text,
  gm_userid text,
  gm_name text,
  tenure_id text,
  tenure_name text,
  entity_id integer,
  genesys_id text,
  nt_id text,
  iex_id text,
  mu_id text
  );


GRANT SELECT ON TABLE mystats_na_apple.mv_xrx_cal_ids TO webusers;
GRANT SELECT ON TABLE mystats_na_apple.mv_xrx_cal_ids TO dbi_link;

  RETURN 'Success!';

EXCEPTION WHEN OTHERS THEN BEGIN RETURN SQLERRM; END;
END;
0

The error message means that the PostgreSQL client sent a cancel request to the PostgreSQL server.

That could happen if you are using the psql command line client and hit Ctrl+C.

But perhaps some component on the client side has met a timeout and sends the cancel request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.