Re: [GENERAL] Re: [BUGS] [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Bernd Helmle
--On 4. November 2014 17:18:14 -0500 Tom Lane wrote: Yeah, and I think that it's entirely reasonable for rewriting ALTER TABLEs to update the xmin of the rewritten tuples; after all, the output data could be arbitrarily different from what the previous transactions put into the table. But th

Re: [GENERAL] Re: [BUGS] [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Tom Lane
Andres Freund writes: > On 2014-11-04 13:51:23 -0500, Tom Lane wrote: >> Not sure. The OP's point is that in a SELECT, you do get unsurprising >> results, because a SELECT will acquire its execution snapshot after it's >> gotten AccessShareLock on the table. Arguably COPY should behave likewise.

Re: [GENERAL] Incomplete startup packet help needed

2014-11-04 Thread memtec
You can force this message executing: $ echo | nc SERVER_IP 5432 2014-11-04 21:44:37 CET LOG: incomplete startup packet - http://www.administracion-linux.com -- View this message in context: http://postgresql.1045698.n5.nabble.com/Incomplete-startup-packet-help-needed-tp5199030p5825683.

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Alvaro Herrera
Alejandro Carrillo escribió: > > But This feature is very necessary to control the amount space expensed by a > postgresql user or tablespace. This feature could be used in PostgreSQL > Sharing Hosting, see: Shared Database Hosting - PostgreSQL wiki Sure. Rub hits the road when it comes to act

[GENERAL] Re: [BUGS] [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Andres Freund
On 2014-11-04 13:51:23 -0500, Tom Lane wrote: > Bernd Helmle writes: > > --On 3. November 2014 18:15:04 +0100 Sven Wegener > > wrote: > >> I've check git master and 9.x and all show the same behaviour. I came up > >> with the patch below, which is against curent git master. The patch > >> modifi

[GENERAL] Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Sven Wegener
On Tue, 4 Nov 2014, Tom Lane wrote: > Bernd Helmle writes: > > --On 3. November 2014 18:15:04 +0100 Sven Wegener > > wrote: > >> I've check git master and 9.x and all show the same behaviour. I came up > >> with the patch below, which is against curent git master. The patch > >> modifies the CO

[GENERAL] Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Sven Wegener
On Tue, 4 Nov 2014, Bernd Helmle wrote: > --On 3. November 2014 18:15:04 +0100 Sven Wegener > wrote: > > > I've check git master and 9.x and all show the same behaviour. I came up > > with the patch below, which is against curent git master. The patch > > modifies the COPY TO code to create a ne

[GENERAL] Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Andrew Dunstan
On 11/04/2014 01:51 PM, Tom Lane wrote: Bernd Helmle writes: --On 3. November 2014 18:15:04 +0100 Sven Wegener wrote: I've check git master and 9.x and all show the same behaviour. I came up with the patch below, which is against curent git master. The patch modifies the COPY TO code to crea

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Alejandro Carrillo
But This feature is very necessary to control the amount space expensed by a postgresql user or tablespace. This feature could be used in PostgreSQL Sharing Hosting, see: Shared Database Hosting - PostgreSQL wiki |   | |   |   |   |   |   | | Shared Database Hosting - PostgreSQL wikiThe objecti

Re: [GENERAL] [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Tom Lane
Bernd Helmle writes: > --On 3. November 2014 18:15:04 +0100 Sven Wegener > wrote: >> I've check git master and 9.x and all show the same behaviour. I came up >> with the patch below, which is against curent git master. The patch >> modifies the COPY TO code to create a new snapshot, after acquir

[GENERAL] Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Bernd Helmle
--On 3. November 2014 18:15:04 +0100 Sven Wegener wrote: I've check git master and 9.x and all show the same behaviour. I came up with the patch below, which is against curent git master. The patch modifies the COPY TO code to create a new snapshot, after acquiring the necessary locks on th

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Stephen Frost
* John R Pierce (pie...@hogranch.com) wrote: > On 11/4/2014 9:00 AM, Alejandro Carrillo wrote: > >I need to limit the tablespace file because I need to control the > >hard disk space used in a tablespace > > so what happens if a query does something that violates the quota? It gets cancelled. Se

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread John R Pierce
On 11/4/2014 9:00 AM, Alejandro Carrillo wrote: I need to limit the tablespace file because I need to control the hard disk space used in a tablespace so what happens if a query does something that violates the quota? I can see one difficulty in implementation would be just keeping track of h

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Stephen Frost
* Guillaume Lelarge (guilla...@lelarge.info) wrote: > Yeah. I guess there are a lot of questions yet to be answered. But AFAIUI, > there's no real technical issue. More like discussions to agree on what it > should do and how. Didn't mean to imply there was some specific technical issue. We have

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Rob Sargent
On 11/04/2014 10:09 AM, Guillaume Lelarge wrote: Le 4 nov. 2014 18:00, "Alejandro Carrillo" > a écrit : > > I need to limit the tablespace file because I need to control the hard disk space used in a tablespace. Anybody knows how to do this? Or if it this in the Pos

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 4 Nov 2014 17:00:54 + (UTC), Alejandro Carrillo (faster...@yahoo.es) wrote about "Re: [GENERAL] Tablespace limit feature" (in <1781968257.697829.1415120454794.javamail.ya...@jws3.mail.ir2.yahoo.com>): > I need to limit the tablespace f

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Guillaume Lelarge
Le 4 nov. 2014 17:59, "Stephen Frost" a écrit : > > * Guillaume Lelarge (guilla...@lelarge.info) wrote: > > Le 4 nov. 2014 16:29, "Stephen Frost" a écrit : > > > Having quotas and limits for users is something which I've wanted for a > > > long time, but it's not likely to happen any time particu

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Guillaume Lelarge
Le 4 nov. 2014 18:00, "Alejandro Carrillo" a écrit : > > I need to limit the tablespace file because I need to control the hard disk space used in a tablespace. Anybody knows how to do this? Or if it this in the PostgreSQL roadmap? > Well, Stephen already answered this. There's no way yet to do t

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Alejandro Carrillo
I need to limit the tablespace file because I need to control the hard disk space used in a tablespace. Anybody knows how to do this? Or if it this in the PostgreSQL roadmap? Thanks El Martes 4 de noviembre de 2014 11:52, Guillaume Lelarge escribió: Le 4 nov. 2014 16:29, "St

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Stephen Frost
* Guillaume Lelarge (guilla...@lelarge.info) wrote: > Le 4 nov. 2014 16:29, "Stephen Frost" a écrit : > > Having quotas and limits for users is something which I've wanted for a > > long time, but it's not likely to happen any time particularly soon.. > > Lack of time or technical issue? For the

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Guillaume Lelarge
Le 4 nov. 2014 16:29, "Stephen Frost" a écrit : > > * Alejandro Carrillo (faster...@yahoo.es) wrote: > > Can PostgreSQL's tablespace limit space in MB? Or exists another way to limit space in a table of a tablespace?? > > You can set up quotas on the underlying filesystem, but that will limit > th

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Stephen Frost
* Alejandro Carrillo (faster...@yahoo.es) wrote: > Can PostgreSQL's tablespace limit space in MB? Or exists another way to limit > space in a table of a tablespace?? You can set up quotas on the underlying filesystem, but that will limit the entire tablespace. Having quotas and limits for users

Re: [GENERAL] Tablespace limit feature

2014-11-04 Thread Adrian Klaver
On 11/04/2014 07:05 AM, Alejandro Carrillo wrote: Hi, Can PostgreSQL's tablespace limit space in MB? Or exists another way to limit space in a table of a tablespace?? Not that I know of. What exactly is the issue you are facing? Maybe there is another way to achieve what you want. Thank

[GENERAL] Tablespace limit feature

2014-11-04 Thread Alejandro Carrillo
Hi, Can PostgreSQL's tablespace limit space in MB? Or exists another way to limit space in a table of a tablespace?? Thanks and Regards

[GENERAL] Is any information about trigger-name and src-table available at the protocol-level?

2014-11-04 Thread Andreas Joseph Krogh
See this issue in the pgjdbc-ng driver's issue-list: https://github.com/impossibl/pgjdbc-ng/issues/111#issuecomment-61635914   Is this information available at the protocol-level so the driver can craft meaningful exceptions containing this info (table name causing the trigger to fail, name of

Re: [GENERAL] STABLE vs. IMMUTABLE w.r.t. indexes

2014-11-04 Thread Moshe Jacobson
On Mon, Nov 3, 2014 at 3:16 PM, Tom Lane wrote: > > I'd also like to know why it wouldn't work if the function was STABLE: > > Since Postgres should know that it's not going to change over the course > of > > the query, couldn't it substitute the value as well? > > You have not shown us the conte

Re: [GENERAL] Help with PostgreSQL 9.4 to expand jsonb int array into table with row numbers

2014-11-04 Thread hari . fuchs
David G Johnston writes: > Neil Tiffin-3 wrote >> Trying to wrap my head around postgresql 9.4 jsonb and would like some >> help figuring out how to do the following. >> >> Given the following example jsonb: >> >> ‘{“name1” : value1, “name2” : value2, “name3” : [int1, int2, int3] >> }’