[GENERAL] statement_timeout doesn't work

2014-07-15 Thread Sergey Konoplev
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 function call (record 1). -[ RECORD 1 ]

Re: [GENERAL] Design ? table vs. view?

2014-07-15 Thread John McKown
On Tue, Jul 15, 2014 at 8:46 AM, David G Johnston < david.g.johns...@gmail.com> wrote: > John McKown wrote > > I have a table which has some "raw" data in it. By "raw", I mean it is > > minimally processed from a log file. Every week, I update this table by > > processing the weekly log using awk

Re: [GENERAL] PG index architecture

2014-07-15 Thread John R Pierce
On 7/15/2014 2:54 PM, Andy Colson wrote: Ah, yea, sorry, I don't really mean record #1, I mean hard drive seek to address 1. (where address came from the index lookup) of course, its a file+offset, so there's at least 1-2 more levels of indirection before you get to physical addresses on t

Re: [GENERAL] PG index architecture

2014-07-15 Thread Andy Colson
On 7/15/2014 3:54 PM, John R Pierce wrote: On 7/15/2014 1:26 PM, Andy Colson wrote: As I understand indexes, they are a key value pair, that contain a value and a position. You lookup the value then use the position to seek into the database to load the record. indexes are stored as a B-tree.

Re: [GENERAL] PG index architecture

2014-07-15 Thread John R Pierce
On 7/15/2014 1:26 PM, Andy Colson wrote: As I understand indexes, they are a key value pair, that contain a value and a position. You lookup the value then use the position to seek into the database to load the record. indexes are stored as a B-tree. each terminal node has a block number fo

Re: [GENERAL] PG index architecture

2014-07-15 Thread Tom Lane
Andy Colson writes: > As I understand indexes, they are a key value pair, that contain a value > and a position. You lookup the value then use the position to seek into > the database to load the record. > Do we, or could we, load all the the matching index records, then sort > them by positi

Re: [GENERAL] PG index architecture

2014-07-15 Thread Igor Neyman
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Andy Colson > Sent: Tuesday, July 15, 2014 4:27 PM > To: pgsql > Subject: [GENERAL] PG index architecture > > I was thinking about indexes, and am kinda curious about

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread Adrian Klaver
On 07/15/2014 07:45 AM, basti wrote: psql in version 9.1 connect to server 9.3 get the same error as above. => dpkg -l | grep libpq ii libpq5 9.1.13-0wheezy1 amd64PostgreSQL C client library the other I cant say, now thats ii libpq5:amd64

[GENERAL] PG index architecture

2014-07-15 Thread Andy Colson
I was thinking about indexes, and am kinda curious about sequential access. I know nothing of PG guts, so this might even be a dumb question. As I understand indexes, they are a key value pair, that contain a value and a position. You lookup the value then use the position to seek into the da

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread Daniel Verite
basti wrote: > hostall all localhost md5 > > then I get the following error: > > password authentication failed for user "testuser" Aside from submitting a wrong password, a less obvious cause for this error message is when the password is expired. Not so long ago, th

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread Adrian Klaver
On 07/15/2014 07:17 AM, basti wrote: Hello Adrian, Yes I use the correct cluster. password authentication failed for user "testuser" ... is a line from the postgres log Yes I know what "trust" mean. psql in version 9.3 can connect without error, psql in version 9.1 connect to server 9.3 get t

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread basti
psql in version 9.1 connect to server 9.3 get the same error as above. => dpkg -l | grep libpq ii libpq5 9.1.13-0wheezy1 amd64PostgreSQL C client library the other I cant say, now thats ii libpq5:amd64 9.4~beta1-2.pgdg70+1 amd64

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread Adrian Klaver
On 07/15/2014 07:17 AM, basti wrote: Hello Adrian, Yes I use the correct cluster. password authentication failed for user "testuser" ... is a line from the postgres log Yes I know what "trust" mean. psql in version 9.3 can connect without error, psql in version 9.1 connect to server 9.3 get t

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread basti
Hello Adrian, Yes I use the correct cluster. password authentication failed for user "testuser" ... is a line from the postgres log Yes I know what "trust" mean. psql in version 9.3 can connect without error, psql in version 9.1 connect to server 9.3 get the same error as above. I have done th

[GENERAL] Last reclustering time

2014-07-15 Thread Steven Winfield
Is there any way to find when a table was last successfully CLUSTER'd, say from pg_catalog? Last analyzed and last vacuumed times are available, but I can't seem to find anything to do with reclustering. Thanks, Steve.

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread Adrian Klaver
On 07/15/2014 05:52 AM, basti wrote: The last days I have done some tests and it seems that postgres 9.3 and php 5.4.4 can't work together. I find that hard to believe. Can someone please confirm: "; $con = pg_connect("host=$host port=$port dbname=$db user=$user password=$pass") or die

Re: [GENERAL] Design ? table vs. view?

2014-07-15 Thread David G Johnston
John McKown wrote > I have a table which has some "raw" data in it. By "raw", I mean it is > minimally processed from a log file. Every week, I update this table by > processing the weekly log using awk to create a "psql script" file which > looks similar to: > > COPY rawdata FROM STDIN; > li

Re: [GENERAL] Is there a way to get an update date for objects in pg_class

2014-07-15 Thread Néstor Boscán
Thanks On Tuesday, July 15, 2014, Michael Paquier wrote: > On Tue, Jul 15, 2014 at 9:42 AM, Néstor Boscán wrote: >> I want to know if there is a way to get the last modified date of the >> objects structure like tables, views or sequences. > Not directly within the server if this is what you me

Re: [GENERAL] php password authentication failed for user ...

2014-07-15 Thread basti
The last days I have done some tests and it seems that postgres 9.3 and php 5.4.4 can't work together. Can someone please confirm: "; $con = pg_connect("host=$host port=$port dbname=$db user=$user password=$pass") or die ("Could not connect to server\n"); print_r($con); ?> work well with hos

[GENERAL] Design ? table vs. view?

2014-07-15 Thread John McKown
I have a table which has some "raw" data in it. By "raw", I mean it is minimally processed from a log file. Every week, I update this table by processing the weekly log using awk to create a "psql script" file which looks similar to: COPY rawdata FROM STDIN; lines created by awk script \. Th

FW: [GENERAL] operator is not unique: smallint[] @> smallint[] You might need to add explicit type casts (!)

2014-07-15 Thread Marc Mamin
> -Original Message- > From: Pujol Mathieu [mailto:mathieu.pu...@realfusio.com] > Sent: Dienstag, 15. Juli 2014 08:40 > To: Marc Mamin > Subject: Re: [GENERAL] operator is not unique: smallint[] @> > smallint[] You might need to add explicit type casts (!) > > > Le 14/07/2014 13:32, Marc