Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 866 Bytes

README.md

File metadata and controls

32 lines (20 loc) · 866 Bytes

Summary

This repo contains sample code for the issue psycopg/psycopg#158

The issue was tested with the following setup: macOS 12.0.1 (21A559) Python 3.9.8 psycopg-binary 3.0.4

The test case generates a temporary table and then tries to dump the data via copy.

Environment

The following environment variables are required to be set: PGDATABASE, PGUSER, PGPASS, PGHOST, PGPORT.

Usage

python run.py --column 12 --rows 4_000_000

adjust the column and rows parameters to your needs. Values that trigger the issue on my machine are:

columns rows
12 4_000_000
6 7_000_000
3 14_000_000

The number open KQUEUE file descriptor can be monitored with:

watch -n .1 'lsof -w -p <PID> | grep KQUEUE | wc -l'