Re: [GENERAL] ??: postgres cpu 100% need help

2015-11-24 Thread 657985...@qq.com
oh .thanks i understand . but i still have a question . [root@pg1 pgdata]# uname -a Linux pg1 3.10.0-123.9.3.el7.x86_64 #1 SMP Thu Nov 6 15:06:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux [root@pg1 pgdata]# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) my os is centos7 . is the

Re: [GENERAL] ??: postgres cpu 100% need help

2015-11-24 Thread Tom Lane
"657985...@qq.com" <657985...@qq.com> writes: > thanks for you help . but the following config Indicate my OS THP is Disable > [root@pg1 ~]# grep -i HugePages_Total /proc/meminfo > HugePages_Total: 0 > [root@pg1 ~]# cat /proc/sys/vm/nr_hugepages > 0 Those values reflect whether *explicit*

Re: [GENERAL] ??: postgres cpu 100% need help

2015-11-24 Thread 657985...@qq.com
hi kevin: thanks for you help . but the following config Indicate my OS THP is Disable [root@pg1 ~]# grep -i HugePages_Total /proc/meminfo HugePages_Total: 0 [root@pg1 ~]# cat /proc/sys/vm/nr_hugepages 0 657985...@qq.com From: Kevin Grittner Date: 2015-11-23 23:30 To: 657985...@qq.com

Re: [GENERAL] JSON path wild cards?

2015-11-24 Thread Oleg Bartunov
On Tue, Nov 24, 2015 at 12:39 PM, Dennis wrote: > Is there a way to specify a wild card in a json path? > > For example I have the following json doc: > > [ {“a”:1,”b”: [ { “x”: 7,”y”:8,”z”:9} ] }, {“a”:2,”b”: [ { “x”: > 4,”y”:5,”z”:6} ] }, … ] > > How do I write a select clause that can return

Re: [GENERAL] error messages not getting logged when running script from cron

2015-11-24 Thread Adrian Klaver
On 11/23/2015 04:33 PM, anj patnaik wrote: I am seeing a bizarre behavior. The command works fine when called directly from prompt, but when invoked via cron, there is no output nor mail. This works fine: script 2>&1 | tee /tmp/ff ; mailx -s "email" -myem...@company.com

[GENERAL] Can row level security policies also be implemented for views?

2015-11-24 Thread Caleb Meredith
I'm developing an application where strict control of my data is important. Views allow me to build a strict custom reading experience, allowing me to add computed columns and hide private and metadata columns. Row level security allows me strict write control of my data. However, I can't use both

Re: [GENERAL] error messages not getting logged when running script from cron

2015-11-24 Thread anj patnaik
I am seeing a bizarre behavior. The command works fine when called directly from prompt, but when invoked via cron, there is no output nor mail. This works fine: script 2>&1 | tee /tmp/ff ; mailx -s "email" -myem...@company.com < /tmp/ff Now, I place the identical line in crontab file and the out

Re: [GENERAL] "trust" authentication in pg_hba.conf

2015-11-24 Thread John R Pierce
On 11/24/2015 1:33 PM, Chris Withers wrote: What's the default contents of pg_hba.conf that postgres ships with? I've been to it contains 'trust' for all local connections. Is this wise? Anyone who can get a shell on your database server can connect to any database as any user? it varies

[GENERAL] "trust" authentication in pg_hba.conf

2015-11-24 Thread Chris Withers
Hi All, What's the default contents of pg_hba.conf that postgres ships with? I've been to it contains 'trust' for all local connections. Is this wise? Anyone who can get a shell on your database server can connect to any database as any user? cheers, Chris -- Sent via pgsql-general mailing

Re: [GENERAL] What could cause CREATE TEMP... "could not read block" error?

2015-11-24 Thread Chris Richards
> Are you running the latest minor release for your PostgreSQL version? No. 9.3.9 whereas the lastest is 9.3.10 > Were there any crashes recently? No[*]. See comments below about LVM snapshots. > Do you have "fsync = on"? Yes. > Did you make sure that you have a reliable storage system? RAID

Re: [GENERAL] Problems with pg_upgrade after change of unix user running db.

2015-11-24 Thread Bruce Momjian
On Mon, Nov 23, 2015 at 11:12:25AM +, Benedikt Grundmann wrote: > I got this error trying to upgrade one of our database clusters (happily in > testing) from 9.2 to 9.4: > > Old and new cluster install users have different values for pg_authid.oid > > Important background here is that we used

Re: [GENERAL] full_page_writes on SSD?

2015-11-24 Thread John R Pierce
On 11/24/2015 10:48 AM, Marcin Mańk wrote: I saw this: http://blog.pgaddict.com/posts/postgresql-on-ssd-4kb-or-8kB-pages It made me wonder: if SSDs have 4kB/8kB sectors, and we'd make the Postgres page size equal to the SSD page size, do we still need full_page_writes? an SSD's actual writ

Re: [GENERAL] full_page_writes on SSD?

2015-11-24 Thread Andres Freund
On 2015-11-24 13:09:58 -0600, Kevin Grittner wrote: > On Tue, Nov 24, 2015 at 12:48 PM, Marcin Mańk wrote: > > > if SSDs have 4kB/8kB sectors, and we'd make the Postgres page > > size equal to the SSD page size, do we still need full_page_writes? > > If an OS write of the PostgreSQL page size ha

Re: [GENERAL] full_page_writes on SSD?

2015-11-24 Thread Kevin Grittner
On Tue, Nov 24, 2015 at 12:48 PM, Marcin Mańk wrote: > if SSDs have 4kB/8kB sectors, and we'd make the Postgres page > size equal to the SSD page size, do we still need full_page_writes? If an OS write of the PostgreSQL page size has no chance of being partially persisted (a/k/a torn), I don't t

[GENERAL] full_page_writes on SSD?

2015-11-24 Thread Marcin Mańk
I saw this: http://blog.pgaddict.com/posts/postgresql-on-ssd-4kb-or-8kB-pages It made me wonder: if SSDs have 4kB/8kB sectors, and we'd make the Postgres page size equal to the SSD page size, do we still need full_page_writes? Regards Marcin Mańk