Creating a PL/Perl RPM linked against a custom Perl build
We sometimes have to install a custom Perl build without thread support, and to have some specific versions of CPAN modules, and we don’t want to affect the standard distribution Perl that lives in /usr/bin/perl and /usr/lib/perl5. We use standard PGDG RPMs to install PostgreSQL. We also like PL/Perl, and want PL/Perl to link against our custom Perl build.
It’s easy to achieve this with a small patch to the source RPM spec file:
--- postgresql-8.2.spec.before 2007-02-15 11:52:53.000000000 -0700
+++ postgresql-8.2.spec 2007-02-15 12:02:35.000000000 -0700
@@ -306,6 +306,7 @@
%endif
%if %plperl
--with-perl \
+ --with-libraries=/usr/local/lib/perl5/5.8.7/i386-linux/CORE/libperl.so \
%endif
%if %plpython
--with-python \After applying that patch (adjusted for your own custom Perl build, of course), rebuild the RPM, and install the postgresql-plperl (as of PostgreSQL 8.2) or postgresql-pl (8.1 and earlier) RPM. With a service postgresql restart, you’re ready to go.
postgres sysadmin perl
New edition of The Book of JavaScript reviewed
The Book of JavaScript (2nd edition) is a new and comprehensive introduction to the JavaScript language presented in an entertaining, practical format. I have significant practical experience with JavaScript, so I do not consider myself in the target audience for this book; however, I still found much of it useful so it will remain as a valuable reference on my bookshelf.
My full review of the book was just published at OS News.
books javascript
Interchange 5.4.2 released
Today a new version on the Interchange 5.4 stable branch was released. This was primarily a bugfix release, as documented in the release notes summary.
interchange
Greg Sabino Mullane’s PostgreSQL tips and how-to articles
End Point engineer Greg Sabino Mullane is a prolific writer of PostgreSQL tips, suggestions, and how-to articles in his Planet PostgreSQL blog. Some posts involve emergency procedures to diagnose and fix an ailing database, while others are helpful recipes developers can use. The strengths and weaknesses of various approaches are compared, and there are lots of neat things to learn along the way.
Here’s my list of favorites from those Greg has posted since last March, in reverse chronological order:
- Turning a table into a queue
- Reindexing the PostgreSQL system tables
- Viewing nearby rows
- Finding multi-column keys
- In-database email address validation without reinventing the wheel
- Making a copy of a unique row
- Finding the median of a table using PL/Perl
- Finding the value closest to the average using PL/Perl
- Getting random rows from a database table
- Scripting with psql
- The million table challenge
Enjoy!
database postgres tips
Hardware Monitoring with Nagios on OpenBSD
At End Point we use Nagios and its remote client, NRPE, to monitor servers we manage and alert us to any problems. Aside from the usual monitoring of remote accessibility of services such as a website, database, SSH, etc., it’s very helpful to have monitoring of memory usage, disk space, number of processes, and CPU load.
In this detailed article Dan Collis-Puro shows how to go even further and monitor the CPU and case temperature, and fan speeds, to alert administrators to hardware failures so they can be remedied before they become catastrophic.
networking monitoring openbsd
YAPC::NA 2006 Conference Report
End Pointers Jon Jensen and I, along with 450-500 other Perl enthusiasts, descended on the campus of IIT, the Illinois Institute of Technology in Chicago, for three days at the end of June for the annual North American edition of what is affectionately known by the Perl community as Yet Another Perl Conference (YAPC).
This year’s conference had three main focuses covered by four tracks of talks: Web 2.0 (as the hypesters like to call it), software development methodology improvements, and Perl 6 – the future of the language. Participants and speakers had a range of experience with Perl and varied backgrounds, from experts working for the Perl Foundation on the forefront of Perl 6 development to beginners finding out how best to implement their first assignment.
Perl 6, while not immediately practical for daily use at this time, is advancing the language at the heart of most of End Point’s development. Perl 6 represents advancements in language design that will likely bring Perl back to the forefront of dynamic language syntax and research. But Perl 5 remains in the practical lead it’s long held, with the amazingly wide-ranging and useful CPAN, and it is …
conference perl
Review: Practices of an Agile Developer
Practices of an Agile Developer by Venkat Subramaniam and Andy Hunt (Pragmatic Bookshelf, 2006)
Practices of an Agile Developer is a fast, enjoyable, often-amusing read. It’s also full of wisdom and excellent advice for engineers of all levels, technical managers, and just about anyone with an interest in the software development process. The book makes for a great companion to The Pragmatic Programmer (also co-authored by Andy Hunt), but is more concise and focuses on bigger-picture development practices than does the often-implementation-oriented latter. The authors clearly outline a number of agile methodologies, with attention given to tasks ranging from managing teams, managing time, and keeping estimates realistic, to integration automation, release management, and test-oriented development.
Of particular interest are topics that relate to developer/client interaction, which could apply to a variety of professional relationships (consultant and client; development team and sales team; etc.). The practices outlined present a path to greater success for all parties, with a greater sense of ownership for the client and a greater sense of satisfaction for the developer. …
community books
Trouble with MySQL 4.1 under heavy load
Two of our customers running high-traffic websites backed by MySQL (one using PHP, the other using Perl and Interchange) recently ran into serious problems with their MySQL server getting extremely slow or ceasing to respond altogether. In both cases the problem happened under heavy load, with MySQL 4.1 running on Red Hat Enterprise Linux 4 (i386) with the MySQL RPMs built by Red Hat, installed from Red Hat Network. In both cases, we were unable to find any log output or traffic patterns that indicated the cause of the problem.
When this happened on the first server, we tried numerous MySQL configuration changes, and wrote scripts to monitor the MySQL daemon and restart it when it failed, to give us time to investigate the problem fully. But eventually, out of expediency we simply upgraded to MySQL 5.0 with RPMs provided by the creators of MySQL. Doing so immediately fixed the problem. About a month later when another client encountered the same problem, we went straight for the upgrade path and it fixed things there too.
We haven’t had trouble like this with MySQL before, from any source. I filed a bug report in Red Hat’s bug tracker and Tom Lane quickly pointed me to …
database mysql