Re: [GENERAL] Non-overlapping updates blocking each other

2017-10-14 Thread Tom Lane
Melvin Davidson writes: > On Sat, Oct 14, 2017 at 12:01 PM, Thomas Kellerer > wrote: >> Since when does Postgres lock the whole table during an update? > When the optimizer thinks it needs to do a TABLE SCAN! Sorry, but that's nonsense. More likely

Re: [GENERAL] Non-overlapping updates blocking each other

2017-10-14 Thread Melvin Davidson
On Sat, Oct 14, 2017 at 12:01 PM, Thomas Kellerer wrote: > Melvin Davidson schrieb am 14.10.2017 um 17:32: > >> More than likely, the optimizer has determined that a table scan is best, >> in which case it will use a table lock. >> That means one updates will be blocking each

Re: [GENERAL] Non-overlapping updates blocking each other

2017-10-14 Thread Thomas Kellerer
Melvin Davidson schrieb am 14.10.2017 um 17:32: More than likely, the optimizer has determined that a table scan is best, in which case it will use a table lock. That means one updates will be blocking each other. Since when does Postgres lock the whole table during an update? -- Sent

Re: [GENERAL] Non-overlapping updates blocking each other

2017-10-14 Thread Melvin Davidson
On Sat, Oct 14, 2017 at 10:30 AM, Seamus Abshere wrote: > hi, > > I've got 2 updates on non-overlapping uuid (primary key) ranges. For > example: > > UPDATE [...] WHERE id BETWEEN 'ff00----' AND > 'ff0f----' > and >

[GENERAL] Non-overlapping updates blocking each other

2017-10-14 Thread Seamus Abshere
hi, I've got 2 updates on non-overlapping uuid (primary key) ranges. For example: UPDATE [...] WHERE id BETWEEN 'ff00----' AND 'ff0f----' and UPDATE [...] WHERE id BETWEEN 'f8c0----' AND

Re: [GENERAL] time series data

2017-10-14 Thread Khalil Khamlichi
Thanks, I'll check it out. Sent via mobile, please forgive typos and brevity On Oct 14, 2017 3:23 PM, "Joshua D. Drake" wrote: > On 10/01/2017 01:17 AM, Khalil Khamlichi wrote: > >> Hi everyone, >> > > Take a look at TimescaleDB they have an extension to Postgres that

Re: [GENERAL] time series data

2017-10-14 Thread Joshua D. Drake
On 10/01/2017 01:17 AM, Khalil Khamlichi wrote: Hi everyone, Take a look at TimescaleDB they have an extension to Postgres that makes this awesome (and yes its free and open source). jD I have a data stream of a call center application coming in  to postgres in this format :

Re: [GENERAL] Delete Duplicates with Using

2017-10-14 Thread legrand legrand
DELETE FROM table_with_duplicates AS T1 USING table_with_duplicates AS T2 WHERE T1.column_1 = T2.column_1 AND T1.column_2 = T2.column_2 AND T1.column_3 = T2.column_3 AND T1.row_num < T2.row_num -- Sent from:

[GENERAL] Where to find development builds of pg for windows

2017-10-14 Thread legrand legrand
Hello, Using PG mainly on windows, I would have liked to test new releases / development versions before they are available in https://www.postgresql.org/download/windows/ Are there some build farms or places where I could find "build snapshots for windows" without having to build them by

[GENERAL] Delete Duplicates with Using

2017-10-14 Thread Igal @ Lucee.org
Hello, I run the SQL query below to delete duplicates from a table.  The subquery is used to identify the duplicated rows (row_num is a BIGSERIAL column). /** delete older copies of duplicates */ DELETE FROM table_with_duplicatesAS T WHERE row_num IN (     SELECT     T1.row_num     FROM