Skip to content

Instantly share code, notes, and snippets.

It was taking too long for Bucardo to import certain tables. Decided to look into it by querying the new database to check what was so slow.

First step was checking pg_stat_activity:

> select query, query_start, wait_event from pg_stat_activity where usename = 'bucardo_replicator';

/* Bucardo 5.6.0 */COPY public.some_table("id","...","...","created_at","updated_at") FROM STDIN | 2024-05-02 15:36:13.816752+00 | IO::DataFileRead

Bucardo is unfortunately not very good at reporting its progress. This guide details the most important parts.

Note: This mostly assumes you're using Bucardo with onetimecopy=1

There are three major states of Bucardo we care about:

  1. Truncating a table on the new database
  2. Doing the initial copy from old to new database
  3. Live replication mode from old to new (aka “delta mode”)
@ef4
ef4 / examples.md
Last active July 20, 2025 09:12
Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 4 automatically polyfilled many Node APIs in the browser. This was not a great system, because it could lead to surprisingly giant libraries getting pulled into your app by accident, and it gave you no control over the exact versions of the polyfills you were using.

So Webpack 5 removed this functionality. That means you need to make changes if you were relying on those polyfills. This is a quick reference for how to replace the most common patterns.

List of polyfill packages that were used in webpack 4

For each automatically-polyfilled node package name on the left, this shows the name of the NPM package that was used to polyfill it on the right. Under webpack 5 you can manually install these packages and use them via resolve.fallback.

@Leen15
Leen15 / install_bucardo.sh
Last active October 17, 2025 08:48
step by step for install a bucardo instance
# NB: you need to have ubuntu 16.04 for install last version of bucardo, with 14.04 apt installs version 4.xx
apt-get update
apt-get install bucardo nano -y
mkdir /srv/bucardo
mkdir /var/run/bucardo
service postgresql start
@JalfResi
JalfResi / revprox.go
Last active August 9, 2025 19:56
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {