Initially I thought It was just with indexes so I ran the changes sets and created the indexes even if the error occurred. But then the same error came with foreign key and primary key preconditions as well.
Without being able to really tell anything, my first suspicion is that our (very old) version of Liquibase doesn’t work with (very new) versions of Postgres. Is it possible to test with last Postgres 9.4 and the 9.4 version of the JDBC driver? Hopefully by the time GSoC starts in earnest, we’ll be closer to getting this merged and can rely on newer versions of things!
The issue finally got resolved with PostgreSQL 9.4 with 9.3-1101-jdbc4 postgresql driver.
One strange thing I observed though was that initially I tried with PostgreSQL 9.6 and with drivers 42.1.4 and 9.4.1212, error appeared randomly after executing certain number of changesets involving index or foreign key or primary key. A change set which might have failed in one execution got executed in another.