Serendipity and PostgreSQL - Fixing auto-increment errors

If you – for whatever reason – move your Serendipity installation to another machine or database, you may encounter the following error:

Error: Entries were not successfully inserted!

The reason for this error is a wrong value for the entry counter in the „serendipity_entries” table.

You can verify this very easily. Just connect to the database via „psql -d DATABASENAME” and issue the command SELECT MAX(id) FROM serendipity_entries; and SELECT nextval('serendipity_entries_id_seq');:

demo=# SELECT MAX(id) FROM serendipity_entries;
(1 Zeile)
demo=# SELECT nextval('serendipity_entries_id_seq');
(1 Zeile)

As you can see, the counter value for the next entry (11) is way lower than the actual counter value for the latest entry (281).

So, in order to fix this, we just have to set the counter to a „valid” value SELECT setval('serendipity_entries_id_seq', (SELECT MAX(id) FROM serendipity_entries)+1);:

demo=# SELECT setval('serendipity_entries_id_seq', (SELECT MAX(id) FROM serendipity_entries)+1);
(1 Zeile)

So the next entry will get the number 282 and everything will be fine.

Replace „serendipity” with the database prefix you set for your Serendipity installation.

Now, if I would have been able to see the actual database error and not the useless ” Entries were not successfully inserted” text, I would have been able to fix this a lot faster. :(

Tagged as: , , , , , | Author:
[Sonntag, 20121125, 13:59 | permanent link | 0 Kommentar(e)

Links from 2012-11-21

HP takes $8.8 billion writedown on Autonomy

Whitman said Apotheker and Shane Robison, HP’s former head of strategy, are to blame, and she noted that they are both gone. Whitman said that the board – of which she was a part at the time of the purchase – „feels terribly” about missing Autonomy’s accounting fraud. But she said the purchase was thoroughly audited by consulting giant Deloitte, which itself was audited by KPMG – and neither of those companies found anything suspicious about the deal.

Tagged as: , | Author:
[Donnerstag, 20121122, 04:00 | permanent link | 0 Kommentar(e)

Links from 2012-11-11

Process real-time big data with Twitter Storm

Storm is an open source, big-data processing system that differs from other systems in that it’s intended for distributed real-time processing and is language independent. Learn about Twitter Storm, its architecture, and the spectrum of batch and stream processing solutions.

Understand memory leaks in JavaScript applications

Garbage collection can be freeing. It lets us focus on application logic rather than memory management. However, garbage collection is not magic. Understanding how it works, and how it can be tricked into maintaining memory long after it should have been released, results in faster and more reliable applications. In this article, learn about a systematic approach for locating memory leaks in JavaScript applications, several common leaking patterns, and appropriate methods to address those leaks.

Tagged as: , | Author:
[Montag, 20121112, 04:00 | permanent link | 0 Kommentar(e)

This week (some parts nsfw)

Amanda Palmer Stagedive at Arena Vienna 5.11.2012:

Amanda Palmer and Neil Gaiman - „Psycho” (Leon Payne):

Neil Gaiman: „The Day the Saucers Came”

Amanda Palmer & The Grand Theft Orchestra „Do It With a Rockstar”
THE (NSFW) VIDEO… (and if you’re in germany and the embed doesn’t work, USE vimeo):

(trouble with the embed? here it is on youtube, and here it is it is on vimeo)

Tagged as: , , , | Author:
[Freitag, 20121109, 18:25 | permanent link | 0 Kommentar(e)


„Leyrers Online Pamphlet“ ist die persönliche Website von mir, Martin Leyrer. Die hier veröffentlichten Beiträge spiegeln meine Ideen, Interessen, meinen Humor und fallweise auch mein Leben wider.
The postings on this site are my own and do not represent the positions, strategies or opinions of any former, current or future employer of mine.

Me, Elsewhere

Tag Cloud

2007, 2blog, 2do, 2read, a-trust,, a1, accessability, acta, advent, age, ai, amazon, ankündigung, apache, apple, audio, austria, backup, barcamp, basteln, bba, big brother awards, birthday, blog, blogging, book, books, browser, Browser_-_Firefox, bruce sterling, buch, bürgerkarte, cars, cartoon, ccc, cfp, christmas, cloud, coding, collection, command line, commandline, computer, computing, concert, conference, copyright, covid19, css, database, date, datenschutz, debian, delicious, demokratie, design, desktop, deutsch, deutschland, dev, developer, development, devops, digitalks, dilbert, disobay, dna, dns, Doctor Who, documentation, Domino, domino, Douglas Adams, download, downloads, drm, dsk, dvd, e-card, e-government, e-mail, e-voting, E71, education, Ein_Tag_im_Leben, elga, email, encryption, essen, EU, eu, event, events, exchange, Extensions, fail, fedora, feedback, film, firefox, flash, flightexpress, food, foto, fsfe, fun, future, games, gaming, geek, geld, git, gleichberechtigung, google, graz, grüne, grüninnen, hack, hacker, handtuch, handy, hardware, HHGTTG, history, how-to, howto, hp, html, humor, IBM, ibm, ical, iCalendar, image, innovation, intel, internet, internet explorer, iot, iphone, ipod, isp, it, IT, itfails, itfailsAT, itfailsDE, java, javascript, job, jobmarket, journalismus, keyboard, knowledge, konzert, language, laptop, law, lego, lenovo, life, links, Linux, linux, linuxwochen, linuxwochenende, live, living, living, lol, london, lost+found, Lotus, lotus, lotus notes, Lotus Notes, lotusnotes, LotusNotes, Lotusphere, lotusphere, Lotusphere2006, lotusphere2007, Lotusphere2008, lotusphere2008, lustig, m3_bei_der_Arbeit, m3_bei_der_Arbeit, mac, mail, marketing, mathematik, media, medien, metalab, microsoft, Microsoft, mITtendrin, mITtendrin, mobile, mood, motivation, movie, mp3, multimedia, music, musik, männer, nasa, nerd, netwatcher, network, netzpolitik, news, nokia, Notes, notes, Notes+Domino, office, online, OOXML, open source, openoffice, opensource, orf, orlando, os, outlook, patents, pc, pdf, performance, perl, personal, php, picture, pictures, podcast, politics, politik, pr, press, press, presse, privacy, privatsphäre, productivity, programming, protest, public speaking, qtalk, quintessenz, quote, quotes, radio, rant, rant, recherche, recht, release, review, rezension, rezension, rip, rss, science, search, security, server, settings, sf, shaarli, Show-n-tell thursday, sicherheit, silverlight, smtp, SnTT, social media, software, sony, sound, space, spam, sprache, sprache, spö, ssh, ssl, standards, storage, story, stupid, summerspecial, summerspecial, sun, surveillance, sysadmin, talk, talk, talks, technology, The Hitchhikers Guide to the Galaxy, theme, think, thinkpad, thunderbird, tip, tipp, tools, topgear, torrent, towel, Towel Day, TowelDay, travel, truth, tv, twitter, ubuntu, ui, uk, unix, update, usa, usb, vds, video, video, videoüberwachung, vienna, vim, Vim, vintage, vista, vorratsdatenspeicherung, vortrag, wahl, wcm, wcm, web, web 2.0, web2.0, web20, Web20, webdesign, werbung, wien, wiener linien, wikileaks, windows, windows, windows 7, wired, wishlist, wissen, Wissen_ist_Macht, wlan, work, workshops, wow, writing, wtf, wunschzettel, Wunschzettel, www, xbox, xml, xp, zensur, zukunft, zukunft, zune, österreich, österreich, övp, übersetzung, überwachung

AFK Readinglist