dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

Pgloader disconnects from postgresql too quickly #1605

Open tobeoct opened 3 months ago

tobeoct commented 3 months ago

migration.load


LOAD DATABASE
     FROM mssql://***:*****@*****:1433/database
     INTO postgresql://***:****@127.0.0.1/database

WITH on error resume next,
reset sequences

SET PostgreSQL PARAMETERS
 maintenance_work_mem to '512MB', work_mem to '300MB'

alter schema 'dbo' rename to 'public'

before load do $$ create schema if not exists public; $$;
...
2024-08-21T06:53:08.024000Z LOG Loading the FreeTDS shared librairy (sybdb)
2024-08-21T06:53:08.028000Z LOG DRY RUN, only checking connections.
2024-08-21T06:53:08.028000Z LOG Attempting to connect to #<MSSQL-CONNECTION mssql://****@*****:1433/database{10082614C3}>
Max connections reached, increase value of TDS_MAX_CONN
2024-08-21T06:53:08.112001Z LOG Success, opened #<MSSQL-CONNECTION mssql://****@****:1433/database{10082614C3}>.
2024-08-21T06:53:08.112001Z LOG Running a simple query: SELECT 1;
2024-08-21T06:53:08.116001Z SQL MSSQL: sending query: SELECT 1;
2024-08-21T06:53:08.124001Z LOG Attempting to connect to #<PGSQL-CONNECTION pgsql://***@127.0.0.1:5432/database{10082621B3}>
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0
2024-08-21T06:53:08.152001Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://***@127.0.0.1:5432/database{10082621B3}>
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: parse <unnamed>: select version()
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: duration: 0.249 ms
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: bind <unnamed> to <unnamed>
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: duration: 0.082 ms
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: execute <unnamed>: select version()
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: duration: 0.029 ms
2024-08-21T06:53:08.152001Z WARNING PostgreSQL warning: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 0/1/0
2024-08-21T06:53:08.152001Z LOG Success, opened #<PGSQL-CONNECTION pgsql://****@127.0.0.1:5432/database{10082621B3}>.
2024-08-21T06:53:08.152001Z LOG Running a simple query: SELECT 1;
2024-08-21T06:53:08.152001Z SQL SELECT 1;
2024-08-21T06:53:08.152001Z FATAL SQL failed on #<PGSQL-CONNECTION pgsql://****@127.0.0.1:5432/database{10082621B3}>: PostgreSQL warning: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0

Postgresql Logs


LOG:  08006: could not send data to client: Broken pipe
2024-08-21 00:18:01.442 WAT [2474032] ***@database LOCATION:  internal_flush, pqcomm.c:1399
2024-08-21 00:18:01.442 WAT [2474032] ***@database FATAL:  08006: connection to client lost