Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
¿Cómo COPIAR en una tabla PostgreSQL en paralelo sin bloqueo?

Como veo en pg_stat_activiry , solo uno de los comandos COPY se ejecuta a la vez. Otras consultas están en estado de bloqueo, como veo en la columna wait_event_type .

Solo hay una consulta activa a la vez

¿Cómo puedo ejecutar varios COPY mytable FROM STDIN en paralelo sin bloquear la tabla?

PD. mytable es hipertabla de TimescaleDB 2.5.0.

UPD

 CREATE TABLE "public"."mytable" ( "q_time" timestamp, "symbol_id" int, "o" decimal(24,12), "c" decimal(24,12), "h" decimal(24,12), "l" decimal(24,12), "v" bigint, CONSTRAINT mytable_ts_pkey PRIMARY KEY (symbol_id, "q_time") ); SELECT create_hypertable('mytable', 'q_time', 'symbol_id', 1, create_default_indexes => false, chunk_time_interval => '7 days'::interval);

UPD2

Ejecuto en paralelo los siguientes comandos:

 out, err := exec.Command("bash", "-c", "cat file01.gz | gunzip | psql -d db -U user -c "\copy mytable from stdin HEADER DELIMITER ';' CSV\"").Output()

Escala de tiempo DB 2.5.0

PostgreSQL 13

max_conexiones = 200

max_worker_processes = 21

max_parallel_workers = 10

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!