Re: Restore from dumps

2018-07-26 Thread Nicola Contu
That worked. Thanks guys. 2018-07-25 16:33 GMT+02:00 Nicola Contu : > yeah, we updated that function in production to says public.all_days. > I will let you know at the next restore. > > Thanks guys, appreciated. > > 2018-07-25 16:28 GMT+02:00 Tom Lane : > >> Laurenz Albe writes: >> > Nicola Con

Re: Restore from dumps

2018-07-25 Thread Nicola Contu
yeah, we updated that function in production to says public.all_days. I will let you know at the next restore. Thanks guys, appreciated. 2018-07-25 16:28 GMT+02:00 Tom Lane : > Laurenz Albe writes: > > Nicola Contu wrote: > >> pg_restore: [archiver (db)] could not execute query: ERROR: relatio

Re: Restore from dumps

2018-07-25 Thread Tom Lane
Laurenz Albe writes: > Nicola Contu wrote: >> pg_restore: [archiver (db)] could not execute query: ERROR: relation >> "all_days" does not exist >> LINE 3: from all_days >> ^ >> QUERY: >> select count(*)::numeric >> from all_days >> where (("date" between $2::date and $1::date) or ("date" between

Re: Restore from dumps

2018-07-25 Thread Nicola Contu
Thanks Laurenz I will try that. Btw, just wondering why it works if I refresh it later, even if the definition is still without public 2018-07-25 12:06 GMT+02:00 Laurenz Albe : > Nicola Contu wrote: > > we recently moved from postgres 9.6.6 to 10.4 > > > > We perform a pg_dump in production to re

Re: Restore from dumps

2018-07-25 Thread Laurenz Albe
Nicola Contu wrote: > we recently moved from postgres 9.6.6 to 10.4 > > We perform a pg_dump in production to restore daily in a preprod env. > This process used to work perfectly, but now we have a tiny problem. > > We first restore data, we perform a vacuum and then we restore matviews. > Resto

Re: Restore from dumps

2018-07-25 Thread Nicola Contu
Hello these are the commands we use pretty much: tar -xf tarname.tar -C /backupdatadir --strip-components=4 pg_restore -l /backupdatadir | sed '/MATERIALIZED VIEW DATA/d' > /restore.lst pg_restore -U postgres -L /restore.lst -d DBNAME -j 32 /backupdatadir vacuumdb --analyze-in-stages -U postgr

Re: Restore from dumps

2018-07-25 Thread Alban Hertroys
> On 25 Jul 2018, at 9:43, Nicola Contu wrote: > > Hello, > we recently moved from postgres 9.6.6 to 10.4 > > We perform a pg_dump in production to restore daily in a preprod env. > This process used to work perfectly, but now we have a tiny problem. > > We first restore data, we perform a va

Restore from dumps

2018-07-25 Thread Nicola Contu
Hello, we recently moved from postgres 9.6.6 to 10.4 We perform a pg_dump in production to restore daily in a preprod env. This process used to work perfectly, but now we have a tiny problem. We first restore data, we perform a vacuum and then we restore matviews. Restoring matviews now we have :