Language Selection

English French German Italian Portuguese Spanish

[Tip] PostgreSQL Tip of the Day - mass modification of sequences

Filed under
OS
Linux

Someone posted a dilemma to the pgsql-sql list today that involved many if not all of his sequences getting out of sync with their respective "serial" columns. In other words, something like "SELECT max(id) FROM sometable" yields 42, but the sequence nextval for sometable.id is currently set to 36. This is obviously bad (for reasons left as an exercise for the reader).So besides trying to figure out how the database ended up in this state, he needed a script to reset all of his sequences to the correct next value.

I had run into a similar need not too long ago. Namely, when setting up multi-master replication with Bucardo you need your sequences to draw different values on either master so as not to conflict. One solution is to... Read More

More in Tux Machines

V is for Vivid

Release week! Already! I wouldn’t call Trusty ‘vintage’ just yet, but Utopic is poised to leap into the torrent stream. We’ve all managed to land our final touches to *buntu and are excited to bring the next wave of newness to users around the world. Glad to see the unicorn theme went down well, judging from the various desktops I see on G+. And so it’s time to open the vatic floodgates and invite your thoughts and contributions to our soon-to-be-opened iteration next. Our ventrous quest to put GNU as you love it on phones is bearing fruit, with final touches to the first image in a new era of convergence in computing. From tiny devices to personal computers of all shapes and sizes to the ventose vistas of cloud computing, our goal is to make a platform that is useful, versal and widely used. Read more

Elive Is an Interesting Debian-Based Distro with a Beautiful Enlightenment Desktop

Elive, a Linux distribution based on Debian which uses the Enlightenment desktop environment to provide a unique user experience, has just reached version 2.3.9 Beta and it's ready for testing. Read more

NVIDIA's NVPTX Support For GCC Is Close To Being Merged

The NVPTX back-end code for GCC that's going to allow OpenACC 2.0 offloading support for NVIDIA GPUs with GCC is close to materializing within the mainline code-base. For the past year Mentor Graphics / Code Sourcery has been working on OpenACC 2.0 with GPU offloading as a big addition to the GNU Compiler Collection through their work with NVIDIA Corp. The offloading infrastructure has been worked on for a while and the code that soon looks like it will land is the NVPTX support. Read more

The Future of the Internet - 20 Years Ago

Netscape Navigator was released 20 years ago today. Thank you to everyone who supported us at Netscape & built the Web with us then and now! That was posted by a certain Marc Andreessen. You probably know him as a successful venture capitalist, but before that, he was one of the people who helped popularise the Web. He did that by creating the Mosaic browser back in 1993 - first for Unix, and later for the Apple Macintosh and Windows (version 3.1). Mosaic was written at the University of Illinois, and was freely available for non-commercial use. But once the appeal of a graphical Web browser became evident, it was natural for people to start to think about turning it into a business. Read more