pg_restore terminates with “out of memory” errorpostgresql replication - pg_stat_replication is showing...

"You are your self first supporter", a more proper way to say it

How old can references or sources in a thesis be?

Font hinting is lost in Chrome-like browsers (for some languages )

Arthur Somervell: 1000 Exercises - Meaning of this notation

Have astronauts in space suits ever taken selfies? If so, how?

Can divisibility rules for digits be generalized to sum of digits

Are the number of citations and number of published articles the most important criteria for a tenure promotion?

How is it possible to have an ability score that is less than 3?

What would happen to a modern skyscraper if it rains micro blackholes?

How does strength of boric acid solution increase in presence of salicylic acid?

What are the differences between the usage of 'it' and 'they'?

How does one intimidate enemies without having the capacity for violence?

Prove that NP is closed under karp reduction?

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

What is the offset in a seaplane's hull?

How can bays and straits be determined in a procedurally generated map?

Fencing style for blades that can attack from a distance

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Adding span tags within wp_list_pages list items

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

What are these boxed doors outside store fronts in New York?

Email Account under attack (really) - anything I can do?

Risk of getting Chronic Wasting Disease (CWD) in the United States?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?



pg_restore terminates with “out of memory” error


postgresql replication - pg_stat_replication is showing empty columnsStreaming replication Postgresql 9.3 using two different serverspg_basebackup giving “could not receive data from client: Connection reset by peer”Why isn't pg_restore --create working?pg_restore: [custom archiver] could not read from input file: end of filepg_restore on OS Xpg_restore error: Extensions installed out of sequencepg_restore with tablespace locationPostgreSQL 10.3 pg_dumpall fails: server closed the connection unexpectedlyVeryfing pg_restore database with pg_dump database






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















Trying to restore a 45mb pg_dump file but it keeps failing with an "out of memory" error.



Content of my postgresql-10-main.log:



2018-01-16 06:14:50.692 WAT [32405] postgres@app_development LOG:  

could not receive data from client: Connection reset by peer
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: incomplete message from client
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development ERROR: unexpected EOF on client connection with an open transaction
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development FATAL: terminating connection because protocol synchronization was lost
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: could not send data to client: Broken pipe


I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.



DB server is localhost.










share|improve this question
















bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • I think the issue should be FATAL: terminating connection because protocol synchronization was lost. It's not related to out of memory.

    – Luan Huynh
    Jan 16 '18 at 7:18











  • Please show the options you are giving to pg_restore.

    – jjanes
    Jan 16 '18 at 15:49


















1















Trying to restore a 45mb pg_dump file but it keeps failing with an "out of memory" error.



Content of my postgresql-10-main.log:



2018-01-16 06:14:50.692 WAT [32405] postgres@app_development LOG:  

could not receive data from client: Connection reset by peer
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: incomplete message from client
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development ERROR: unexpected EOF on client connection with an open transaction
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development FATAL: terminating connection because protocol synchronization was lost
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: could not send data to client: Broken pipe


I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.



DB server is localhost.










share|improve this question
















bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • I think the issue should be FATAL: terminating connection because protocol synchronization was lost. It's not related to out of memory.

    – Luan Huynh
    Jan 16 '18 at 7:18











  • Please show the options you are giving to pg_restore.

    – jjanes
    Jan 16 '18 at 15:49














1












1








1








Trying to restore a 45mb pg_dump file but it keeps failing with an "out of memory" error.



Content of my postgresql-10-main.log:



2018-01-16 06:14:50.692 WAT [32405] postgres@app_development LOG:  

could not receive data from client: Connection reset by peer
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: incomplete message from client
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development ERROR: unexpected EOF on client connection with an open transaction
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development FATAL: terminating connection because protocol synchronization was lost
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: could not send data to client: Broken pipe


I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.



DB server is localhost.










share|improve this question
















Trying to restore a 45mb pg_dump file but it keeps failing with an "out of memory" error.



Content of my postgresql-10-main.log:



2018-01-16 06:14:50.692 WAT [32405] postgres@app_development LOG:  

could not receive data from client: Connection reset by peer
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.692 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: incomplete message from client
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development ERROR: unexpected EOF on client connection with an open transaction
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development CONTEXT: COPY assessment_scores, line 15347
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development STATEMENT: COPY assessment_scores (id, student_id, assessment_id, score, exempt, late, collected, missing, comment, deleted_at, created_at, updated_at) FROM stdin;

2018-01-16 06:14:50.693 WAT [32405] postgres@app_development FATAL: terminating connection because protocol synchronization was lost
2018-01-16 06:14:50.693 WAT [32405] postgres@app_development LOG: could not send data to client: Broken pipe


I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.



DB server is localhost.







postgresql pg-dump pg-restore






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 16 '18 at 11:22







Favourite Chigozie Onwuemene

















asked Jan 16 '18 at 5:20









Favourite Chigozie OnwuemeneFavourite Chigozie Onwuemene

1265




1265





bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • I think the issue should be FATAL: terminating connection because protocol synchronization was lost. It's not related to out of memory.

    – Luan Huynh
    Jan 16 '18 at 7:18











  • Please show the options you are giving to pg_restore.

    – jjanes
    Jan 16 '18 at 15:49



















  • I think the issue should be FATAL: terminating connection because protocol synchronization was lost. It's not related to out of memory.

    – Luan Huynh
    Jan 16 '18 at 7:18











  • Please show the options you are giving to pg_restore.

    – jjanes
    Jan 16 '18 at 15:49

















I think the issue should be FATAL: terminating connection because protocol synchronization was lost. It's not related to out of memory.

– Luan Huynh
Jan 16 '18 at 7:18





I think the issue should be FATAL: terminating connection because protocol synchronization was lost. It's not related to out of memory.

– Luan Huynh
Jan 16 '18 at 7:18













Please show the options you are giving to pg_restore.

– jjanes
Jan 16 '18 at 15:49





Please show the options you are giving to pg_restore.

– jjanes
Jan 16 '18 at 15:49










2 Answers
2






active

oldest

votes


















0














As there is no mention of 'out of memory' in the server side logs, and apparently your client (pg_restore in this case) dies, I'd bet the OOM happens on your local machine. Solving this might depend on many factors - try to close processes that consume a lot of RAM, add more swap, or other.






share|improve this answer
























  • I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.

    – Favourite Chigozie Onwuemene
    Jan 16 '18 at 11:20



















0














Figured out the problem.



I was trying to import a DB dump from Postgres 9.6 to Postgres 10.



Downgraded to Postgres 9.6 and it imported successfully.






share|improve this answer
























  • Umm - if that's truly the case you should report a bug to postgres against that exact version of 10: using pg_dump and pg_restore is the recommended way to upgrade to a new major version of postgres (ie, it should have worked).

    – Scott Corscadden
    Dec 5 '18 at 15:56












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f195456%2fpg-restore-terminates-with-out-of-memory-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














As there is no mention of 'out of memory' in the server side logs, and apparently your client (pg_restore in this case) dies, I'd bet the OOM happens on your local machine. Solving this might depend on many factors - try to close processes that consume a lot of RAM, add more swap, or other.






share|improve this answer
























  • I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.

    – Favourite Chigozie Onwuemene
    Jan 16 '18 at 11:20
















0














As there is no mention of 'out of memory' in the server side logs, and apparently your client (pg_restore in this case) dies, I'd bet the OOM happens on your local machine. Solving this might depend on many factors - try to close processes that consume a lot of RAM, add more swap, or other.






share|improve this answer
























  • I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.

    – Favourite Chigozie Onwuemene
    Jan 16 '18 at 11:20














0












0








0







As there is no mention of 'out of memory' in the server side logs, and apparently your client (pg_restore in this case) dies, I'd bet the OOM happens on your local machine. Solving this might depend on many factors - try to close processes that consume a lot of RAM, add more swap, or other.






share|improve this answer













As there is no mention of 'out of memory' in the server side logs, and apparently your client (pg_restore in this case) dies, I'd bet the OOM happens on your local machine. Solving this might depend on many factors - try to close processes that consume a lot of RAM, add more swap, or other.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 16 '18 at 9:04









dezsodezso

22.5k116097




22.5k116097













  • I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.

    – Favourite Chigozie Onwuemene
    Jan 16 '18 at 11:20



















  • I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.

    – Favourite Chigozie Onwuemene
    Jan 16 '18 at 11:20

















I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.

– Favourite Chigozie Onwuemene
Jan 16 '18 at 11:20





I checked with HTOP, my RAM is at about 4GB/8GB and SWAP space is unused when this happens.

– Favourite Chigozie Onwuemene
Jan 16 '18 at 11:20













0














Figured out the problem.



I was trying to import a DB dump from Postgres 9.6 to Postgres 10.



Downgraded to Postgres 9.6 and it imported successfully.






share|improve this answer
























  • Umm - if that's truly the case you should report a bug to postgres against that exact version of 10: using pg_dump and pg_restore is the recommended way to upgrade to a new major version of postgres (ie, it should have worked).

    – Scott Corscadden
    Dec 5 '18 at 15:56
















0














Figured out the problem.



I was trying to import a DB dump from Postgres 9.6 to Postgres 10.



Downgraded to Postgres 9.6 and it imported successfully.






share|improve this answer
























  • Umm - if that's truly the case you should report a bug to postgres against that exact version of 10: using pg_dump and pg_restore is the recommended way to upgrade to a new major version of postgres (ie, it should have worked).

    – Scott Corscadden
    Dec 5 '18 at 15:56














0












0








0







Figured out the problem.



I was trying to import a DB dump from Postgres 9.6 to Postgres 10.



Downgraded to Postgres 9.6 and it imported successfully.






share|improve this answer













Figured out the problem.



I was trying to import a DB dump from Postgres 9.6 to Postgres 10.



Downgraded to Postgres 9.6 and it imported successfully.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 17 '18 at 5:31









Favourite Chigozie OnwuemeneFavourite Chigozie Onwuemene

1265




1265













  • Umm - if that's truly the case you should report a bug to postgres against that exact version of 10: using pg_dump and pg_restore is the recommended way to upgrade to a new major version of postgres (ie, it should have worked).

    – Scott Corscadden
    Dec 5 '18 at 15:56



















  • Umm - if that's truly the case you should report a bug to postgres against that exact version of 10: using pg_dump and pg_restore is the recommended way to upgrade to a new major version of postgres (ie, it should have worked).

    – Scott Corscadden
    Dec 5 '18 at 15:56

















Umm - if that's truly the case you should report a bug to postgres against that exact version of 10: using pg_dump and pg_restore is the recommended way to upgrade to a new major version of postgres (ie, it should have worked).

– Scott Corscadden
Dec 5 '18 at 15:56





Umm - if that's truly the case you should report a bug to postgres against that exact version of 10: using pg_dump and pg_restore is the recommended way to upgrade to a new major version of postgres (ie, it should have worked).

– Scott Corscadden
Dec 5 '18 at 15:56


















draft saved

draft discarded




















































Thanks for contributing an answer to Database Administrators Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f195456%2fpg-restore-terminates-with-out-of-memory-error%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Anexo:Material bélico de la Fuerza Aérea de Chile Índice Aeronaves Defensa...

Always On Availability groups resolving state after failover - Remote harden of transaction...

update json value to null Announcing the arrival of Valued Associate #679: Cesar Manara ...