When to store data that could be derived

2019-03-23 Thread Frank
Hi all As I understand it, a  general rule of thumb is that you should never create a physical column if the data could be derived from existing columns. A possible reason for breaking this rule is for performance reasons. I have a situation where I am considering breaking the rule, but I am

Re: regr_slope returning NULL

2019-03-23 Thread Tom Lane
Steve Baldwin writes: > Consider the following: > ... > log=# select id, regr_slope(elapsed, ts) as trend from sb1 group by id; > id |trend > --+-- > c742 | > 317e | > 5fe6 | 5.78750952760444e-06 > 3441 | > (4 rows) Hm, I get regression=# select id, regr_sl

regr_slope returning NULL

2019-03-23 Thread Steve Baldwin
Hi, I'm not sure whether or not this is a bug, so I've posted here first (after having posted on Stack Overflow). Consider the following: log=# create table sb1(id text, elapsed int, ts numeric); CREATE TABLE log=# insert into sb1 values ('317e',86,1552861322.627),('317e',58,1552861324.747),('31

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, ALL, On Fri, Mar 22, 2019 at 11:32 PM Igor Korot wrote: > > Hi, > > On Sat, Mar 23, 2019 at 10:42 AM Tom Lane wrote: > > > > Igor Korot writes: > > igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 > > | tar xpf - > > > > > On Sat, Mar 23, 2019 at 9:25 AM Ron

Re: software or hardware RAID?

2019-03-23 Thread Kenneth Marshall
On Sat, Mar 23, 2019 at 12:09:11PM +, Rory Campbell-Lange wrote: > On 17/03/19, Rory Campbell-Lange (r...@campbell-lange.net) wrote: > > We aren't sure whether to use software MDRaid or a MegaRAID card. > > > > We're buying some new Postgres servers with > > > > 2 x 240GB Intel SSD S4610

Re: software or hardware RAID?

2019-03-23 Thread Rory Campbell-Lange
On 23/03/19, Hans Schou (hans.sc...@gmail.com) wrote: > On Sun, Mar 17, 2019 at 11:54 PM Rory Campbell-Lange < > r...@campbell-lange.net> wrote: > > > We aren't sure whether to use software MDRaid or a MegaRAID card. > > Never go with hardRaid. I have had a breakdown on a hardware RAID and as >

Re: software or hardware RAID?

2019-03-23 Thread Hans Schou
On Sun, Mar 17, 2019 at 11:54 PM Rory Campbell-Lange < r...@campbell-lange.net> wrote: > We aren't sure whether to use software MDRaid or a MegaRAID card. > Never go with hardRaid. I have had a breakdown on a hardware RAID and as it was special and not off-the-shelf, I could not move the disk to

Re: software or hardware RAID?

2019-03-23 Thread Andy Colson
On 3/23/19 11:51 AM, Rory Campbell-Lange wrote: On 23/03/19, Andy Colson (a...@squeakycode.net) wrote: On 3/23/19 7:09 AM, Rory Campbell-Lange wrote: On 17/03/19, Rory Campbell-Lange (r...@campbell-lange.net) wrote: ... We're buying some new Postgres servers with 2 x 240GB Intel SSD S4

Re: software or hardware RAID?

2019-03-23 Thread Rory Campbell-Lange
On 23/03/19, Andy Colson (a...@squeakycode.net) wrote: > On 3/23/19 7:09 AM, Rory Campbell-Lange wrote: > > On 17/03/19, Rory Campbell-Lange (r...@campbell-lange.net) wrote: ... > > > We're buying some new Postgres servers with > > > > > > 2 x 240GB Intel SSD S4610 (RAID1 : system) > > >

Re: software or hardware RAID?

