Re: [GENERAL] error on CREATE INDEX when restoring from dump file: could not read block 0

2015-09-28 Thread Vincent Veyron
On Sun, 27 Sep 2015 20:13:17 -0500 Jim Nasby wrote: Hi Jim, Tom > > Not to mention the issue of what happens when someone updates tblcontrat > or tblagent. (It'd be cool if we had cross-table indexes, but this > certainly isn't how to do it...) > I have checks in the application logic to pr

Re: [GENERAL] error on CREATE INDEX when restoring from dump file: could not read block 0

2015-09-28 Thread Vincent Veyron
On Sun, 27 Sep 2015 14:34:24 -0700 Adrian Klaver wrote: > Hi Adrian > What are your pg_dump/pg_restore commands? > > Are you using the 9.4 version of pg_dump to dump the 9.1 server or the > 9.1 version? > Combinations of all these, always the same result. > Hmm, just had a thought. Wonder

Re: [GENERAL] error on CREATE INDEX when restoring from dump file: could not read block 0

2015-09-27 Thread Jim Nasby
On 9/27/15 5:32 PM, Tom Lane wrote: I would be more excited about fixing this if the cases that had come up didn't involve index definitions that were broken on their face. In this example the index entries would depend on entries in not just one but *three* tables, for none of which could the

Re: [GENERAL] error on CREATE INDEX when restoring from dump file: could not read block 0

2015-09-27 Thread Tom Lane
Jim Nasby writes: >> I can create the index in psql with : >> CREATE INDEX tbldossier_id_contrat_idx ON tbldossier USING btree >> (dossier_contrat(id_dossier)); >> but subsequent dumps/restores will always fail on it (only in 9.4, it works >> fine in 9.1). >> What should I be looking for to find

Re: [GENERAL] error on CREATE INDEX when restoring from dump file: could not read block 0

2015-09-27 Thread Adrian Klaver
On 09/27/2015 10:16 AM, Vincent Veyron wrote: Hi, I'm getting the following error when restoring my database from a dump file in postgresql 9.4 -- psql:tmp/mydb.out:159861: ERREUR: n'a pas pu lire le bloc 0 du fichier « base/28903/29447 » : a lu seulement 0 octets sur 8192 CONTEX

Re: [GENERAL] error on CREATE INDEX when restoring from dump file: could not read block 0

2015-09-27 Thread Jim Nasby
On 9/27/15 12:16 PM, Vincent Veyron wrote: In English : ERROR: could not read block 0 from file « base/28903/29447 » : 0 bytes read out of 8192 What relation is that? (SELECT oid::regclass FROM pg_class WHERE relfilenode=29447 in the appropriate database) "dossier_contrat" is a simple sql

[GENERAL] error on CREATE INDEX when restoring from dump file: could not read block 0

2015-09-27 Thread Vincent Veyron
Hi, I'm getting the following error when restoring my database from a dump file in postgresql 9.4 -- psql:tmp/mydb.out:159861: ERREUR: n'a pas pu lire le bloc 0 du fichier « base/28903/29447 » : a lu seulement 0 octets sur 8192 CONTEXTE : fonction SQL « dossier_contrat » lors du la