Re: [GENERAL] statement_timeout doesn't work

2014-07-18 Thread David G Johnston
Sergey Konoplev-2 wrote > Hi, > > PostgreSQL 9.2.7, Linux 2.6.32 > > Several days ago I found one of my servers out of connections, > pg_stat_activity showed that everything was waiting for the DROP/ALTER > INDEX transaction (see the record 2 below), that, as I guess, was > waiting for the functi

Re: [GENERAL] [ADMIN] Editable Views

2014-07-18 Thread Adrian Klaver
On 07/18/2014 05:39 PM, Thangavel D Duraisamy wrote: Pls remove meee. See bottom of this email for link to unsubscribe. -- Adrian Klaver adrian.kla...@aklaver.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

Re: [GENERAL] [ADMIN] Editable Views

2014-07-18 Thread Thangavel D Duraisamy
Pls remove meee. On 7/19/14, Ferrell, Denise CTR NSWCDD, Z11 wrote: > Thank you for the info. > > -Original Message- > From: Matheus de Oliveira [mailto:matioli.math...@gmail.com] > Sent: Friday, July 18, 2014 3:22 PM > To: Ferrell, Denise CTR NSWCDD, Z11 > Cc: pgsql-ad...@postgre

Re: [GENERAL] High Disk Utilization on Master with Streaming Replication Running 9.2.4

2014-07-18 Thread John R Pierce
On 7/18/2014 4:44 PM, Joel Avni wrote: Hello, What is the disk overhead for streaming replication? I have noticed that PostgreSQL’s disk utilization goes up by 3x on the master when a slave is connected. The setup only uses streaming replication, i.e. archive is off, there is no archive comman

[GENERAL] High Disk Utilization on Master with Streaming Replication Running 9.2.4

