Data migration with the pgloader util on the linux ppc64le platform

Andrey Karazhev
2 min readSep 21, 2021

pgloader can be installed in different ways, so this article describes only one way, how to compile and install on the linux ppc64le platform.

Installation of the SBCL (Steel Bank Common Lisp)

There are binaries for the platform (1.5.8 is the latest current version), but the problem is that threads support is disabled by default, so we will have to rebuild SBCL along with this feature.

Download the latest binaries: http://www.sbcl.org/platform-table.html

Install:

bzip2 -cd sbcl-1.5.8-ppc64le-linux-binary.tar.bz2 | tar xvf - 
cd sbcl-1.5.8-ppc64le-linux
sudo sh install.sh
sbcl

Write: *features*

  • features (:PPC64 :64-BIT :ALIEN-CALLBACKS :ANSI-CL :COMMON-LISP :COMPARE-AND-SWAP-VOPS :ELF :GENCGC :IEEE-FLOATING-POINT :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES :RELOCATABLE-HEAP :SB-DOC :SB-DYNAMIC-CORE :SB-EVAL :SB-LDB :SB-PACKAGE-LOCKS :SB-SOURCE-LOCATIONS :SB-UNICODE :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS :UNIX)

There is no support of threads, so we need to compile it from sources.

Compiling SBCL from Source

SBCL can be compiled from source code using another ANSI-compliant Common Lisp implementation.

  • SBCL itself
  • CMU Common Lisp
  • Clozure CL
  • CLISP
  • ABCL
  • ECL

Clone, compile, install:

git clone git://git.code.sf.net/p/sbcl/sbcl 
cd sbcl
git checkout sbcl-1.5.9
sh make.sh --with-sb-core-compression --with-sb-thread
sudo sh install.sh
sbcl

Write: *features*

  • features (:PPC64 :64-BIT :ALIEN-CALLBACKS :ANSI-CL :COMMON-LISP :COMPARE-AND-SWAP-VOPS :ELF :GENCGC :IEEE-FLOATING-POINT :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES :RELOCATABLE-HEAP :SB-CORE-COMPRESSION :SB-DOC :SB-DYNAMIC-CORE :SB-EVAL :SB-LDB :SB-PACKAGE-LOCKS :SB-SOURCE-LOCATIONS :SB-THREAD :SB-UNICODE :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS :UNIX)

Compilation and installation of the pgloader util

Clone and checkout the latest version (3.6.2 is the latest current version):

git clone https://github.com/dimitri/pgloader.git 
git checkout v3.6.2

To do an adhoc build and install, you can use bootstrap scripts and then compile and install:

chmod +x bootstrap-centos7.sh 
make
./build/bin/pgloader --help

Migration with the pgloader util

To migrate the data you need to pass source and target connection strings:

./build/bin/pgloader/pgloader mysql://$myUser:$myPassword@$myHost:$myPort/$myDb postgresql://$pgUser:$pgPassword@$pgHost:$pgPort/$pgDb

Where variables are:

myUser="user" 
myPassword="password"
myHost="localhost"
myPort="3306"
myDb="database"
pgUser="user"
pgPassword="password"
pgHost="localhost"
pgPort="5432"
pgDb="database"

Enjoy!

Originally published at https://github.com.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response