You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/04/18 06:52:51 UTC

[GitHub] [pulsar] jiazhai opened a new issue #4075: Debezium postgres connector will hang when create snap

jiazhai opened a new issue #4075: Debezium postgres connector will hang when create snap
URL: https://github.com/apache/pulsar/issues/4075
 
 
   **Describe the bug**
   Debezium postgres connector will first create a snap for current table. And this step will hang if the table is too big.
   
   **To Reproduce**
   1. start pulsar standalone;
   2. start debezium pg server: 
   > docker run --rm --name postgres -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres  debezium/example-postgres:0.8
   3. start a pg connect, and add 1 table with 10K lines: 
   > docker  exec -it  postgres env PGOPTIONS="--search_path=inventory" bash -c 'psql -U $POSTGRES_USER postgres'
   ```
   CREATE TABLE inventory.test04 (
    id serial NOT NULL,
    col1 varchar(20) NOT NULL,
    i_time timestamp NULL DEFAULT now(),
    CONSTRAINT test04_pkey PRIMARY KEY (id)
   );
   
    CREATE OR REPLACE FUNCTION public.insert_test04(x integer)
    RETURNS void
    LANGUAGE plpgsql
   AS $function$
   
   declare i int;
   later time;
   thetime time; 
   
   begin
   
   i:=1; 
   
   for i in 1..x loop 
   
   insert into test04(col1, i_time) values( repeat( chr(int4(random()*26)+65),(random()*(2^2))::integer), now()); 
   
   
   i = i+1;
   
   end loop; 
   
   end;  -- end function
   
   $function$
   ;
   select public.insert_test04(10000);
   
   ```
   4. using current default config of debezium [pg config](https://github.com/apache/pulsar/tree/master/pulsar-io/debezium/postgres/src/main/resources)
   , start debezium local run it will hang when create snapshot.
   > bin/pulsar-admin source localrun  --sourceConfigFile debezium-postgres-source-config.yaml
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services