2014-07-18 Thread Joel Avni
Hello, What is the disk overhead for streaming replication? I have noticed that PostgreSQL’s disk utilization goes up by 3x on the master when a slave is connected. The setup only uses streaming replication, i.e. archive is off, there is no archive command. I see with iotop that the wal writer p

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Tom Lane
Merlin Moncure writes: > On Fri, Jul 18, 2014 at 3:53 PM, Tom Lane wrote: >> It's not just that it's "not high on anyone's priority list", it's that >> we'd want to be sure that the patch didn't break any existing use-cases >> or make things unmaintainable. (This isn't exactly a negligible conce

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Merlin Moncure
On Fri, Jul 18, 2014 at 3:53 PM, Tom Lane wrote: > David G Johnston writes: >> While I agree with the sentiment unless someone can present a reason why >> allowing and then ignoring a she-bang is a terrible idea then this seems >> like a case for letting end-users decide what is best for themselv

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Tom Lane
David G Johnston writes: > While I agree with the sentiment unless someone can present a reason why > allowing and then ignoring a she-bang is a terrible idea then this seems > like a case for letting end-users decide what is best for themselves. The > issue then is that apparently this isn't exa

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread John McKown
On Fri, Jul 18, 2014 at 2:37 PM, Andrew Pennebaker wrote: > As a workaround, I can use this shebang hack: > > $ cat hello.psql > --() { :; }; exec psql -f "$0" I hope that isn't patented! "Cause I'm gonna use it when I need to. > > SELECT 'Hello World!'; > > $ ./hello.psql >?column? > -

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Karsten Hilbert
On Fri, Jul 18, 2014 at 05:51:35PM +0200, Francisco Olarte wrote: > Anyway, this is a little bit complex, as psql many times needs arguments. Agreed. > > Could we please have the PostgreSQL lexer treat #!... on the first line of a > > file as a comment? This would enable .psql scripts to be run

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Karsten Hilbert
On Fri, Jul 18, 2014 at 10:41:30AM -0700, David G Johnston wrote: > As an aside - putting an "sql" extension onto a file that uses psql commands > and features seems wrong... Weeell, yeah, but, it can make life easier. Take Midnight Commander for a start -- it recognizes *SQL files by their .sql

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Andrew Pennebaker
As a workaround, I can use this shebang hack: $ cat hello.psql --() { :; }; exec psql -f "$0" SELECT 'Hello World!'; $ ./hello.psql ?column? -- Hello World! (1 row) $ psql -f hello.psql ?column? -- Hello World! (1 row) But I would prefer to use a traditional (#!

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Martin Gudmundsson
18 jul 2014 kl. 17:31 skrev Dennis Jenkins : > On Fri, Jul 18, 2014 at 10:16 AM, Andrew Pennebaker > wrote: > Could we please have the PostgreSQL lexer treat #!... on the first line of a > file as a comment? This would enable .psql scripts to be run with dot-slash > notation preferred by many

Re: [GENERAL] [ADMIN] Editable Views

2014-07-18 Thread Ferrell, Denise CTR NSWCDD, Z11
Thank you for the info. -Original Message- From: Matheus de Oliveira [mailto:matioli.math...@gmail.com] Sent: Friday, July 18, 2014 3:22 PM To: Ferrell, Denise CTR NSWCDD, Z11 Cc: pgsql-ad...@postgresql.org; Forums postgresql Subject: Re: [ADMIN] Editable Views On Fri, Jul 18, 2014 at 1

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Merlin Moncure
On Fri, Jul 18, 2014 at 10:51 AM, Francisco Olarte wrote: > Hi: > > On Fri, Jul 18, 2014 at 5:16 PM, Andrew Pennebaker > wrote: >> Could we please have the PostgreSQL lexer treat #!... on the first line of a >> file as a comment? This would enable .psql scripts to be run with dot-slash >> notatio

Re: [GENERAL] [ADMIN] Editable Views

2014-07-18 Thread Matheus de Oliveira
On Fri, Jul 18, 2014 at 1:56 PM, Ferrell, Denise CTR NSWCDD, Z11 < denise.ferrell@navy.mil> wrote: > Using PostgreSQL 9.3 on Linux Red-Hat platform. > > Does PostgreSQL allow editable views? > Yes, it has automatically updatable views since 9.3, see [1]. You can also add a trigger or a rule

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread David G Johnston
Frank Pinto wrote > I personally like Francisco Olarte's approach. Hashbang's don't support > arguments well ( > http://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-with-a-shebang-i-e) > and being able to put JUST psql as the command to execute the script > doesn't scale across

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Frank Pinto
I personally like Francisco Olarte's approach. Hashbang's don't support arguments well ( http://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-with-a-shebang-i-e) and being able to put JUST psql as the command to execute the script doesn't scale across environments. Previously I'

Re: [GENERAL] [ADMIN] Editable Views

2014-07-18 Thread David G Johnston
Ferrell, Denise CTR NSWCDD, Z11 wrote > Using PostgreSQL 9.3 on Linux Red-Hat platform. > > Does PostgreSQL allow editable views? Please do not cross-post, even within these mailing lists. In almost all cases it is sufficient to post to -general. And besides, this is not really a server adminis

[GENERAL] [ADMIN] Editable Views

2014-07-18 Thread Ferrell, Denise CTR NSWCDD, Z11
Using PostgreSQL 9.3 on Linux Red-Hat platform. Does PostgreSQL allow editable views? Thanks in advance. df smime.p7s Description: S/MIME cryptographic signature

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Martin Gudmundsson
+1 Skickat från min iPhone > 18 jul 2014 kl. 17:58 skrev Adrian Klaver : > >> On 07/18/2014 08:52 AM, Karsten Hilbert wrote: >> On Fri, Jul 18, 2014 at 08:32:53AM -0700, Adrian Klaver wrote: > >> >> I think the OP is talking about executable scripts so both of >> >>$> psql -f the-file.sql

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Adrian Klaver
On 07/18/2014 08:52 AM, Karsten Hilbert wrote: On Fri, Jul 18, 2014 at 08:32:53AM -0700, Adrian Klaver wrote: I think the OP is talking about executable scripts so both of $> psql -f the-file.sql and $> ./the-file.sql (where the-file.sql starts with "#!/usr/bin/en

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Karsten Hilbert
On Fri, Jul 18, 2014 at 08:32:53AM -0700, Adrian Klaver wrote: > >Could we please have the PostgreSQL lexer treat #!... on the first line > >of a file as a comment? This would enable .psql scripts to be run with > >dot-slash notation preferred by many unix users: > > > >./script.psql > > > >While

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Francisco Olarte
Hi: On Fri, Jul 18, 2014 at 5:16 PM, Andrew Pennebaker wrote: > Could we please have the PostgreSQL lexer treat #!... on the first line of a > file as a comment? This would enable .psql scripts to be run with dot-slash > notation preferred by many unix users: > > ./script.psql Dot-slash is not a

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread John Cochran
On Fri, Jul 18, 2014 at 11:32 AM, Adrian Klaver wrote: > On 07/18/2014 08:16 AM, Andrew Pennebaker wrote: > >> Could we please have the PostgreSQL lexer treat #!... on the first line >> of a file as a comment? This would enable .psql scripts to be run with >> dot-slash notation preferred by many

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Adrian Klaver
On 07/18/2014 08:16 AM, Andrew Pennebaker wrote: Could we please have the PostgreSQL lexer treat #!... on the first line of a file as a comment? This would enable .psql scripts to be run with dot-slash notation preferred by many unix users: ./script.psql While still allowing the traditional (an

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Dennis Jenkins
On Fri, Jul 18, 2014 at 10:16 AM, Andrew Pennebaker < andrew.penneba...@gmail.com> wrote: > Could we please have the PostgreSQL lexer treat #!... on the first line of > a file as a comment? This would enable .psql scripts to be run with > dot-slash notation preferred by many unix users: > > ./scri

Re: [GENERAL] statement_timeout doesn't work

2014-07-18 Thread Sergey Konoplev
No hope here? On Tue, Jul 15, 2014 at 9:49 PM, Sergey Konoplev wrote: > Hi, > > PostgreSQL 9.2.7, Linux 2.6.32 > > Several days ago I found one of my servers out of connections, > pg_stat_activity showed that everything was waiting for the DROP/ALTER > INDEX transaction (see the record 2 below),

[GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Andrew Pennebaker
Could we please have the PostgreSQL lexer treat #!... on the first line of a file as a comment? This would enable .psql scripts to be run with dot-slash notation preferred by many unix users: ./script.psql While still allowing the traditional (and Windows compatible) style: psql -f script.psql