<div dir="ltr"><div>Hi,</div><div>I was just about to report to <a href="mailto:Pkg-postgresql-public@lists.alioth.debian.org">Pkg-postgresql-public@lists.alioth.debian.org</a> when I found that Jeremy already opened a bug. I just started on this, but still I wanted to share the bit I had.</div><div><br></div><div><div>I hit it while trying to prepare the recent postgres mircorelease for Ubuntu.</div><div>At least the issue seems 100% reproducible with autopkgtests and locally as well.</div><div><br></div><div>The error comes down to</div><div>pg_buildext installcheck</div><div>[...]</div><div>test tablespace               ... FAILED</div><div>[...]</div><div>ERROR:  could not create unique index "idx_badindex_n"</div><div>DETAIL:  Key (n)=(10) is duplicated.</div><div>STATEMENT:  CREATE UNIQUE INDEX CONCURRENTLY idx_badindex_n ON tbl_badindex (n);</div><div><br></div><div>Jeremy already pointed out the issue is not specific to Ubuntu, Debian hits the same in debci with the recent 9.6.2 update, see [1].</div><div><br></div><div>As mentioned before the case can be reproduced easily in any Debian/Ubuntu environment with pg-repack, example:</div><div># prep current debian system</div><div> $ lxc launch  95fba011e3ad debiansid-postgres-fail-stableupdate</div><div> $ lxc exec debiansid-postgres-fail-stableupdate bash</div><div># get packages and source</div><div> $ apt-get install postgresql-9.6-repack postgresql-server-dev-all dpkg-dev</div><div> $ echo "deb-src <a href="http://httpredir.debian.org/debian">http://httpredir.debian.org/debian</a> sid main" >> /etc/apt/sources.list</div><div> $ apt-get update</div><div> $ apt-get source pg-repack</div><div># prep test env</div><div> $ cd pg-repack-1.3.4/</div><div> $ mkdir /tmp/pg-repack-tablespace</div><div> $ chown postgres:postgres /tmp/pg-repack-tablespace</div><div># these two commands you can iterate on when debugging</div><div> $ service postgresql stop</div><div> $ pg_buildext installcheck</div><div><br></div><div>On Ubuntu you'd need the ppa [2] I currently test on to trigger it - also Yakkety is the only releases which has pr-repack atm.</div><div><br></div><div>[1]: <a href="https://ci.debian.net/packages/p/pg-repack/unstable/amd64/">https://ci.debian.net/packages/p/pg-repack/unstable/amd64/</a></div><div>[2]: <a href="https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/2470">https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/2470</a></div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(136,136,136);font-size:12.8px">Christian Ehrhardt</span><div style="color:rgb(136,136,136);font-size:12.8px">Software Engineer, Ubuntu Server</div><div style="color:rgb(136,136,136);font-size:12.8px">Canonical Ltd</div></div></div></div></div>
</div>