Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel COPY FROM crashes server #214

Open
Guilherme-Routar opened this issue Aug 1, 2019 · 0 comments
Open

Parallel COPY FROM crashes server #214

Guilherme-Routar opened this issue Aug 1, 2019 · 0 comments
Assignees

Comments

@Guilherme-Routar
Copy link

I am trying to load data into 4 different foreign tables. Each COPY runs as expected, but whenever I try to parallelize the operation, i.e. run 4 different COPY instructions at the same time, the server crashes with the following message:

FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed. 

Upon restarting the connection, every time I try to execute a single COPY statement, Postgres throws the same error, rendering the tables useless. Only way to have them populated is to drop them, create them again and execute COPY on each table, individually.

Is there a way to do this process in parallel? Each table has a populating process of their own, there are no concurrent writes to the same table.

The command I run to populate the tables is:

COPY <table> FROM '<path>' WITH CSV;

@pykello pykello self-assigned this Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants