Spark JDBC and transaction pooling in PGBouncerPostgres: INSERT if does not exist alreadyPHP and pgbouncer in transaction mode: current transaction is abortedPostgres - ERROR: prepared statement “S_1” already existsHow to configure PreparedStatement Caching with Postgres and Tomcat7 JDBC Pool?Golang - pgbouncer and transaction usageHow to increase the connection throughput for pgbouncer?Disabling prepared statements in dbcp+spring+hibernate+jdbc?Advantage of PgBouncer with WildFly/Application Server connection pool?connect_query setting in PGBouncer + JDBCHow pgbouncer care about session parameters in transaction pooling mode

What is this type of notehead called?

Have I saved too much for retirement so far?

Can someone explain how this makes sense electrically?

Why did the EU agree to delay the Brexit deadline?

Has Darkwing Duck ever met Scrooge McDuck?

We have a love-hate relationship

A Permanent Norse Presence in America

Why has "pence" been used in this sentence, not "pences"?

What is the gram­mat­i­cal term for “‑ed” words like these?

Create all possible words using a set or letters

Query about absorption line spectra

How do I extrude a face to a single vertex

Difference between -| and |- in TikZ

A social experiment. What is the worst that can happen?

Is it possible to use .desktop files to open local pdf files on specific pages with a browser?

Translation of Scottish 16th century church stained glass

How should I respond when I lied about my education and the company finds out through background check?

Should I install hardwood flooring or cabinets first?

Open a doc from terminal, but not by its name

Can I sign legal documents with a smiley face?

Did arcade monitors have same pixel aspect ratio as TV sets?

Find last 3 digits of this monster number

Some numbers are more equivalent than others

How do ground effect vehicles perform turns?



Spark JDBC and transaction pooling in PGBouncer


Postgres: INSERT if does not exist alreadyPHP and pgbouncer in transaction mode: current transaction is abortedPostgres - ERROR: prepared statement “S_1” already existsHow to configure PreparedStatement Caching with Postgres and Tomcat7 JDBC Pool?Golang - pgbouncer and transaction usageHow to increase the connection throughput for pgbouncer?Disabling prepared statements in dbcp+spring+hibernate+jdbc?Advantage of PgBouncer with WildFly/Application Server connection pool?connect_query setting in PGBouncer + JDBCHow pgbouncer care about session parameters in transaction pooling mode













1















I am using Spark JDBC DataFramReader to query Postgres DB, the query is executed threw PGBouncer working in Transaction Pooling.



From the second executed query I receive the following error:



org.postgresql.util.PSQLException: ERROR: prepared statement "S_1" already exists


Is there a workaround for this Error ?



I tried to add prepareThreshold=0 to the connection string.










share|improve this question






















  • I was using fetchSize option in the JDBC, once I removed it, the prepareThreshold=0 was sufficient

    – Alex Stanovsky
    Mar 7 at 11:23












  • I found event better solution which allows to work with fetchSize. I upgraded the jdbc driver to org.postgresql:postgresql:42.2.5

    – Alex Stanovsky
    Mar 7 at 16:02















1















I am using Spark JDBC DataFramReader to query Postgres DB, the query is executed threw PGBouncer working in Transaction Pooling.



From the second executed query I receive the following error:



org.postgresql.util.PSQLException: ERROR: prepared statement "S_1" already exists


Is there a workaround for this Error ?



I tried to add prepareThreshold=0 to the connection string.










share|improve this question






















  • I was using fetchSize option in the JDBC, once I removed it, the prepareThreshold=0 was sufficient

    – Alex Stanovsky
    Mar 7 at 11:23












  • I found event better solution which allows to work with fetchSize. I upgraded the jdbc driver to org.postgresql:postgresql:42.2.5

    – Alex Stanovsky
    Mar 7 at 16:02













1












1








1








I am using Spark JDBC DataFramReader to query Postgres DB, the query is executed threw PGBouncer working in Transaction Pooling.



From the second executed query I receive the following error:



org.postgresql.util.PSQLException: ERROR: prepared statement "S_1" already exists


Is there a workaround for this Error ?



I tried to add prepareThreshold=0 to the connection string.










share|improve this question














I am using Spark JDBC DataFramReader to query Postgres DB, the query is executed threw PGBouncer working in Transaction Pooling.



From the second executed query I receive the following error:



org.postgresql.util.PSQLException: ERROR: prepared statement "S_1" already exists


Is there a workaround for this Error ?



I tried to add prepareThreshold=0 to the connection string.







postgresql apache-spark jdbc pgbouncer spark-jdbc






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 9:08









Alex StanovskyAlex Stanovsky

261116




261116












  • I was using fetchSize option in the JDBC, once I removed it, the prepareThreshold=0 was sufficient

    – Alex Stanovsky
    Mar 7 at 11:23












  • I found event better solution which allows to work with fetchSize. I upgraded the jdbc driver to org.postgresql:postgresql:42.2.5

    – Alex Stanovsky
    Mar 7 at 16:02

















  • I was using fetchSize option in the JDBC, once I removed it, the prepareThreshold=0 was sufficient

    – Alex Stanovsky
    Mar 7 at 11:23












  • I found event better solution which allows to work with fetchSize. I upgraded the jdbc driver to org.postgresql:postgresql:42.2.5

    – Alex Stanovsky
    Mar 7 at 16:02
















I was using fetchSize option in the JDBC, once I removed it, the prepareThreshold=0 was sufficient

– Alex Stanovsky
Mar 7 at 11:23






I was using fetchSize option in the JDBC, once I removed it, the prepareThreshold=0 was sufficient

– Alex Stanovsky
Mar 7 at 11:23














I found event better solution which allows to work with fetchSize. I upgraded the jdbc driver to org.postgresql:postgresql:42.2.5

– Alex Stanovsky
Mar 7 at 16:02





I found event better solution which allows to work with fetchSize. I upgraded the jdbc driver to org.postgresql:postgresql:42.2.5

– Alex Stanovsky
Mar 7 at 16:02












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fstackoverflow.com%2fquestions%2f55039896%2fspark-jdbc-and-transaction-pooling-in-pgbouncer%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • 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%2fstackoverflow.com%2fquestions%2f55039896%2fspark-jdbc-and-transaction-pooling-in-pgbouncer%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

AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

Алба-Юлія

Захаров Федір Захарович