[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Perl, does the (postgres) database connection automatically closes itself when the perl script ends or exits?

Posted on 2010-11-10
1
Medium Priority
?
319 Views
Last Modified: 2012-05-10
If this is my database connection, does the (postgres) database connection automatically closes itself when the perl script ends or exits?  I guess I just need a yes/no answer, but if you have additional info you can share, go ahead.

my $dbh = DBI->connect("dbi:Pg:dbname=smis;host=$Host", "$User", "$Password", { RaiseError => 1, AutoCommit => 1 });
0
Comment
Question by:rgbcof
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
Justin Mathews earned 500 total points
ID: 34104606
If you don't properly close the connection (by $dbh->disconnect), postgres DB will keep the connection alive for a while until it times out. So it is a better practice to close the DB connection as soon as you are done with it.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question