2019-03-23 Thread Charles Martin
On Sat, Mar 23, 2019 at 9:40 AM Andy Colson wrote: > On 3/23/19 7:09 AM, Rory Campbell-Lange wrote: > > On 17/03/19, Rory Campbell-Lange (r...@campbell-lange.net) wrote: > >> We aren't sure whether to use software MDRaid or a MegaRAID card. > >> > >> We're buying some new Postgres servers with >

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 10:42 AM Tom Lane wrote: > > Igor Korot writes: > igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 > | tar xpf - > > > On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: > >> Off hand I would say the user you are running as does not have the

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 10:36 AM Hans Schou wrote: > > > > On Sat, Mar 23, 2019 at 3:48 PM Igor Korot wrote: >> >> >> You mean even running as "sudo"? > > > igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 > | tar xpf - > > No, you are not running tar as sudo. > > I wou

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 10:17 AM Ron wrote: > > On 3/22/19 9:50 PM, Igor Korot wrote: > > Hi > > On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: > > On 3/23/19 8:58 AM, Adrian Klaver wrote: > > On 3/22/19 11:59 PM, Igor Korot wrote: > > Hi, ALL, > I tried to follow an instructions at > https://ww

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi, On Sat, Mar 23, 2019 at 9:55 AM Michael Loftis wrote: > > > > On Sat, Mar 23, 2019 at 08:48 Igor Korot wrote: >> >> >> > [code] >> > igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 >> >> You mean even running as "sudo"? >> >> Thank you. > > > > You ran the bunzip2 as s

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Adrian Klaver
On 3/23/19 8:42 AM, Tom Lane wrote: Igor Korot writes: igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 | tar xpf - On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: Off hand I would say the user you are running as does not have the permissions to unpack the tarball in the

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Tom Lane
Igor Korot writes: igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 | tar xpf - > On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: >> Off hand I would say the user you are running as does not have the >> permissions to unpack the tarball in the location you have select

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Hans Schou
On Sat, Mar 23, 2019 at 3:48 PM Igor Korot wrote: > > You mean even running as "sudo"? > igor@solaris:/usr$ sudo bunzip2 < postgresql-9.6.1-S11.i386-64.tar.bz2 | tar xpf - No, you are not running tar as sudo. I would at least suggest: cd /usr/local/src sudo tar --bzip2 xf /usr/postgresql-9

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Ron
On 3/22/19 9:50 PM, Igor Korot wrote: Hi On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: On 3/23/19 8:58 AM, Adrian Klaver wrote: On 3/22/19 11:59 PM, Igor Korot wrote: Hi, ALL, I tried to follow an instructions at https://www.postgresql.org/ftp/binary/v9.6.1/solaris/solaris11/i386/ in the README

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Igor Korot
Hi On Sat, Mar 23, 2019 at 9:25 AM Ron wrote: > > On 3/23/19 8:58 AM, Adrian Klaver wrote: > > On 3/22/19 11:59 PM, Igor Korot wrote: > > Hi, ALL, > I tried to follow an instructions at > https://www.postgresql.org/ftp/binary/v9.6.1/solaris/solaris11/i386/ > in the README but I received following

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Ron
On 3/23/19 8:58 AM, Adrian Klaver wrote: On 3/22/19 11:59 PM, Igor Korot wrote: Hi, ALL, I tried to follow an instructions at https://www.postgresql.org/ftp/binary/v9.6.1/solaris/solaris11/i386/ in the README but I received following: Off hand I would say the user you are running as does not h

Re: Installing PostgreSQL on Oracle Solaris

2019-03-23 Thread Adrian Klaver
On 3/22/19 11:59 PM, Igor Korot wrote: Hi, ALL, I tried to follow an instructions at https://www.postgresql.org/ftp/binary/v9.6.1/solaris/solaris11/i386/ in the README but I received following: Off hand I would say the user you are running as does not have the permissions to unpack the tarball

Re: software or hardware RAID?

2019-03-23 Thread Andy Colson
On 3/23/19 7:09 AM, Rory Campbell-Lange wrote: On 17/03/19, Rory Campbell-Lange (r...@campbell-lange.net) wrote: We aren't sure whether to use software MDRaid or a MegaRAID card. We're buying some new Postgres servers with 2 x 240GB Intel SSD S4610 (RAID1 : system) 4 x 960GB Intel SS

Re: software or hardware RAID?

2019-03-23 Thread Rory Campbell-Lange
On 17/03/19, Rory Campbell-Lange (r...@campbell-lange.net) wrote: > We aren't sure whether to use software MDRaid or a MegaRAID card. > > We're buying some new Postgres servers with > > 2 x 240GB Intel SSD S4610 (RAID1 : system) > 4 x 960GB Intel SSD S4610 (RAID10 : db) > > We'll be usi