venvmgr in action

Venvmgr, short for Virtual environment manager, is now available on my gitlab, here.

This tool aims at assisting management of python venvs, especially during development.

It started with my constantly losing track of my python projects, having multiple venvs, multiple places to store source code, which inevitably resulted in a…

--

--

I was trying to simply standby clone. Pretty basic. But I was getting a “segmentation fault”, no further log output.

I didn’t know what a segfault is, so I googled it:

A segmentation fault  occurs when a program attempts to access a memory location that it is  not allowed to access, or attempts to access a memory location in a way  that is not allowed (for example, attempting to write to a read-only  location, or to overwrite part of the operating system)

It hit me that prior to running the standby clone that I had run rm -rf $PGDATA . So, repmgr was trying to standby clone writing into a nonexisting directory. The simple fix was mkdir -p $PGDATA , and on subsequent runs, using rm -rf $PGDATA/* instead.

--

--

In our production system we have repmgr for managing failover for our Postgres databases. However, in one incident we had a while ago, our Primary (master) node went down due to a network problem, and repmgr didn’t perform the failover as expected. On reviewing the logs we saw that one…

--

--

Kobi Rosenstein

Linux infrastructure guy. This blog chronicles my “gotcha” moments — Each post contains an answer I would have like to have found when trawling google.