Advertisement
Dyrcona

Ingest Scrollback

Oct 28th, 2022
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 67.49 KB | None | 0 0
  1. opensrf@jasontest:~/erecords/ebrary$ loaderecords --source 'Ebook Central' ebc_a
  2. n_1.mrc
  3. Starting ebc_an_1.mrc at Thu, 27 Oct 2022 14:45:52 -0400.
  4. WARNING: Key (record_type, record, state_data)=(biblio, 3272808, ) already exis
  5. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  6. SELECT queue_id AS queue,
  7. rtype AS record_type,
  8. record_id AS record,
  9. qe.id AS override_by,
  10. ingest_action AS action,
  11. q.run_at AS run_at,
  12. old_state_data AS state_data
  13. FROM action.ingest_queue_entry qe
  14. JOIN action.ingest_queue q ON (qe.queue = q.id)
  15. WHERE qe.record = record_id
  16. AND q.end_time IS NULL
  17. AND qe.record_type = rtype
  18. AND qe.state_data = old_state_data
  19. AND qe.ingest_time IS NULL
  20. AND qe.fail_time IS NULL
  21. AND qe.override_by IS NULL
  22. ), existing_nonqueue_entry_cte AS (
  23. SELECT queue_id AS queue,
  24. rtype AS record_type,
  25. record_id AS record,
  26. qe.id AS override_by,
  27. ingest_action AS action,
  28. qe.run_at AS run_at,
  29. old_state_data AS state_data
  30. FROM action.ingest_queue_entry qe
  31. WHERE qe.record = record_id
  32. AND qe.queue IS NULL
  33. AND qe.record_type = rtype
  34. AND qe.state_data = old_state_data
  35. AND qe.ingest_time IS NULL
  36. AND qe.fail_time IS NULL
  37. AND qe.override_by IS NULL
  38. ), new_entry_cte AS (
  39. SELECT * FROM existing_queue_entry_cte
  40. UNION ALL
  41. SELECT * FROM existing_nonqueue_entry_cte
  42. UNION ALL
  43. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  44. _run,NOW()), old_state_data
  45. ), insert_entry_cte AS (
  46. INSERT INTO action.ingest_queue_entry
  47. (queue, record_type, record, override_by, action, run_at, state_data
  48. )
  49. SELECT queue, record_type, record, override_by, action, run_at, state_
  50. data FROM new_entry_cte
  51. ORDER BY 4 NULLS LAST, 6
  52. LIMIT 1
  53. RETURNING *
  54. ) SELECT * FROM insert_entry_cte"
  55. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  56. ne,integer,text,text) line 20 at SQL statement
  57. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  58. ), ingest_queue, new_action, old_state_data)"
  59. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  60. WARNING: Enqueuing of biblio.record_entry 3272808 for ingest failed, attempting
  61. direct ingest
  62. WARNING: Key (record_type, record, state_data)=(biblio, 3238454, ) already exis
  63. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  64. SELECT queue_id AS queue,
  65. rtype AS record_type,
  66. record_id AS record,
  67. qe.id AS override_by,
  68. ingest_action AS action,
  69. q.run_at AS run_at,
  70. old_state_data AS state_data
  71. FROM action.ingest_queue_entry qe
  72. JOIN action.ingest_queue q ON (qe.queue = q.id)
  73. WHERE qe.record = record_id
  74. AND q.end_time IS NULL
  75. AND qe.record_type = rtype
  76. AND qe.state_data = old_state_data
  77. AND qe.ingest_time IS NULL
  78. AND qe.fail_time IS NULL
  79. AND qe.override_by IS NULL
  80. ), existing_nonqueue_entry_cte AS (
  81. SELECT queue_id AS queue,
  82. rtype AS record_type,
  83. record_id AS record,
  84. qe.id AS override_by,
  85. ingest_action AS action,
  86. qe.run_at AS run_at,
  87. old_state_data AS state_data
  88. FROM action.ingest_queue_entry qe
  89. WHERE qe.record = record_id
  90. AND qe.queue IS NULL
  91. AND qe.record_type = rtype
  92. AND qe.state_data = old_state_data
  93. AND qe.ingest_time IS NULL
  94. AND qe.fail_time IS NULL
  95. AND qe.override_by IS NULL
  96. ), new_entry_cte AS (
  97. SELECT * FROM existing_queue_entry_cte
  98. UNION ALL
  99. SELECT * FROM existing_nonqueue_entry_cte
  100. UNION ALL
  101. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  102. _run,NOW()), old_state_data
  103. ), insert_entry_cte AS (
  104. INSERT INTO action.ingest_queue_entry
  105. (queue, record_type, record, override_by, action, run_at, state_data
  106. )
  107. SELECT queue, record_type, record, override_by, action, run_at, state_
  108. data FROM new_entry_cte
  109. ORDER BY 4 NULLS LAST, 6
  110. LIMIT 1
  111. RETURNING *
  112. ) SELECT * FROM insert_entry_cte"
  113. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  114. ne,integer,text,text) line 20 at SQL statement
  115. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  116. ), ingest_queue, new_action, old_state_data)"
  117. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  118. WARNING: Enqueuing of biblio.record_entry 3238454 for ingest failed, attempting
  119. direct ingest
  120. WARNING: Key (record_type, record, state_data)=(biblio, 3272325, ) already exis
  121. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  122. SELECT queue_id AS queue,
  123. rtype AS record_type,
  124. record_id AS record,
  125. qe.id AS override_by,
  126. ingest_action AS action,
  127. q.run_at AS run_at,
  128. old_state_data AS state_data
  129. FROM action.ingest_queue_entry qe
  130. JOIN action.ingest_queue q ON (qe.queue = q.id)
  131. WHERE qe.record = record_id
  132. AND q.end_time IS NULL
  133. AND qe.record_type = rtype
  134. AND qe.state_data = old_state_data
  135. AND qe.ingest_time IS NULL
  136. AND qe.fail_time IS NULL
  137. AND qe.override_by IS NULL
  138. ), existing_nonqueue_entry_cte AS (
  139. SELECT queue_id AS queue,
  140. rtype AS record_type,
  141. record_id AS record,
  142. qe.id AS override_by,
  143. ingest_action AS action,
  144. qe.run_at AS run_at,
  145. old_state_data AS state_data
  146. FROM action.ingest_queue_entry qe
  147. WHERE qe.record = record_id
  148. AND qe.queue IS NULL
  149. AND qe.record_type = rtype
  150. AND qe.state_data = old_state_data
  151. AND qe.ingest_time IS NULL
  152. AND qe.fail_time IS NULL
  153. AND qe.override_by IS NULL
  154. ), new_entry_cte AS (
  155. SELECT * FROM existing_queue_entry_cte
  156. UNION ALL
  157. SELECT * FROM existing_nonqueue_entry_cte
  158. UNION ALL
  159. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  160. _run,NOW()), old_state_data
  161. ), insert_entry_cte AS (
  162. INSERT INTO action.ingest_queue_entry
  163. (queue, record_type, record, override_by, action, run_at, state_data
  164. )
  165. SELECT queue, record_type, record, override_by, action, run_at, state_
  166. data FROM new_entry_cte
  167. ORDER BY 4 NULLS LAST, 6
  168. LIMIT 1
  169. RETURNING *
  170. ) SELECT * FROM insert_entry_cte"
  171. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  172. ne,integer,text,text) line 20 at SQL statement
  173. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  174. ), ingest_queue, new_action, old_state_data)"
  175. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  176. WARNING: Enqueuing of biblio.record_entry 3272325 for ingest failed, attempting
  177. direct ingest
  178. WARNING: Key (record_type, record, state_data)=(biblio, 3273307, ) already exis
  179. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  180. SELECT queue_id AS queue,
  181. rtype AS record_type,
  182. record_id AS record,
  183. qe.id AS override_by,
  184. ingest_action AS action,
  185. q.run_at AS run_at,
  186. old_state_data AS state_data
  187. FROM action.ingest_queue_entry qe
  188. JOIN action.ingest_queue q ON (qe.queue = q.id)
  189. WHERE qe.record = record_id
  190. AND q.end_time IS NULL
  191. AND qe.record_type = rtype
  192. AND qe.state_data = old_state_data
  193. AND qe.ingest_time IS NULL
  194. AND qe.fail_time IS NULL
  195. AND qe.override_by IS NULL
  196. ), existing_nonqueue_entry_cte AS (
  197. SELECT queue_id AS queue,
  198. rtype AS record_type,
  199. record_id AS record,
  200. qe.id AS override_by,
  201. ingest_action AS action,
  202. qe.run_at AS run_at,
  203. old_state_data AS state_data
  204. FROM action.ingest_queue_entry qe
  205. WHERE qe.record = record_id
  206. AND qe.queue IS NULL
  207. AND qe.record_type = rtype
  208. AND qe.state_data = old_state_data
  209. AND qe.ingest_time IS NULL
  210. AND qe.fail_time IS NULL
  211. AND qe.override_by IS NULL
  212. ), new_entry_cte AS (
  213. SELECT * FROM existing_queue_entry_cte
  214. UNION ALL
  215. SELECT * FROM existing_nonqueue_entry_cte
  216. UNION ALL
  217. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  218. _run,NOW()), old_state_data
  219. ), insert_entry_cte AS (
  220. INSERT INTO action.ingest_queue_entry
  221. (queue, record_type, record, override_by, action, run_at, state_data
  222. )
  223. SELECT queue, record_type, record, override_by, action, run_at, state_
  224. data FROM new_entry_cte
  225. ORDER BY 4 NULLS LAST, 6
  226. LIMIT 1
  227. RETURNING *
  228. ) SELECT * FROM insert_entry_cte"
  229. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  230. ne,integer,text,text) line 20 at SQL statement
  231. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  232. ), ingest_queue, new_action, old_state_data)"
  233. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  234. WARNING: Enqueuing of biblio.record_entry 3273307 for ingest failed, attempting
  235. direct ingest
  236. WARNING: Key (record_type, record, state_data)=(biblio, 3273316, ) already exis
  237. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  238. SELECT queue_id AS queue,
  239. rtype AS record_type,
  240. record_id AS record,
  241. qe.id AS override_by,
  242. ingest_action AS action,
  243. q.run_at AS run_at,
  244. old_state_data AS state_data
  245. FROM action.ingest_queue_entry qe
  246. JOIN action.ingest_queue q ON (qe.queue = q.id)
  247. WHERE qe.record = record_id
  248. AND q.end_time IS NULL
  249. AND qe.record_type = rtype
  250. AND qe.state_data = old_state_data
  251. AND qe.ingest_time IS NULL
  252. AND qe.fail_time IS NULL
  253. AND qe.override_by IS NULL
  254. ), existing_nonqueue_entry_cte AS (
  255. SELECT queue_id AS queue,
  256. rtype AS record_type,
  257. record_id AS record,
  258. qe.id AS override_by,
  259. ingest_action AS action,
  260. qe.run_at AS run_at,
  261. old_state_data AS state_data
  262. FROM action.ingest_queue_entry qe
  263. WHERE qe.record = record_id
  264. AND qe.queue IS NULL
  265. AND qe.record_type = rtype
  266. AND qe.state_data = old_state_data
  267. AND qe.ingest_time IS NULL
  268. AND qe.fail_time IS NULL
  269. AND qe.override_by IS NULL
  270. ), new_entry_cte AS (
  271. SELECT * FROM existing_queue_entry_cte
  272. UNION ALL
  273. SELECT * FROM existing_nonqueue_entry_cte
  274. UNION ALL
  275. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  276. _run,NOW()), old_state_data
  277. ), insert_entry_cte AS (
  278. INSERT INTO action.ingest_queue_entry
  279. (queue, record_type, record, override_by, action, run_at, state_data
  280. )
  281. SELECT queue, record_type, record, override_by, action, run_at, state_
  282. data FROM new_entry_cte
  283. ORDER BY 4 NULLS LAST, 6
  284. LIMIT 1
  285. RETURNING *
  286. ) SELECT * FROM insert_entry_cte"
  287. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  288. ne,integer,text,text) line 20 at SQL statement
  289. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  290. ), ingest_queue, new_action, old_state_data)"
  291. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  292. WARNING: Enqueuing of biblio.record_entry 3273316 for ingest failed, attempting
  293. direct ingest
  294. WARNING: Key (record_type, record, state_data)=(biblio, 3273314, ) already exis
  295. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  296. SELECT queue_id AS queue,
  297. rtype AS record_type,
  298. record_id AS record,
  299. qe.id AS override_by,
  300. ingest_action AS action,
  301. q.run_at AS run_at,
  302. old_state_data AS state_data
  303. FROM action.ingest_queue_entry qe
  304. JOIN action.ingest_queue q ON (qe.queue = q.id)
  305. WHERE qe.record = record_id
  306. AND q.end_time IS NULL
  307. AND qe.record_type = rtype
  308. AND qe.state_data = old_state_data
  309. AND qe.ingest_time IS NULL
  310. AND qe.fail_time IS NULL
  311. AND qe.override_by IS NULL
  312. ), existing_nonqueue_entry_cte AS (
  313. SELECT queue_id AS queue,
  314. rtype AS record_type,
  315. record_id AS record,
  316. qe.id AS override_by,
  317. ingest_action AS action,
  318. qe.run_at AS run_at,
  319. old_state_data AS state_data
  320. FROM action.ingest_queue_entry qe
  321. WHERE qe.record = record_id
  322. AND qe.queue IS NULL
  323. AND qe.record_type = rtype
  324. AND qe.state_data = old_state_data
  325. AND qe.ingest_time IS NULL
  326. AND qe.fail_time IS NULL
  327. AND qe.override_by IS NULL
  328. ), new_entry_cte AS (
  329. SELECT * FROM existing_queue_entry_cte
  330. UNION ALL
  331. SELECT * FROM existing_nonqueue_entry_cte
  332. UNION ALL
  333. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  334. _run,NOW()), old_state_data
  335. ), insert_entry_cte AS (
  336. INSERT INTO action.ingest_queue_entry
  337. (queue, record_type, record, override_by, action, run_at, state_data
  338. )
  339. SELECT queue, record_type, record, override_by, action, run_at, state_
  340. data FROM new_entry_cte
  341. ORDER BY 4 NULLS LAST, 6
  342. LIMIT 1
  343. RETURNING *
  344. ) SELECT * FROM insert_entry_cte"
  345. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  346. ne,integer,text,text) line 20 at SQL statement
  347. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  348. ), ingest_queue, new_action, old_state_data)"
  349. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  350. WARNING: Enqueuing of biblio.record_entry 3273314 for ingest failed, attempting
  351. direct ingest
  352. WARNING: Key (record_type, record, state_data)=(biblio, 3273336, ) already exis
  353. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  354. SELECT queue_id AS queue,
  355. rtype AS record_type,
  356. record_id AS record,
  357. qe.id AS override_by,
  358. ingest_action AS action,
  359. q.run_at AS run_at,
  360. old_state_data AS state_data
  361. FROM action.ingest_queue_entry qe
  362. JOIN action.ingest_queue q ON (qe.queue = q.id)
  363. WHERE qe.record = record_id
  364. AND q.end_time IS NULL
  365. AND qe.record_type = rtype
  366. AND qe.state_data = old_state_data
  367. AND qe.ingest_time IS NULL
  368. AND qe.fail_time IS NULL
  369. AND qe.override_by IS NULL
  370. ), existing_nonqueue_entry_cte AS (
  371. SELECT queue_id AS queue,
  372. rtype AS record_type,
  373. record_id AS record,
  374. qe.id AS override_by,
  375. ingest_action AS action,
  376. qe.run_at AS run_at,
  377. old_state_data AS state_data
  378. FROM action.ingest_queue_entry qe
  379. WHERE qe.record = record_id
  380. AND qe.queue IS NULL
  381. AND qe.record_type = rtype
  382. AND qe.state_data = old_state_data
  383. AND qe.ingest_time IS NULL
  384. AND qe.fail_time IS NULL
  385. AND qe.override_by IS NULL
  386. ), new_entry_cte AS (
  387. SELECT * FROM existing_queue_entry_cte
  388. UNION ALL
  389. SELECT * FROM existing_nonqueue_entry_cte
  390. UNION ALL
  391. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  392. _run,NOW()), old_state_data
  393. ), insert_entry_cte AS (
  394. INSERT INTO action.ingest_queue_entry
  395. (queue, record_type, record, override_by, action, run_at, state_data
  396. )
  397. SELECT queue, record_type, record, override_by, action, run_at, state_
  398. data FROM new_entry_cte
  399. ORDER BY 4 NULLS LAST, 6
  400. LIMIT 1
  401. RETURNING *
  402. ) SELECT * FROM insert_entry_cte"
  403. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  404. ne,integer,text,text) line 20 at SQL statement
  405. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  406. ), ingest_queue, new_action, old_state_data)"
  407. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  408. WARNING: Enqueuing of biblio.record_entry 3273336 for ingest failed, attempting
  409. direct ingest
  410. WARNING: Key (record_type, record, state_data)=(biblio, 3273309, ) already exis
  411. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  412. SELECT queue_id AS queue,
  413. rtype AS record_type,
  414. record_id AS record,
  415. qe.id AS override_by,
  416. ingest_action AS action,
  417. q.run_at AS run_at,
  418. old_state_data AS state_data
  419. FROM action.ingest_queue_entry qe
  420. JOIN action.ingest_queue q ON (qe.queue = q.id)
  421. WHERE qe.record = record_id
  422. AND q.end_time IS NULL
  423. AND qe.record_type = rtype
  424. AND qe.state_data = old_state_data
  425. AND qe.ingest_time IS NULL
  426. AND qe.fail_time IS NULL
  427. AND qe.override_by IS NULL
  428. ), existing_nonqueue_entry_cte AS (
  429. SELECT queue_id AS queue,
  430. rtype AS record_type,
  431. record_id AS record,
  432. qe.id AS override_by,
  433. ingest_action AS action,
  434. qe.run_at AS run_at,
  435. old_state_data AS state_data
  436. FROM action.ingest_queue_entry qe
  437. WHERE qe.record = record_id
  438. AND qe.queue IS NULL
  439. AND qe.record_type = rtype
  440. AND qe.state_data = old_state_data
  441. AND qe.ingest_time IS NULL
  442. AND qe.fail_time IS NULL
  443. AND qe.override_by IS NULL
  444. ), new_entry_cte AS (
  445. SELECT * FROM existing_queue_entry_cte
  446. UNION ALL
  447. SELECT * FROM existing_nonqueue_entry_cte
  448. UNION ALL
  449. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  450. _run,NOW()), old_state_data
  451. ), insert_entry_cte AS (
  452. INSERT INTO action.ingest_queue_entry
  453. (queue, record_type, record, override_by, action, run_at, state_data
  454. )
  455. SELECT queue, record_type, record, override_by, action, run_at, state_
  456. data FROM new_entry_cte
  457. ORDER BY 4 NULLS LAST, 6
  458. LIMIT 1
  459. RETURNING *
  460. ) SELECT * FROM insert_entry_cte"
  461. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  462. ne,integer,text,text) line 20 at SQL statement
  463. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  464. ), ingest_queue, new_action, old_state_data)"
  465. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  466. WARNING: Enqueuing of biblio.record_entry 3273309 for ingest failed, attempting
  467. direct ingest
  468. WARNING: Key (record_type, record, state_data)=(biblio, 3366883, ) already exis
  469. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  470. SELECT queue_id AS queue,
  471. rtype AS record_type,
  472. record_id AS record,
  473. qe.id AS override_by,
  474. ingest_action AS action,
  475. q.run_at AS run_at,
  476. old_state_data AS state_data
  477. FROM action.ingest_queue_entry qe
  478. JOIN action.ingest_queue q ON (qe.queue = q.id)
  479. WHERE qe.record = record_id
  480. AND q.end_time IS NULL
  481. AND qe.record_type = rtype
  482. AND qe.state_data = old_state_data
  483. AND qe.ingest_time IS NULL
  484. AND qe.fail_time IS NULL
  485. AND qe.override_by IS NULL
  486. ), existing_nonqueue_entry_cte AS (
  487. SELECT queue_id AS queue,
  488. rtype AS record_type,
  489. record_id AS record,
  490. qe.id AS override_by,
  491. ingest_action AS action,
  492. qe.run_at AS run_at,
  493. old_state_data AS state_data
  494. FROM action.ingest_queue_entry qe
  495. WHERE qe.record = record_id
  496. AND qe.queue IS NULL
  497. AND qe.record_type = rtype
  498. AND qe.state_data = old_state_data
  499. AND qe.ingest_time IS NULL
  500. AND qe.fail_time IS NULL
  501. AND qe.override_by IS NULL
  502. ), new_entry_cte AS (
  503. SELECT * FROM existing_queue_entry_cte
  504. UNION ALL
  505. SELECT * FROM existing_nonqueue_entry_cte
  506. UNION ALL
  507. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  508. _run,NOW()), old_state_data
  509. ), insert_entry_cte AS (
  510. INSERT INTO action.ingest_queue_entry
  511. (queue, record_type, record, override_by, action, run_at, state_data
  512. )
  513. SELECT queue, record_type, record, override_by, action, run_at, state_
  514. data FROM new_entry_cte
  515. ORDER BY 4 NULLS LAST, 6
  516. LIMIT 1
  517. RETURNING *
  518. ) SELECT * FROM insert_entry_cte"
  519. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  520. ne,integer,text,text) line 20 at SQL statement
  521. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  522. ), ingest_queue, new_action, old_state_data)"
  523. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  524. WARNING: Enqueuing of biblio.record_entry 3366883 for ingest failed, attempting
  525. direct ingest
  526. WARNING: Key (record_type, record, state_data)=(biblio, 3366885, ) already exis
  527. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  528. SELECT queue_id AS queue,
  529. rtype AS record_type,
  530. record_id AS record,
  531. qe.id AS override_by,
  532. ingest_action AS action,
  533. q.run_at AS run_at,
  534. old_state_data AS state_data
  535. FROM action.ingest_queue_entry qe
  536. JOIN action.ingest_queue q ON (qe.queue = q.id)
  537. WHERE qe.record = record_id
  538. AND q.end_time IS NULL
  539. AND qe.record_type = rtype
  540. AND qe.state_data = old_state_data
  541. AND qe.ingest_time IS NULL
  542. AND qe.fail_time IS NULL
  543. AND qe.override_by IS NULL
  544. ), existing_nonqueue_entry_cte AS (
  545. SELECT queue_id AS queue,
  546. rtype AS record_type,
  547. record_id AS record,
  548. qe.id AS override_by,
  549. ingest_action AS action,
  550. qe.run_at AS run_at,
  551. old_state_data AS state_data
  552. FROM action.ingest_queue_entry qe
  553. WHERE qe.record = record_id
  554. AND qe.queue IS NULL
  555. AND qe.record_type = rtype
  556. AND qe.state_data = old_state_data
  557. AND qe.ingest_time IS NULL
  558. AND qe.fail_time IS NULL
  559. AND qe.override_by IS NULL
  560. ), new_entry_cte AS (
  561. SELECT * FROM existing_queue_entry_cte
  562. UNION ALL
  563. SELECT * FROM existing_nonqueue_entry_cte
  564. UNION ALL
  565. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  566. _run,NOW()), old_state_data
  567. ), insert_entry_cte AS (
  568. INSERT INTO action.ingest_queue_entry
  569. (queue, record_type, record, override_by, action, run_at, state_data
  570. )
  571. SELECT queue, record_type, record, override_by, action, run_at, state_
  572. data FROM new_entry_cte
  573. ORDER BY 4 NULLS LAST, 6
  574. LIMIT 1
  575. RETURNING *
  576. ) SELECT * FROM insert_entry_cte"
  577. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  578. ne,integer,text,text) line 20 at SQL statement
  579. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  580. ), ingest_queue, new_action, old_state_data)"
  581. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  582. WARNING: Enqueuing of biblio.record_entry 3366885 for ingest failed, attempting
  583. direct ingest
  584. WARNING: Key (record_type, record, state_data)=(biblio, 3366939, ) already exis
  585. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  586. SELECT queue_id AS queue,
  587. rtype AS record_type,
  588. record_id AS record,
  589. qe.id AS override_by,
  590. ingest_action AS action,
  591. q.run_at AS run_at,
  592. old_state_data AS state_data
  593. FROM action.ingest_queue_entry qe
  594. JOIN action.ingest_queue q ON (qe.queue = q.id)
  595. WHERE qe.record = record_id
  596. AND q.end_time IS NULL
  597. AND qe.record_type = rtype
  598. AND qe.state_data = old_state_data
  599. AND qe.ingest_time IS NULL
  600. AND qe.fail_time IS NULL
  601. AND qe.override_by IS NULL
  602. ), existing_nonqueue_entry_cte AS (
  603. SELECT queue_id AS queue,
  604. rtype AS record_type,
  605. record_id AS record,
  606. qe.id AS override_by,
  607. ingest_action AS action,
  608. qe.run_at AS run_at,
  609. old_state_data AS state_data
  610. FROM action.ingest_queue_entry qe
  611. WHERE qe.record = record_id
  612. AND qe.queue IS NULL
  613. AND qe.record_type = rtype
  614. AND qe.state_data = old_state_data
  615. AND qe.ingest_time IS NULL
  616. AND qe.fail_time IS NULL
  617. AND qe.override_by IS NULL
  618. ), new_entry_cte AS (
  619. SELECT * FROM existing_queue_entry_cte
  620. UNION ALL
  621. SELECT * FROM existing_nonqueue_entry_cte
  622. UNION ALL
  623. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  624. _run,NOW()), old_state_data
  625. ), insert_entry_cte AS (
  626. INSERT INTO action.ingest_queue_entry
  627. (queue, record_type, record, override_by, action, run_at, state_data
  628. )
  629. SELECT queue, record_type, record, override_by, action, run_at, state_
  630. data FROM new_entry_cte
  631. ORDER BY 4 NULLS LAST, 6
  632. LIMIT 1
  633. RETURNING *
  634. ) SELECT * FROM insert_entry_cte"
  635. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  636. ne,integer,text,text) line 20 at SQL statement
  637. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  638. ), ingest_queue, new_action, old_state_data)"
  639. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  640. WARNING: Enqueuing of biblio.record_entry 3366939 for ingest failed, attempting
  641. direct ingest
  642. WARNING: Key (record_type, record, state_data)=(biblio, 3275435, ) already exis
  643. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  644. SELECT queue_id AS queue,
  645. rtype AS record_type,
  646. record_id AS record,
  647. qe.id AS override_by,
  648. ingest_action AS action,
  649. q.run_at AS run_at,
  650. old_state_data AS state_data
  651. FROM action.ingest_queue_entry qe
  652. JOIN action.ingest_queue q ON (qe.queue = q.id)
  653. WHERE qe.record = record_id
  654. AND q.end_time IS NULL
  655. AND qe.record_type = rtype
  656. AND qe.state_data = old_state_data
  657. AND qe.ingest_time IS NULL
  658. AND qe.fail_time IS NULL
  659. AND qe.override_by IS NULL
  660. ), existing_nonqueue_entry_cte AS (
  661. SELECT queue_id AS queue,
  662. rtype AS record_type,
  663. record_id AS record,
  664. qe.id AS override_by,
  665. ingest_action AS action,
  666. qe.run_at AS run_at,
  667. old_state_data AS state_data
  668. FROM action.ingest_queue_entry qe
  669. WHERE qe.record = record_id
  670. AND qe.queue IS NULL
  671. AND qe.record_type = rtype
  672. AND qe.state_data = old_state_data
  673. AND qe.ingest_time IS NULL
  674. AND qe.fail_time IS NULL
  675. AND qe.override_by IS NULL
  676. ), new_entry_cte AS (
  677. SELECT * FROM existing_queue_entry_cte
  678. UNION ALL
  679. SELECT * FROM existing_nonqueue_entry_cte
  680. UNION ALL
  681. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  682. _run,NOW()), old_state_data
  683. ), insert_entry_cte AS (
  684. INSERT INTO action.ingest_queue_entry
  685. (queue, record_type, record, override_by, action, run_at, state_data
  686. )
  687. SELECT queue, record_type, record, override_by, action, run_at, state_
  688. data FROM new_entry_cte
  689. ORDER BY 4 NULLS LAST, 6
  690. LIMIT 1
  691. RETURNING *
  692. ) SELECT * FROM insert_entry_cte"
  693. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  694. ne,integer,text,text) line 20 at SQL statement
  695. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  696. ), ingest_queue, new_action, old_state_data)"
  697. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  698. WARNING: Enqueuing of biblio.record_entry 3275435 for ingest failed, attempting
  699. direct ingest
  700. WARNING: Key (record_type, record, state_data)=(biblio, 3273273, ) already exis
  701. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  702. SELECT queue_id AS queue,
  703. rtype AS record_type,
  704. record_id AS record,
  705. qe.id AS override_by,
  706. ingest_action AS action,
  707. q.run_at AS run_at,
  708. old_state_data AS state_data
  709. FROM action.ingest_queue_entry qe
  710. JOIN action.ingest_queue q ON (qe.queue = q.id)
  711. WHERE qe.record = record_id
  712. AND q.end_time IS NULL
  713. AND qe.record_type = rtype
  714. AND qe.state_data = old_state_data
  715. AND qe.ingest_time IS NULL
  716. AND qe.fail_time IS NULL
  717. AND qe.override_by IS NULL
  718. ), existing_nonqueue_entry_cte AS (
  719. SELECT queue_id AS queue,
  720. rtype AS record_type,
  721. record_id AS record,
  722. qe.id AS override_by,
  723. ingest_action AS action,
  724. qe.run_at AS run_at,
  725. old_state_data AS state_data
  726. FROM action.ingest_queue_entry qe
  727. WHERE qe.record = record_id
  728. AND qe.queue IS NULL
  729. AND qe.record_type = rtype
  730. AND qe.state_data = old_state_data
  731. AND qe.ingest_time IS NULL
  732. AND qe.fail_time IS NULL
  733. AND qe.override_by IS NULL
  734. ), new_entry_cte AS (
  735. SELECT * FROM existing_queue_entry_cte
  736. UNION ALL
  737. SELECT * FROM existing_nonqueue_entry_cte
  738. UNION ALL
  739. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  740. _run,NOW()), old_state_data
  741. ), insert_entry_cte AS (
  742. INSERT INTO action.ingest_queue_entry
  743. (queue, record_type, record, override_by, action, run_at, state_data
  744. )
  745. SELECT queue, record_type, record, override_by, action, run_at, state_
  746. data FROM new_entry_cte
  747. ORDER BY 4 NULLS LAST, 6
  748. LIMIT 1
  749. RETURNING *
  750. ) SELECT * FROM insert_entry_cte"
  751. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  752. ne,integer,text,text) line 20 at SQL statement
  753. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  754. ), ingest_queue, new_action, old_state_data)"
  755. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  756. WARNING: Enqueuing of biblio.record_entry 3273273 for ingest failed, attempting
  757. direct ingest
  758. WARNING: Key (record_type, record, state_data)=(biblio, 3272026, ) already exis
  759. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  760. SELECT queue_id AS queue,
  761. rtype AS record_type,
  762. record_id AS record,
  763. qe.id AS override_by,
  764. ingest_action AS action,
  765. q.run_at AS run_at,
  766. old_state_data AS state_data
  767. FROM action.ingest_queue_entry qe
  768. JOIN action.ingest_queue q ON (qe.queue = q.id)
  769. WHERE qe.record = record_id
  770. AND q.end_time IS NULL
  771. AND qe.record_type = rtype
  772. AND qe.state_data = old_state_data
  773. AND qe.ingest_time IS NULL
  774. AND qe.fail_time IS NULL
  775. AND qe.override_by IS NULL
  776. ), existing_nonqueue_entry_cte AS (
  777. SELECT queue_id AS queue,
  778. rtype AS record_type,
  779. record_id AS record,
  780. qe.id AS override_by,
  781. ingest_action AS action,
  782. qe.run_at AS run_at,
  783. old_state_data AS state_data
  784. FROM action.ingest_queue_entry qe
  785. WHERE qe.record = record_id
  786. AND qe.queue IS NULL
  787. AND qe.record_type = rtype
  788. AND qe.state_data = old_state_data
  789. AND qe.ingest_time IS NULL
  790. AND qe.fail_time IS NULL
  791. AND qe.override_by IS NULL
  792. ), new_entry_cte AS (
  793. SELECT * FROM existing_queue_entry_cte
  794. UNION ALL
  795. SELECT * FROM existing_nonqueue_entry_cte
  796. UNION ALL
  797. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  798. _run,NOW()), old_state_data
  799. ), insert_entry_cte AS (
  800. INSERT INTO action.ingest_queue_entry
  801. (queue, record_type, record, override_by, action, run_at, state_data
  802. )
  803. SELECT queue, record_type, record, override_by, action, run_at, state_
  804. data FROM new_entry_cte
  805. ORDER BY 4 NULLS LAST, 6
  806. LIMIT 1
  807. RETURNING *
  808. ) SELECT * FROM insert_entry_cte"
  809. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  810. ne,integer,text,text) line 20 at SQL statement
  811. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  812. ), ingest_queue, new_action, old_state_data)"
  813. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  814. WARNING: Enqueuing of biblio.record_entry 3272026 for ingest failed, attempting
  815. direct ingest
  816. WARNING: Key (record_type, record, state_data)=(biblio, 3272025, ) already exis
  817. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  818. SELECT queue_id AS queue,
  819. rtype AS record_type,
  820. record_id AS record,
  821. qe.id AS override_by,
  822. ingest_action AS action,
  823. q.run_at AS run_at,
  824. old_state_data AS state_data
  825. FROM action.ingest_queue_entry qe
  826. JOIN action.ingest_queue q ON (qe.queue = q.id)
  827. WHERE qe.record = record_id
  828. AND q.end_time IS NULL
  829. AND qe.record_type = rtype
  830. AND qe.state_data = old_state_data
  831. AND qe.ingest_time IS NULL
  832. AND qe.fail_time IS NULL
  833. AND qe.override_by IS NULL
  834. ), existing_nonqueue_entry_cte AS (
  835. SELECT queue_id AS queue,
  836. rtype AS record_type,
  837. record_id AS record,
  838. qe.id AS override_by,
  839. ingest_action AS action,
  840. qe.run_at AS run_at,
  841. old_state_data AS state_data
  842. FROM action.ingest_queue_entry qe
  843. WHERE qe.record = record_id
  844. AND qe.queue IS NULL
  845. AND qe.record_type = rtype
  846. AND qe.state_data = old_state_data
  847. AND qe.ingest_time IS NULL
  848. AND qe.fail_time IS NULL
  849. AND qe.override_by IS NULL
  850. ), new_entry_cte AS (
  851. SELECT * FROM existing_queue_entry_cte
  852. UNION ALL
  853. SELECT * FROM existing_nonqueue_entry_cte
  854. UNION ALL
  855. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  856. _run,NOW()), old_state_data
  857. ), insert_entry_cte AS (
  858. INSERT INTO action.ingest_queue_entry
  859. (queue, record_type, record, override_by, action, run_at, state_data
  860. )
  861. SELECT queue, record_type, record, override_by, action, run_at, state_
  862. data FROM new_entry_cte
  863. ORDER BY 4 NULLS LAST, 6
  864. LIMIT 1
  865. RETURNING *
  866. ) SELECT * FROM insert_entry_cte"
  867. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  868. ne,integer,text,text) line 20 at SQL statement
  869. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  870. ), ingest_queue, new_action, old_state_data)"
  871. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  872. WARNING: Enqueuing of biblio.record_entry 3272025 for ingest failed, attempting
  873. direct ingest
  874. WARNING: Key (record_type, record, state_data)=(biblio, 3271791, ) already exis
  875. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  876. SELECT queue_id AS queue,
  877. rtype AS record_type,
  878. record_id AS record,
  879. qe.id AS override_by,
  880. ingest_action AS action,
  881. q.run_at AS run_at,
  882. old_state_data AS state_data
  883. FROM action.ingest_queue_entry qe
  884. JOIN action.ingest_queue q ON (qe.queue = q.id)
  885. WHERE qe.record = record_id
  886. AND q.end_time IS NULL
  887. AND qe.record_type = rtype
  888. AND qe.state_data = old_state_data
  889. AND qe.ingest_time IS NULL
  890. AND qe.fail_time IS NULL
  891. AND qe.override_by IS NULL
  892. ), existing_nonqueue_entry_cte AS (
  893. SELECT queue_id AS queue,
  894. rtype AS record_type,
  895. record_id AS record,
  896. qe.id AS override_by,
  897. ingest_action AS action,
  898. qe.run_at AS run_at,
  899. old_state_data AS state_data
  900. FROM action.ingest_queue_entry qe
  901. WHERE qe.record = record_id
  902. AND qe.queue IS NULL
  903. AND qe.record_type = rtype
  904. AND qe.state_data = old_state_data
  905. AND qe.ingest_time IS NULL
  906. AND qe.fail_time IS NULL
  907. AND qe.override_by IS NULL
  908. ), new_entry_cte AS (
  909. SELECT * FROM existing_queue_entry_cte
  910. UNION ALL
  911. SELECT * FROM existing_nonqueue_entry_cte
  912. UNION ALL
  913. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  914. _run,NOW()), old_state_data
  915. ), insert_entry_cte AS (
  916. INSERT INTO action.ingest_queue_entry
  917. (queue, record_type, record, override_by, action, run_at, state_data
  918. )
  919. SELECT queue, record_type, record, override_by, action, run_at, state_
  920. data FROM new_entry_cte
  921. ORDER BY 4 NULLS LAST, 6
  922. LIMIT 1
  923. RETURNING *
  924. ) SELECT * FROM insert_entry_cte"
  925. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  926. ne,integer,text,text) line 20 at SQL statement
  927. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  928. ), ingest_queue, new_action, old_state_data)"
  929. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  930. WARNING: Enqueuing of biblio.record_entry 3271791 for ingest failed, attempting
  931. direct ingest
  932. WARNING: Key (record_type, record, state_data)=(biblio, 3272736, ) already exis
  933. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  934. SELECT queue_id AS queue,
  935. rtype AS record_type,
  936. record_id AS record,
  937. qe.id AS override_by,
  938. ingest_action AS action,
  939. q.run_at AS run_at,
  940. old_state_data AS state_data
  941. FROM action.ingest_queue_entry qe
  942. JOIN action.ingest_queue q ON (qe.queue = q.id)
  943. WHERE qe.record = record_id
  944. AND q.end_time IS NULL
  945. AND qe.record_type = rtype
  946. AND qe.state_data = old_state_data
  947. AND qe.ingest_time IS NULL
  948. AND qe.fail_time IS NULL
  949. AND qe.override_by IS NULL
  950. ), existing_nonqueue_entry_cte AS (
  951. SELECT queue_id AS queue,
  952. rtype AS record_type,
  953. record_id AS record,
  954. qe.id AS override_by,
  955. ingest_action AS action,
  956. qe.run_at AS run_at,
  957. old_state_data AS state_data
  958. FROM action.ingest_queue_entry qe
  959. WHERE qe.record = record_id
  960. AND qe.queue IS NULL
  961. AND qe.record_type = rtype
  962. AND qe.state_data = old_state_data
  963. AND qe.ingest_time IS NULL
  964. AND qe.fail_time IS NULL
  965. AND qe.override_by IS NULL
  966. ), new_entry_cte AS (
  967. SELECT * FROM existing_queue_entry_cte
  968. UNION ALL
  969. SELECT * FROM existing_nonqueue_entry_cte
  970. UNION ALL
  971. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  972. _run,NOW()), old_state_data
  973. ), insert_entry_cte AS (
  974. INSERT INTO action.ingest_queue_entry
  975. (queue, record_type, record, override_by, action, run_at, state_data
  976. )
  977. SELECT queue, record_type, record, override_by, action, run_at, state_
  978. data FROM new_entry_cte
  979. ORDER BY 4 NULLS LAST, 6
  980. LIMIT 1
  981. RETURNING *
  982. ) SELECT * FROM insert_entry_cte"
  983. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  984. ne,integer,text,text) line 20 at SQL statement
  985. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  986. ), ingest_queue, new_action, old_state_data)"
  987. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  988. WARNING: Enqueuing of biblio.record_entry 3272736 for ingest failed, attempting
  989. direct ingest
  990. WARNING: Key (record_type, record, state_data)=(biblio, 3272549, ) already exis
  991. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  992. SELECT queue_id AS queue,
  993. rtype AS record_type,
  994. record_id AS record,
  995. qe.id AS override_by,
  996. ingest_action AS action,
  997. q.run_at AS run_at,
  998. old_state_data AS state_data
  999. FROM action.ingest_queue_entry qe
  1000. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1001. WHERE qe.record = record_id
  1002. AND q.end_time IS NULL
  1003. AND qe.record_type = rtype
  1004. AND qe.state_data = old_state_data
  1005. AND qe.ingest_time IS NULL
  1006. AND qe.fail_time IS NULL
  1007. AND qe.override_by IS NULL
  1008. ), existing_nonqueue_entry_cte AS (
  1009. SELECT queue_id AS queue,
  1010. rtype AS record_type,
  1011. record_id AS record,
  1012. qe.id AS override_by,
  1013. ingest_action AS action,
  1014. qe.run_at AS run_at,
  1015. old_state_data AS state_data
  1016. FROM action.ingest_queue_entry qe
  1017. WHERE qe.record = record_id
  1018. AND qe.queue IS NULL
  1019. AND qe.record_type = rtype
  1020. AND qe.state_data = old_state_data
  1021. AND qe.ingest_time IS NULL
  1022. AND qe.fail_time IS NULL
  1023. AND qe.override_by IS NULL
  1024. ), new_entry_cte AS (
  1025. SELECT * FROM existing_queue_entry_cte
  1026. UNION ALL
  1027. SELECT * FROM existing_nonqueue_entry_cte
  1028. UNION ALL
  1029. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1030. _run,NOW()), old_state_data
  1031. ), insert_entry_cte AS (
  1032. INSERT INTO action.ingest_queue_entry
  1033. (queue, record_type, record, override_by, action, run_at, state_data
  1034. )
  1035. SELECT queue, record_type, record, override_by, action, run_at, state_
  1036. data FROM new_entry_cte
  1037. ORDER BY 4 NULLS LAST, 6
  1038. LIMIT 1
  1039. RETURNING *
  1040. ) SELECT * FROM insert_entry_cte"
  1041. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1042. ne,integer,text,text) line 20 at SQL statement
  1043. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1044. ), ingest_queue, new_action, old_state_data)"
  1045. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1046. WARNING: Enqueuing of biblio.record_entry 3272549 for ingest failed, attempting
  1047. direct ingest
  1048. WARNING: Key (record_type, record, state_data)=(biblio, 3272553, ) already exis
  1049. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1050. SELECT queue_id AS queue,
  1051. rtype AS record_type,
  1052. record_id AS record,
  1053. qe.id AS override_by,
  1054. ingest_action AS action,
  1055. q.run_at AS run_at,
  1056. old_state_data AS state_data
  1057. FROM action.ingest_queue_entry qe
  1058. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1059. WHERE qe.record = record_id
  1060. AND q.end_time IS NULL
  1061. AND qe.record_type = rtype
  1062. AND qe.state_data = old_state_data
  1063. AND qe.ingest_time IS NULL
  1064. AND qe.fail_time IS NULL
  1065. AND qe.override_by IS NULL
  1066. ), existing_nonqueue_entry_cte AS (
  1067. SELECT queue_id AS queue,
  1068. rtype AS record_type,
  1069. record_id AS record,
  1070. qe.id AS override_by,
  1071. ingest_action AS action,
  1072. qe.run_at AS run_at,
  1073. old_state_data AS state_data
  1074. FROM action.ingest_queue_entry qe
  1075. WHERE qe.record = record_id
  1076. AND qe.queue IS NULL
  1077. AND qe.record_type = rtype
  1078. AND qe.state_data = old_state_data
  1079. AND qe.ingest_time IS NULL
  1080. AND qe.fail_time IS NULL
  1081. AND qe.override_by IS NULL
  1082. ), new_entry_cte AS (
  1083. SELECT * FROM existing_queue_entry_cte
  1084. UNION ALL
  1085. SELECT * FROM existing_nonqueue_entry_cte
  1086. UNION ALL
  1087. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1088. _run,NOW()), old_state_data
  1089. ), insert_entry_cte AS (
  1090. INSERT INTO action.ingest_queue_entry
  1091. (queue, record_type, record, override_by, action, run_at, state_data
  1092. )
  1093. SELECT queue, record_type, record, override_by, action, run_at, state_
  1094. data FROM new_entry_cte
  1095. ORDER BY 4 NULLS LAST, 6
  1096. LIMIT 1
  1097. RETURNING *
  1098. ) SELECT * FROM insert_entry_cte"
  1099. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1100. ne,integer,text,text) line 20 at SQL statement
  1101. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1102. ), ingest_queue, new_action, old_state_data)"
  1103. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1104. WARNING: Enqueuing of biblio.record_entry 3272553 for ingest failed, attempting
  1105. direct ingest
  1106. WARNING: Key (record_type, record, state_data)=(biblio, 3302398, ) already exis
  1107. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1108. SELECT queue_id AS queue,
  1109. rtype AS record_type,
  1110. record_id AS record,
  1111. qe.id AS override_by,
  1112. ingest_action AS action,
  1113. q.run_at AS run_at,
  1114. old_state_data AS state_data
  1115. FROM action.ingest_queue_entry qe
  1116. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1117. WHERE qe.record = record_id
  1118. AND q.end_time IS NULL
  1119. AND qe.record_type = rtype
  1120. AND qe.state_data = old_state_data
  1121. AND qe.ingest_time IS NULL
  1122. AND qe.fail_time IS NULL
  1123. AND qe.override_by IS NULL
  1124. ), existing_nonqueue_entry_cte AS (
  1125. SELECT queue_id AS queue,
  1126. rtype AS record_type,
  1127. record_id AS record,
  1128. qe.id AS override_by,
  1129. ingest_action AS action,
  1130. qe.run_at AS run_at,
  1131. old_state_data AS state_data
  1132. FROM action.ingest_queue_entry qe
  1133. WHERE qe.record = record_id
  1134. AND qe.queue IS NULL
  1135. AND qe.record_type = rtype
  1136. AND qe.state_data = old_state_data
  1137. AND qe.ingest_time IS NULL
  1138. AND qe.fail_time IS NULL
  1139. AND qe.override_by IS NULL
  1140. ), new_entry_cte AS (
  1141. SELECT * FROM existing_queue_entry_cte
  1142. UNION ALL
  1143. SELECT * FROM existing_nonqueue_entry_cte
  1144. UNION ALL
  1145. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1146. _run,NOW()), old_state_data
  1147. ), insert_entry_cte AS (
  1148. INSERT INTO action.ingest_queue_entry
  1149. (queue, record_type, record, override_by, action, run_at, state_data
  1150. )
  1151. SELECT queue, record_type, record, override_by, action, run_at, state_
  1152. data FROM new_entry_cte
  1153. ORDER BY 4 NULLS LAST, 6
  1154. LIMIT 1
  1155. RETURNING *
  1156. ) SELECT * FROM insert_entry_cte"
  1157. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1158. ne,integer,text,text) line 20 at SQL statement
  1159. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1160. ), ingest_queue, new_action, old_state_data)"
  1161. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1162. WARNING: Enqueuing of biblio.record_entry 3302398 for ingest failed, attempting
  1163. direct ingest
  1164. WARNING: Key (record_type, record, state_data)=(biblio, 3257841, ) already exis
  1165. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1166. SELECT queue_id AS queue,
  1167. rtype AS record_type,
  1168. record_id AS record,
  1169. qe.id AS override_by,
  1170. ingest_action AS action,
  1171. q.run_at AS run_at,
  1172. old_state_data AS state_data
  1173. FROM action.ingest_queue_entry qe
  1174. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1175. WHERE qe.record = record_id
  1176. AND q.end_time IS NULL
  1177. AND qe.record_type = rtype
  1178. AND qe.state_data = old_state_data
  1179. AND qe.ingest_time IS NULL
  1180. AND qe.fail_time IS NULL
  1181. AND qe.override_by IS NULL
  1182. ), existing_nonqueue_entry_cte AS (
  1183. SELECT queue_id AS queue,
  1184. rtype AS record_type,
  1185. record_id AS record,
  1186. qe.id AS override_by,
  1187. ingest_action AS action,
  1188. qe.run_at AS run_at,
  1189. old_state_data AS state_data
  1190. FROM action.ingest_queue_entry qe
  1191. WHERE qe.record = record_id
  1192. AND qe.queue IS NULL
  1193. AND qe.record_type = rtype
  1194. AND qe.state_data = old_state_data
  1195. AND qe.ingest_time IS NULL
  1196. AND qe.fail_time IS NULL
  1197. AND qe.override_by IS NULL
  1198. ), new_entry_cte AS (
  1199. SELECT * FROM existing_queue_entry_cte
  1200. UNION ALL
  1201. SELECT * FROM existing_nonqueue_entry_cte
  1202. UNION ALL
  1203. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1204. _run,NOW()), old_state_data
  1205. ), insert_entry_cte AS (
  1206. INSERT INTO action.ingest_queue_entry
  1207. (queue, record_type, record, override_by, action, run_at, state_data
  1208. )
  1209. SELECT queue, record_type, record, override_by, action, run_at, state_
  1210. data FROM new_entry_cte
  1211. ORDER BY 4 NULLS LAST, 6
  1212. LIMIT 1
  1213. RETURNING *
  1214. ) SELECT * FROM insert_entry_cte"
  1215. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1216. ne,integer,text,text) line 20 at SQL statement
  1217. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1218. ), ingest_queue, new_action, old_state_data)"
  1219. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1220. WARNING: Enqueuing of biblio.record_entry 3257841 for ingest failed, attempting
  1221. direct ingest
  1222. WARNING: Key (record_type, record, state_data)=(biblio, 3257858, ) already exis
  1223. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1224. SELECT queue_id AS queue,
  1225. rtype AS record_type,
  1226. record_id AS record,
  1227. qe.id AS override_by,
  1228. ingest_action AS action,
  1229. q.run_at AS run_at,
  1230. old_state_data AS state_data
  1231. FROM action.ingest_queue_entry qe
  1232. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1233. WHERE qe.record = record_id
  1234. AND q.end_time IS NULL
  1235. AND qe.record_type = rtype
  1236. AND qe.state_data = old_state_data
  1237. AND qe.ingest_time IS NULL
  1238. AND qe.fail_time IS NULL
  1239. AND qe.override_by IS NULL
  1240. ), existing_nonqueue_entry_cte AS (
  1241. SELECT queue_id AS queue,
  1242. rtype AS record_type,
  1243. record_id AS record,
  1244. qe.id AS override_by,
  1245. ingest_action AS action,
  1246. qe.run_at AS run_at,
  1247. old_state_data AS state_data
  1248. FROM action.ingest_queue_entry qe
  1249. WHERE qe.record = record_id
  1250. AND qe.queue IS NULL
  1251. AND qe.record_type = rtype
  1252. AND qe.state_data = old_state_data
  1253. AND qe.ingest_time IS NULL
  1254. AND qe.fail_time IS NULL
  1255. AND qe.override_by IS NULL
  1256. ), new_entry_cte AS (
  1257. SELECT * FROM existing_queue_entry_cte
  1258. UNION ALL
  1259. SELECT * FROM existing_nonqueue_entry_cte
  1260. UNION ALL
  1261. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1262. _run,NOW()), old_state_data
  1263. ), insert_entry_cte AS (
  1264. INSERT INTO action.ingest_queue_entry
  1265. (queue, record_type, record, override_by, action, run_at, state_data
  1266. )
  1267. SELECT queue, record_type, record, override_by, action, run_at, state_
  1268. data FROM new_entry_cte
  1269. ORDER BY 4 NULLS LAST, 6
  1270. LIMIT 1
  1271. RETURNING *
  1272. ) SELECT * FROM insert_entry_cte"
  1273. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1274. ne,integer,text,text) line 20 at SQL statement
  1275. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1276. ), ingest_queue, new_action, old_state_data)"
  1277. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1278. WARNING: Enqueuing of biblio.record_entry 3257858 for ingest failed, attempting
  1279. direct ingest
  1280. WARNING: Key (record_type, record, state_data)=(biblio, 3257847, ) already exis
  1281. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1282. SELECT queue_id AS queue,
  1283. rtype AS record_type,
  1284. record_id AS record,
  1285. qe.id AS override_by,
  1286. ingest_action AS action,
  1287. q.run_at AS run_at,
  1288. old_state_data AS state_data
  1289. FROM action.ingest_queue_entry qe
  1290. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1291. WHERE qe.record = record_id
  1292. AND q.end_time IS NULL
  1293. AND qe.record_type = rtype
  1294. AND qe.state_data = old_state_data
  1295. AND qe.ingest_time IS NULL
  1296. AND qe.fail_time IS NULL
  1297. AND qe.override_by IS NULL
  1298. ), existing_nonqueue_entry_cte AS (
  1299. SELECT queue_id AS queue,
  1300. rtype AS record_type,
  1301. record_id AS record,
  1302. qe.id AS override_by,
  1303. ingest_action AS action,
  1304. qe.run_at AS run_at,
  1305. old_state_data AS state_data
  1306. FROM action.ingest_queue_entry qe
  1307. WHERE qe.record = record_id
  1308. AND qe.queue IS NULL
  1309. AND qe.record_type = rtype
  1310. AND qe.state_data = old_state_data
  1311. AND qe.ingest_time IS NULL
  1312. AND qe.fail_time IS NULL
  1313. AND qe.override_by IS NULL
  1314. ), new_entry_cte AS (
  1315. SELECT * FROM existing_queue_entry_cte
  1316. UNION ALL
  1317. SELECT * FROM existing_nonqueue_entry_cte
  1318. UNION ALL
  1319. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1320. _run,NOW()), old_state_data
  1321. ), insert_entry_cte AS (
  1322. INSERT INTO action.ingest_queue_entry
  1323. (queue, record_type, record, override_by, action, run_at, state_data
  1324. )
  1325. SELECT queue, record_type, record, override_by, action, run_at, state_
  1326. data FROM new_entry_cte
  1327. ORDER BY 4 NULLS LAST, 6
  1328. LIMIT 1
  1329. RETURNING *
  1330. ) SELECT * FROM insert_entry_cte"
  1331. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1332. ne,integer,text,text) line 20 at SQL statement
  1333. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1334. ), ingest_queue, new_action, old_state_data)"
  1335. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1336. WARNING: Enqueuing of biblio.record_entry 3257847 for ingest failed, attempting
  1337. direct ingest
  1338. WARNING: Key (record_type, record, state_data)=(biblio, 3257849, ) already exis
  1339. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1340. SELECT queue_id AS queue,
  1341. rtype AS record_type,
  1342. record_id AS record,
  1343. qe.id AS override_by,
  1344. ingest_action AS action,
  1345. q.run_at AS run_at,
  1346. old_state_data AS state_data
  1347. FROM action.ingest_queue_entry qe
  1348. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1349. WHERE qe.record = record_id
  1350. AND q.end_time IS NULL
  1351. AND qe.record_type = rtype
  1352. AND qe.state_data = old_state_data
  1353. AND qe.ingest_time IS NULL
  1354. AND qe.fail_time IS NULL
  1355. AND qe.override_by IS NULL
  1356. ), existing_nonqueue_entry_cte AS (
  1357. SELECT queue_id AS queue,
  1358. rtype AS record_type,
  1359. record_id AS record,
  1360. qe.id AS override_by,
  1361. ingest_action AS action,
  1362. qe.run_at AS run_at,
  1363. old_state_data AS state_data
  1364. FROM action.ingest_queue_entry qe
  1365. WHERE qe.record = record_id
  1366. AND qe.queue IS NULL
  1367. AND qe.record_type = rtype
  1368. AND qe.state_data = old_state_data
  1369. AND qe.ingest_time IS NULL
  1370. AND qe.fail_time IS NULL
  1371. AND qe.override_by IS NULL
  1372. ), new_entry_cte AS (
  1373. SELECT * FROM existing_queue_entry_cte
  1374. UNION ALL
  1375. SELECT * FROM existing_nonqueue_entry_cte
  1376. UNION ALL
  1377. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1378. _run,NOW()), old_state_data
  1379. ), insert_entry_cte AS (
  1380. INSERT INTO action.ingest_queue_entry
  1381. (queue, record_type, record, override_by, action, run_at, state_data
  1382. )
  1383. SELECT queue, record_type, record, override_by, action, run_at, state_
  1384. data FROM new_entry_cte
  1385. ORDER BY 4 NULLS LAST, 6
  1386. LIMIT 1
  1387. RETURNING *
  1388. ) SELECT * FROM insert_entry_cte"
  1389. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1390. ne,integer,text,text) line 20 at SQL statement
  1391. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1392. ), ingest_queue, new_action, old_state_data)"
  1393. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1394. WARNING: Enqueuing of biblio.record_entry 3257849 for ingest failed, attempting
  1395. direct ingest
  1396. WARNING: Key (record_type, record, state_data)=(biblio, 3257864, ) already exis
  1397. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1398. SELECT queue_id AS queue,
  1399. rtype AS record_type,
  1400. record_id AS record,
  1401. qe.id AS override_by,
  1402. ingest_action AS action,
  1403. q.run_at AS run_at,
  1404. old_state_data AS state_data
  1405. FROM action.ingest_queue_entry qe
  1406. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1407. WHERE qe.record = record_id
  1408. AND q.end_time IS NULL
  1409. AND qe.record_type = rtype
  1410. AND qe.state_data = old_state_data
  1411. AND qe.ingest_time IS NULL
  1412. AND qe.fail_time IS NULL
  1413. AND qe.override_by IS NULL
  1414. ), existing_nonqueue_entry_cte AS (
  1415. SELECT queue_id AS queue,
  1416. rtype AS record_type,
  1417. record_id AS record,
  1418. qe.id AS override_by,
  1419. ingest_action AS action,
  1420. qe.run_at AS run_at,
  1421. old_state_data AS state_data
  1422. FROM action.ingest_queue_entry qe
  1423. WHERE qe.record = record_id
  1424. AND qe.queue IS NULL
  1425. AND qe.record_type = rtype
  1426. AND qe.state_data = old_state_data
  1427. AND qe.ingest_time IS NULL
  1428. AND qe.fail_time IS NULL
  1429. AND qe.override_by IS NULL
  1430. ), new_entry_cte AS (
  1431. SELECT * FROM existing_queue_entry_cte
  1432. UNION ALL
  1433. SELECT * FROM existing_nonqueue_entry_cte
  1434. UNION ALL
  1435. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1436. _run,NOW()), old_state_data
  1437. ), insert_entry_cte AS (
  1438. INSERT INTO action.ingest_queue_entry
  1439. (queue, record_type, record, override_by, action, run_at, state_data
  1440. )
  1441. SELECT queue, record_type, record, override_by, action, run_at, state_
  1442. data FROM new_entry_cte
  1443. ORDER BY 4 NULLS LAST, 6
  1444. LIMIT 1
  1445. RETURNING *
  1446. ) SELECT * FROM insert_entry_cte"
  1447. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1448. ne,integer,text,text) line 20 at SQL statement
  1449. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1450. ), ingest_queue, new_action, old_state_data)"
  1451. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1452. WARNING: Enqueuing of biblio.record_entry 3257864 for ingest failed, attempting
  1453. direct ingest
  1454. WARNING: Key (record_type, record, state_data)=(biblio, 3710691, ) already exis
  1455. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1456. SELECT queue_id AS queue,
  1457. rtype AS record_type,
  1458. record_id AS record,
  1459. qe.id AS override_by,
  1460. ingest_action AS action,
  1461. q.run_at AS run_at,
  1462. old_state_data AS state_data
  1463. FROM action.ingest_queue_entry qe
  1464. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1465. WHERE qe.record = record_id
  1466. AND q.end_time IS NULL
  1467. AND qe.record_type = rtype
  1468. AND qe.state_data = old_state_data
  1469. AND qe.ingest_time IS NULL
  1470. AND qe.fail_time IS NULL
  1471. AND qe.override_by IS NULL
  1472. ), existing_nonqueue_entry_cte AS (
  1473. SELECT queue_id AS queue,
  1474. rtype AS record_type,
  1475. record_id AS record,
  1476. qe.id AS override_by,
  1477. ingest_action AS action,
  1478. qe.run_at AS run_at,
  1479. old_state_data AS state_data
  1480. FROM action.ingest_queue_entry qe
  1481. WHERE qe.record = record_id
  1482. AND qe.queue IS NULL
  1483. AND qe.record_type = rtype
  1484. AND qe.state_data = old_state_data
  1485. AND qe.ingest_time IS NULL
  1486. AND qe.fail_time IS NULL
  1487. AND qe.override_by IS NULL
  1488. ), new_entry_cte AS (
  1489. SELECT * FROM existing_queue_entry_cte
  1490. UNION ALL
  1491. SELECT * FROM existing_nonqueue_entry_cte
  1492. UNION ALL
  1493. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1494. _run,NOW()), old_state_data
  1495. ), insert_entry_cte AS (
  1496. INSERT INTO action.ingest_queue_entry
  1497. (queue, record_type, record, override_by, action, run_at, state_data
  1498. )
  1499. SELECT queue, record_type, record, override_by, action, run_at, state_
  1500. data FROM new_entry_cte
  1501. ORDER BY 4 NULLS LAST, 6
  1502. LIMIT 1
  1503. RETURNING *
  1504. ) SELECT * FROM insert_entry_cte"
  1505. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1506. ne,integer,text,text) line 20 at SQL statement
  1507. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1508. ), ingest_queue, new_action, old_state_data)"
  1509. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1510. WARNING: Enqueuing of biblio.record_entry 3710691 for ingest failed, attempting
  1511. direct ingest
  1512. WARNING: Key (record_type, record, state_data)=(biblio, 3588082, ) already exis
  1513. ts.\nSQL statement "WITH existing_queue_entry_cte AS (
  1514. SELECT queue_id AS queue,
  1515. rtype AS record_type,
  1516. record_id AS record,
  1517. qe.id AS override_by,
  1518. ingest_action AS action,
  1519. q.run_at AS run_at,
  1520. old_state_data AS state_data
  1521. FROM action.ingest_queue_entry qe
  1522. JOIN action.ingest_queue q ON (qe.queue = q.id)
  1523. WHERE qe.record = record_id
  1524. AND q.end_time IS NULL
  1525. AND qe.record_type = rtype
  1526. AND qe.state_data = old_state_data
  1527. AND qe.ingest_time IS NULL
  1528. AND qe.fail_time IS NULL
  1529. AND qe.override_by IS NULL
  1530. ), existing_nonqueue_entry_cte AS (
  1531. SELECT queue_id AS queue,
  1532. rtype AS record_type,
  1533. record_id AS record,
  1534. qe.id AS override_by,
  1535. ingest_action AS action,
  1536. qe.run_at AS run_at,
  1537. old_state_data AS state_data
  1538. FROM action.ingest_queue_entry qe
  1539. WHERE qe.record = record_id
  1540. AND qe.queue IS NULL
  1541. AND qe.record_type = rtype
  1542. AND qe.state_data = old_state_data
  1543. AND qe.ingest_time IS NULL
  1544. AND qe.fail_time IS NULL
  1545. AND qe.override_by IS NULL
  1546. ), new_entry_cte AS (
  1547. SELECT * FROM existing_queue_entry_cte
  1548. UNION ALL
  1549. SELECT * FROM existing_nonqueue_entry_cte
  1550. UNION ALL
  1551. SELECT queue_id, rtype, record_id, NULL, ingest_action, COALESCE(when_to
  1552. _run,NOW()), old_state_data
  1553. ), insert_entry_cte AS (
  1554. INSERT INTO action.ingest_queue_entry
  1555. (queue, record_type, record, override_by, action, run_at, state_data
  1556. )
  1557. SELECT queue, record_type, record, override_by, action, run_at, state_
  1558. data FROM new_entry_cte
  1559. ORDER BY 4 NULLS LAST, 6
  1560. LIMIT 1
  1561. RETURNING *
  1562. ) SELECT * FROM insert_entry_cte"
  1563. PL/pgSQL function action.enqueue_ingest_entry(bigint,text,timestamp with time zo
  1564. ne,integer,text,text) line 20 at SQL statement
  1565. SQL statement "SELECT action.enqueue_ingest_entry( NEW.id, TG_TABLE_SCHEMA, NOW(
  1566. ), ingest_queue, new_action, old_state_data)"
  1567. PL/pgSQL function indexing_ingest_or_delete() line 72 at SQL statement
  1568. WARNING: Enqueuing of biblio.record_entry 3588082 for ingest failed, attempting
  1569. direct ingest
  1570. Closing ebc_an_1.mrc at Fri, 28 Oct 2022 07:21:57 -0400.
  1571.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement