Skip to content

use QGis import data cause pgpool hang. #162

@liujinyang-highgo

Description

@liujinyang-highgo

hi,
when I use Qgis import data from local disk to postgresql(with postgis) through pgpool, that cause pgpool hang.
pgpool version: 4.6.2

reproduce:
1.install Qis
version: QGIS-OSGeo4W-3.40.14-1.msi
you can download it on https://qgis.org/downloads-list/#windows and search by file name "QGIS-OSGeo4W-3.40.14-1", then can download it.
install this version, after installed, directory "QGIS 3.40.14" will be appeared on your desktop, and later use "OSGeo4W Shell" in this directory to test.
2. install pg 16 with postgis.
3. test file see attachment : sampleGDB.zip
unzip this file to local disk d:\testdata
4. test command
ogr2ogr -f "PostgreSQL" "PG:dbname=postgres host=192.168.71.100 port=9999 user=postgres password=123456" D:\testdata\sampleGDB\sampleGDB.gdb sample -nln "sde.bbbbb10" -lco GEOMETRY_NAME=shape -lco FID=objectid -overwrite -progress

run above command in "OSGeo4W Shell", then pgool is hung.
if change port to 5432 connect to PG that can success.

I checked code, it is hung in function CopyDataRows(),but don't know the root cause.

CopyDataRows()
{

if (copyin)
{
	for (i = 0; i < NUM_BACKENDS; i++)
	{
		if (VALID_BACKEND(i))
		{
			pool_flush(CONNECTION(backend, i));

			/*
			 * Check response from the backend.  First check SSL and read
			 * buffer of the backend. It is possible that there's an error
			 * message in the buffer if the COPY command went wrong.
			 * Otherwise wait for data arrival to the backend socket.
			 */
			if (!pool_ssl_pending(CONNECTION(backend, i)) &&
				pool_read_buffer_is_empty(CONNECTION(backend, i)) &&
				synchronize(CONNECTION(backend, i)))                                                 -------was hung in this function
				ereport(FATAL,
						(return_code(2),
						 errmsg("unable to copy data rows"),
						 errdetail("failed to synchronize")));
		}
	}
}

}

could you help check this?
thanks a lot!

sampleGDB.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions