Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
vacuum analyze;
possibly better:
vacuum (verbose, analyze, skip_locked);

Check for deleted cluster records (There should be NO clusters with no bib record where is_deleted is null)

Code Block
select is_deleted,
       count(cr.*) 
from cluster_record cr 
where not exists ( select br. from bib_record br where br.contributes_to = cr.id ) 
group by is_deleted;

Switch on a specific source for ingest

Code Block
update host_lms set client_config = client_config || '{"ingest":true}' where code='CODE';

Ingest status

Code Block
select h.id, 
  h.code, 
  h.client_config->'ingest',
  ps.process_name,
  ps.process_state->'cursor' 
from host_lms h, process_state ps 
where h.id = ps.context;

Useful current status info

Code Block
select pr.id, 
       pr.date_created, 
       pr.active_workflow,
       pr.patron_hostlms_code patron_system, 
       pr.status_code dcb_status, 
       pr.local_request_status pickup_request_status, 
       pr.local_item_id borrower_item_id, 
       pr.local_item_status borrower_item_status, 
       pr.next_scheduled_poll next_poll, 
       sr.local_item_status lender_item_status, 
       sr.local_status lender_request_status 
from patron_request pr, 
     supplier_request sr 
where sr.patron_request_id = pr.id 
order by date_created;