As you know, in MySQL/MariaDB there is no native function for splitting string column by comma or by some regex into a table. In PostgreSQL we a great function regexp_split_to_table for this, but in mysql compatible world it was not possible (till some time ago) to do this without complicated workarounds. Fortunately with introduction of […]
SOLR is great search server, and in some cases I prefer it over Elasticsearch, because it is possible to execute powerful queries very easily via simple GET requests. This way, you don’t need some front-facing app, that translates input requests to search queries.
Simple function that compares two JSON structures (on 1st level only), and returns old values for changed keys. I’m using it to track table changes via before update trigger.
Checklist for major postgresql database upgrade: shutdown standby servers on each standby perform pg_upgrade shutdown master perform pg_upgrade if pg_upgrade fails on postgres database with encoding mismatch, re-init database with initdb start master verify master is ok check if recovery.conf present in slave datadir start slaves one-by-one check if slaves are live and recovering if […]
As always with Oracle its pretty ‘easy‘ and ‘straightforward‘ – you have to convert the high_value to XML and then extract it using XPATH (omg!). Let me guess, it would cost a fortune to provide native function/view that could do that…
Some hopefully useful tips on speeding up data import via SOLR DataImportHandler.
In PostgreSQL it’s quite easy to restrict access for user to some tables: create restrictive view grant usage on view schema grant select on view to restricted user done Really easy. And it’s not working when the restrictive view, is selecting from another view that is using function(s)!
tinc is a great mesh Virtual Private Network daemon, with just one little glitch (and also some little crypto problems ;-). I find its configuration really tedious and complicated compared to OpenVPN and its possibility to centrally assign IP addresses and push options to clients. I know, that’s the tax for being mesh, but wouldn’t […]
Latest version of log-malloc2 library has (IMHO) an unique little feature, that makes it well suited for unit testing memory allocations. It provides simple API for inquiring actual memory usage at runtime. This way, it is possible to compare usage before entering and after leaving some function, to ensure that there are no memory leaks […]
New version of log-malloc2 provides new helpful functions and scripts that make backtrace printing and analyzing easy and convenient. log-malloc2_util.h provides few fully inlined functions: 1. log_malloc_backtrace_init(void) Pre-initializes backtrace() function, to avoid any later memory allocations. Use of this function is optional, but it’s good to use it on program start if you want to […]