How to distribute products to shop by amount of sales

2020-08-15 Thread Andrus
Hi! Table of product types  contains desired quantities in shop     create temp table producttype ( productype char(10) primary key, desired integer check ( desired> 0)     ) on commit drop ;     insert into producttype values ( 'SHOE',3); product table contains products and product t

Re: pg_basebackup + delta base backups

2020-08-15 Thread Stephen Frost
Greetings, * Christopher Pereira (krip...@imatronix.cl) wrote: > On 26-May-20 10:20, Stephen Frost wrote: > >"out of sync" is a bit of an odd concept, but having a replica fall > >behind a long way is certainly something that can happen and may require > >a rebuild from a backup (or from a new syn

Re: serial + db key, or guid?

2020-08-15 Thread Mark Phillips
Thanks to everyone who replied. All helpful. I learned and have new ideas to work with. > On Aug 11, 2020, at 10:42 AM, Adam Brusselback > wrote: > > I mentioned this in another email thread yesterday about a similar topic, but > I'd highly suggest if you do go the UUID route, do not use the

Re: hash joins are causing no space left error

2020-08-15 Thread Ayub M
On Wed, Aug 12, 2020 at 8:06 PM Tom Lane wrote: > Ayub M writes: > > This is PostgreSQL 11 on AWS, there is a mview query in this OLAP > database, > > the tables involved are huge - 50-100m records on average records > hundreds > > of columns in most cases. The query runs for a while and then er