Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: I thought there was the idea that the list of objects to drop was to be acquired before actually doing the deletion; so that the trigger function could, for instance, get the name of the table being dropped. I don't see that it works if we only

[HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Miroslav Šimulčík
Hi all, I have deferred constraint update trigger in which I need to set same timestamp to all modified rows. The time needs to be the time of first invocation of this trigger fuction in transaciton. My intention is to set commit time to rows modified in transaction. So I need function that will

Re: [HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Misa Simic
Hi, I dont have access to pg at this moment... But: BEGIN; SELECT now(); SELECT clock_timestamp(); SELECT now(); SELECT pg_sleep(100); SELECT now(); cCOMMIT; Now() should always return the same, very first, result... On Wednesday, February 6, 2013, Miroslav Šimulčík wrote: Hi

Re: [HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Miroslav Šimulčík
This is not what I'm looking for. now() returns transaction start time. I need to set my own time anytime in transaction and then use that time later. Miro 2013/2/6 Misa Simic misa.si...@gmail.com Hi, I dont have access to pg at this moment... But: BEGIN; SELECT now(); SELECT

Re: [HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Pavel Stehule
2013/2/6 Miroslav Šimulčík simulcik.m...@gmail.com: This is not what I'm looking for. now() returns transaction start time. I need to set my own time anytime in transaction and then use that time later. Miro 2013/2/6 Misa Simic misa.si...@gmail.com Hi, I dont have access to pg at this

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: The bigger change I mentioned was the stuff in dependency.c -- I wasn't too happy about exposing the whole ObjectAddresses stuff to the outside world. The attached version only exposes simple accessors to let an external user of that to iterate

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Alvaro Herrera
Dimitri Fontaine escribió: Alvaro Herrera alvhe...@2ndquadrant.com writes: I thought there was the idea that the list of objects to drop was to be acquired before actually doing the deletion; so that the trigger function could, for instance, get the name of the table being dropped. I

Re: [HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Miroslav Šimulčík
probably you can use a little bit cheaper session variables I rejected session variables, because they don't get cleared at the end of transaction if somebody set value on session level. So I can't decide if new transaction started. this is good (variable is cleared at the end of

Re: [HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Craig Ringer
On 02/06/2013 06:19 PM, Miroslav Šimulčík wrote: Hi all, I have deferred constraint update trigger in which I need to set same timestamp to all modified rows. The time needs to be the time of first invocation of this trigger fuction in transaciton. My intention is to set commit time to rows

Re: [HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Miroslav Šimulčík
As fast as possible and PL/PgSQL function don't go that well together. PL/PgSQL is well and good for a great many jobs, but I doubt this is one of them. Yes, I know. It was just example to demostrate functionality I need. If you're willing to spend the time to do it, consider writing a

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: Well, I don't necessarily suggest that. But how about something like this in performMultipleDeletions: [edited snippet of code] /* invoke sql_drop triggers */ EventTriggerSQLDrop(); /*

Re: [HACKERS] function for setting/getting same timestamp during whole transaction

2013-02-06 Thread Pavel Stehule
2013/2/6 Miroslav Šimulčík simulcik.m...@gmail.com: As fast as possible and PL/PgSQL function don't go that well together. PL/PgSQL is well and good for a great many jobs, but I doubt this is one of them. Yes, I know. It was just example to demostrate functionality I need. If you're

[HACKERS] Facing authentication error on postgres 9.2 - dblink functions

2013-02-06 Thread Dev Kumkar
Hello Everyone, I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows: * SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')* *ERROR*: could not establish connection DETAIL:

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Alvaro Herrera
Dimitri Fontaine escribió: Alvaro Herrera alvhe...@2ndquadrant.com writes: Well, I don't necessarily suggest that. But how about something like this in performMultipleDeletions: [edited snippet of code] /* invoke sql_drop triggers */ EventTriggerSQLDrop();

[HACKERS] Re: [ADMIN] Facing authentication error on postgres 9.2 - dblink functions

2013-02-06 Thread Albe Laurenz
Dev Kumkar wrote: I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows: SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test') ERROR: could not establish connection

Re: [HACKERS] Facing authentication error on postgres 9.2 - dblink functions

2013-02-06 Thread Andrew Dunstan
On 02/06/2013 08:09 AM, Dev Kumkar wrote: Hello Everyone, I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows: /SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')/ *ERROR*:

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: Hmm, quoth http://www.postgresql.org/message-id/23345.1358476...@sss.pgh.pa.us : I'd really like to get to a point where we can define things as happening like this: * collect information needed to interpret the DDL command

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Robert Haas
On Tue, Feb 5, 2013 at 10:42 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: A larger issue with the patch is handling of subxacts. A quick test doesn't reveal any obvious misbehavior, but having the list of objects dropped by a global variable might be problematic. What if, say, the

Re: [HACKERS] palloc unification

2013-02-06 Thread Robert Haas
On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: There was some discussion about unifying backend and frontend code/headers for palloc et al, particularly so that programs that want to mix both can be easily compiled; see

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: variable, it seems like there are a number of ways this can go wrong. Yeah, I think the current behavior might be surprising. I have not tested the actual behavior of the latest patch, but I think we want to define things so that the

Re: [HACKERS] palloc unification

2013-02-06 Thread Alvaro Herrera
Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory src/include/shared, and two header files: The frontend (pg_malloc) function definitions would live somewhere in, say, src/shared/fe_memutils.c.

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 9:36 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: variable, it seems like there are a number of ways this can go wrong. Yeah, I think the current behavior might be surprising. I have not tested the actual behavior of the

Re: [HACKERS] palloc unification

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 9:38 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory src/include/shared, and two header files: The frontend (pg_malloc)

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Alvaro Herrera
Dimitri Fontaine escribió: Robert Haas robertmh...@gmail.com writes: I have not tested the actual behavior of the latest patch, but I think we want to define things so that the pg_event_trigger_dropped_objects() function returns, specifically, the list of objects dropped by the command

Re: [HACKERS] get_progname() should not be const char *?

2013-02-06 Thread Robert Haas
On Tue, Feb 5, 2013 at 12:18 AM, Phil Sorber p...@omniti.com wrote: On Mon, Feb 4, 2013 at 10:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Phil Sorber p...@omniti.com writes: get_progname() returns a strdup()'d value. Shouldn't it then be simply char * and not const char *? Otherwise free()

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: I disagree with that. I don't see why the enclosing event trigger shouldn't be aware of all the objects dropped by the command that just ran to completion, *including* the effects of any event trigger fired recursively or not. Well, that could result

Re: [HACKERS] palloc unification

2013-02-06 Thread Simon Riggs
On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory src/include/shared, and two header files: The frontend (pg_malloc) function

Re: [HACKERS] palloc unification

2013-02-06 Thread Phil Sorber
On Wed, Feb 6, 2013 at 9:59 AM, Simon Riggs si...@2ndquadrant.com wrote: On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Mon, Feb 4, 2013 at 5:50 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I propose to have a new subdirectory

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-02-06 Thread Phil Sorber
On Tue, Feb 5, 2013 at 12:44 PM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 9:08 AM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 9:06 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Phil Sorber escribió: On Tue, Feb 5, 2013 at 6:41 AM, Robert Haas

Re: PATCH: Split stats file per database WAS: [HACKERS] autovacuum stress-testing our system

2013-02-06 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: Nice. Another interesting numbers would be device utilization, average I/O speed and required space (which should be ~2x the pgstat.stat size without the patch). this point is important - with large warehouse with lot of databases and tables you

Re: PATCH: Split stats file per database WAS: [HACKERS] autovacuum stress-testing our system

2013-02-06 Thread Alvaro Herrera
Tom Lane escribió: Pavel Stehule pavel.steh...@gmail.com writes: Nice. Another interesting numbers would be device utilization, average I/O speed and required space (which should be ~2x the pgstat.stat size without the patch). this point is important - with large warehouse with lot of

Re: PATCH: Split stats file per database WAS: [HACKERS] autovacuum stress-testing our system

2013-02-06 Thread Pavel Stehule
2013/2/6 Alvaro Herrera alvhe...@2ndquadrant.com: Tom Lane escribió: Pavel Stehule pavel.steh...@gmail.com writes: Nice. Another interesting numbers would be device utilization, average I/O speed and required space (which should be ~2x the pgstat.stat size without the patch). this point

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Alvaro Herrera alvhe...@2ndquadrant.com writes: I thought there was the idea that the list of objects to drop was to be acquired before actually doing the deletion; so that the trigger function could, for instance, get the name of the table being

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-02-06 Thread Fujii Masao
On Thu, Feb 7, 2013 at 12:05 AM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 12:44 PM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 9:08 AM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 9:06 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Phil

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-02-06 Thread Phil Sorber
On Wed, Feb 6, 2013 at 11:11 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Feb 7, 2013 at 12:05 AM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 12:44 PM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 9:08 AM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5,

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: I might be forgetting something, but doesn't dependency.c work by first constructing a list of all the objects it's going to drop, and only then dropping them? Could we inject a pre deletion event trigger call at the point where the list is completed? What

Re: [HACKERS] palloc unification

2013-02-06 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Yeah, I am doing this right now and the shared name doesn't seem so good. libpgframework sounds decent. So since libpgport comes from src/port, are we okay with src/framework

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Alvaro Herrera
Dimitri Fontaine escribió: Tom Lane t...@sss.pgh.pa.us writes: I might be forgetting something, but doesn't dependency.c work by first constructing a list of all the objects it's going to drop, and only then dropping them? Could we inject a pre deletion event trigger call at the point

Re: [HACKERS] get_progname() should not be const char *?

2013-02-06 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 5, 2013 at 12:18 AM, Phil Sorber p...@omniti.com wrote: On Mon, Feb 4, 2013 at 10:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't believe that callers should be trying to free() the result. Whether it's been strdup'd or not is not any of

Re: PATCH: Split stats file per database WAS: [HACKERS] autovacuum stress-testing our system

2013-02-06 Thread Tomas Vondra
Dne 06.02.2013 16:53, Alvaro Herrera napsal: Tom Lane escribió: Pavel Stehule pavel.steh...@gmail.com writes: Nice. Another interesting numbers would be device utilization, average I/O speed and required space (which should be ~2x the pgstat.stat size without the patch). this point is

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: Dimitri Fontaine escribió: Tom Lane t...@sss.pgh.pa.us writes: I might be forgetting something, but doesn't dependency.c work by first constructing a list of all the objects it's going to drop, and only then dropping them? Could we inject a

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Tom Lane t...@sss.pgh.pa.us writes: I might be forgetting something, but doesn't dependency.c work by first constructing a list of all the objects it's going to drop, and only then dropping them? Could we inject a pre deletion event trigger call

Re: [HACKERS] get_progname() should not be const char *?

2013-02-06 Thread Phil Sorber
On Wed, Feb 6, 2013 at 11:22 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Feb 5, 2013 at 12:18 AM, Phil Sorber p...@omniti.com wrote: On Mon, Feb 4, 2013 at 10:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't believe that callers should be trying to

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Well, a list of object OIDs is of exactly zero use once the command has been carried out. So I don't think that that represents a useful or even very testable feature on its own, if there's no provision to fire user code while the OIDs are still in the

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-02-06 Thread Fujii Masao
On Thu, Feb 7, 2013 at 1:15 AM, Phil Sorber p...@omniti.com wrote: On Wed, Feb 6, 2013 at 11:11 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Feb 7, 2013 at 12:05 AM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5, 2013 at 12:44 PM, Phil Sorber p...@omniti.com wrote: On Tue, Feb 5,

[HACKERS] Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.

2013-02-06 Thread Heikki Linnakangas
On 31.01.2013 21:33, Simon Riggs wrote: If anyone really wants me to revert, pls start new hackers thread to discuss, or comment on changes. Yes, I still think this needs fixing or reverting. Let me reiterate my my complaints: 1. I don't like the check in ReadCheckPointRecord() that the WAL

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-06 Thread Merlin Moncure
On Tue, Feb 5, 2013 at 11:29 AM, Seamus Abshere sea...@abshere.net wrote: hi, As reported in BUG #7715 [1], hstore's use of ? as an operator conflicts with JDBC's bind variables. I think we could just alias ? to ~ and tell JDBC users to use that instead. [2] This is not a bug with

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 9:44 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: I disagree with that. I don't see why the enclosing event trigger shouldn't be aware of all the objects dropped by the command that just ran to completion, *including* the

Re: [HACKERS] [PATCH] pg_isready (was: [WIP] pg_ping utility)

2013-02-06 Thread Phil Sorber
On Wed, Feb 6, 2013 at 11:36 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Feb 7, 2013 at 1:15 AM, Phil Sorber p...@omniti.com wrote: On Wed, Feb 6, 2013 at 11:11 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Feb 7, 2013 at 12:05 AM, Phil Sorber p...@omniti.com wrote: On Tue, Feb

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 11:04 AM, Tom Lane t...@sss.pgh.pa.us wrote: Dimitri Fontaine dimi...@2ndquadrant.fr writes: Alvaro Herrera alvhe...@2ndquadrant.com writes: I thought there was the idea that the list of objects to drop was to be acquired before actually doing the deletion; so that the

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Christopher Browne
On Wed, Feb 6, 2013 at 12:05 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 6, 2013 at 9:44 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: I disagree with that. I don't see why the enclosing event trigger shouldn't be aware of all the

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 11:30 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Dimitri Fontaine escribió: Tom Lane t...@sss.pgh.pa.us writes: I might be forgetting something, but doesn't dependency.c work by first constructing a list of all

Re: [HACKERS] sql_drop Event Trigger

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 12:28 PM, Christopher Browne cbbro...@gmail.com wrote: On Wed, Feb 6, 2013 at 12:05 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 6, 2013 at 9:44 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: I disagree with

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-06 Thread Merlin Moncure
On Wed, Feb 6, 2013 at 11:20 AM, Seamus Abshere sea...@abshere.net wrote: merlin, Yes, you're correct, my phrasing was bad: all I meant was that it was a conflict, not a bug in Postgres or hstore. I personally don't know of any way around the conflict except changing JDBC or hstore, and I

Re: [HACKERS] proposal: ANSI SQL 2011 syntax for named parameters

2013-02-06 Thread Robert Haas
On Mon, Feb 4, 2013 at 3:32 PM, Simon Riggs si...@2ndquadrant.com wrote: On 4 February 2013 19:53, Robert Haas robertmh...@gmail.com wrote: This seems pretty close to an accusation of bad faith, which I don't believe to be present. Robert, this is not an accusation of bad faith, just an

Re: [HACKERS] [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.

2013-02-06 Thread Simon Riggs
On 6 February 2013 16:36, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 31.01.2013 21:33, Simon Riggs wrote: If anyone really wants me to revert, pls start new hackers thread to discuss, or comment on changes. Yes, I still think this needs fixing or reverting. Let me reiterate my my

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-06 Thread Andrew Dunstan
On 02/06/2013 12:34 PM, Merlin Moncure wrote: The point is that Postgres should not introduce language constraints because of broken driver technology. +1 To move forward in your particular case, consider: *) switching to 'hstore defined()' function: good solution - but just use the

Re: [HACKERS] [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 12:43 PM, Simon Riggs si...@2ndquadrant.com wrote: 2. I don't like demoting the trigger file method to a second class citizen. I think we should make all functionality available through both methods. If there was a good reason for deprecating the trigger file method, I

Re: [HACKERS] proposal: ANSI SQL 2011 syntax for named parameters

2013-02-06 Thread Simon Riggs
On 6 February 2013 17:43, Robert Haas robertmh...@gmail.com wrote: On Mon, Feb 4, 2013 at 3:32 PM, Simon Riggs si...@2ndquadrant.com wrote: On 4 February 2013 19:53, Robert Haas robertmh...@gmail.com wrote: This seems pretty close to an accusation of bad faith, which I don't believe to be

Re: [HACKERS] [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.

2013-02-06 Thread Heikki Linnakangas
On 06.02.2013 20:02, Robert Haas wrote: On Wed, Feb 6, 2013 at 12:43 PM, Simon Riggssi...@2ndquadrant.com wrote: 2. I don't like demoting the trigger file method to a second class citizen. I think we should make all functionality available through both methods. If there was a good reason for

Re: [HACKERS] palloc unification

2013-02-06 Thread Alvaro Herrera
Tom Lane escribió: Simon Riggs si...@2ndquadrant.com writes: On 6 February 2013 14:38, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Yeah, I am doing this right now and the shared name doesn't seem so good. libpgframework sounds decent. So since libpgport comes from src/port, are we

[HACKERS] JSON NULLs

2013-02-06 Thread David E. Wheeler
Hackers, While playing with Andrew’s JSON enhancements, I noticed this: david=# select * From json_each_as_text('{baz: null}'::json); key | value -+--- baz | null It is returning 'null'::text there, not NULL::text. I had expected the latter, because otherwise it's

Re: [HACKERS] palloc unification

2013-02-06 Thread Andres Freund
On 2013-02-06 15:51:15 -0300, Alvaro Herrera wrote: Okay, here's an attempt at doing it that way. Notably this creates libpgcommon, a static library, to be used by both frontend and backend. There's only a frontend file now (fe_memutils.c); the backend side of it is empty. I verified that

Re: [HACKERS] JSON NULLs

2013-02-06 Thread Merlin Moncure
On Wed, Feb 6, 2013 at 1:08 PM, David E. Wheeler da...@justatheory.com wrote: Hackers, While playing with Andrew’s JSON enhancements, I noticed this: david=# select * From json_each_as_text('{baz: null}'::json); key | value -+--- baz | null It is returning

Re: [HACKERS] JSON NULLs

2013-02-06 Thread Andrew Dunstan
On 02/06/2013 02:24 PM, Merlin Moncure wrote: On Wed, Feb 6, 2013 at 1:08 PM, David E. Wheeler da...@justatheory.com wrote: Hackers, While playing with Andrew’s JSON enhancements, I noticed this: david=# select * From json_each_as_text('{baz: null}'::json); key | value

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-06 Thread Merlin Moncure
On Wed, Feb 6, 2013 at 12:00 PM, Andrew Dunstan and...@dunslane.net wrote: On 02/06/2013 12:34 PM, Merlin Moncure wrote: The point is that Postgres should not introduce language constraints because of broken driver technology. +1 To move forward in your particular case, consider: *)

Re: [HACKERS] [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 1:47 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 06.02.2013 20:02, Robert Haas wrote: On Wed, Feb 6, 2013 at 12:43 PM, Simon Riggssi...@2ndquadrant.com wrote: 2. I don't like demoting the trigger file method to a second class citizen. I think we should

Re: [HACKERS] proposal: ANSI SQL 2011 syntax for named parameters

2013-02-06 Thread Robert Haas
On Wed, Feb 6, 2013 at 1:06 PM, Simon Riggs si...@2ndquadrant.com wrote: On 6 February 2013 17:43, Robert Haas robertmh...@gmail.com wrote: On Mon, Feb 4, 2013 at 3:32 PM, Simon Riggs si...@2ndquadrant.com wrote: On 4 February 2013 19:53, Robert Haas robertmh...@gmail.com wrote: This seems

[HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Josh Berkus
Hackers, As an occasional CommitFest manager, I'm keenly aware of the makeshift nature of the CommitFest app. If we want to go on using it -- and if we want to attract additional reviewers -- we need to improve it substantially. What Robert built for us was supposed to be a second draft, not a

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Magnus Hagander
On Wed, Feb 6, 2013 at 10:07 PM, Josh Berkus j...@agliodbs.com wrote: Hackers, As an occasional CommitFest manager, I'm keenly aware of the makeshift nature of the CommitFest app. If we want to go on using it -- and if we want to attract additional reviewers -- we need to improve it

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Josh Berkus
This is probably not something we should discuss right now - it's better discussed when we're not right inthe middle of a commitfest, no? Well, *if* we were to change tooling, the time to do it would be during beta. Hence, bringing it up now. We have no ad-hoc PHP, but I'm assume you're

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Marko Tiikkaja
On 06/02/2013 22:25, Josh Berkus wrote: Mind you, when I explained our current CF review workflow for the SF ReviewFest last year, the attendees thought I was insane. It's kept me from doing more reviewfests. Our current workflow and tooling is definitely a serious obstacle to gettng more

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Feb 6, 2013 at 10:07 PM, Josh Berkus j...@agliodbs.com wrote: As an occasional CommitFest manager, I'm keenly aware of the makeshift nature of the CommitFest app. If we want to go on using it -- and if we want to attract additional reviewers

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Joshua D. Drake
On 02/06/2013 01:53 PM, Tom Lane wrote: ... if it's going to try to coerce us out of our email-centric habits, then I for one am very much against it. To me, the problems with the existing CF app are precisely that it's not well enough integrated with the email discussions. The way to fix

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Martijn van Oosterhout
On Wed, Feb 06, 2013 at 10:17:09PM +0100, Magnus Hagander wrote: I just took a quick look at their system, and when they start talking about requirements in the 100's of Gb of RAM, 24 core machines and SSD, I get scared :) But that's to scale it - doesn't mention when you need to do anything

Re: PATCH: Split stats file per database WAS: [HACKERS] autovacuum stress-testing our system

2013-02-06 Thread Jeff Janes
On Tue, Feb 5, 2013 at 2:31 PM, Tomas Vondra t...@fuzzy.cz wrote: On 5.2.2013 19:23, Jeff Janes wrote: If I shutdown the server and blow away the stats with rm data/pg_stat/*, it recovers gracefully when I start it back up. If a do rm -r data/pg_stat then it has problems the next time I shut

Re: PATCH: Split stats file per database WAS: [HACKERS] autovacuum stress-testing our system

2013-02-06 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: On Tue, Feb 5, 2013 at 2:31 PM, Tomas Vondra t...@fuzzy.cz wrote: U, what you mean by catalog bump? There is a catalog number in src/include/catalog/catversion.h, which when changed forces one to redo initdb. Formally I guess it is only for system

Re: [HACKERS] issues with range types, btree_gist and constraints

2013-02-06 Thread Tom Lane
I wrote: Tomas Vondra t...@fuzzy.cz writes: I've managed to further simplify the test-case, and I've verified that it's reproducible on current 9.2 and 9.3 branches. It seems that (1) gistfindgroup decides that SimpleTestString is equiv to something. It's not too clear what; for sure there

Re: PATCH: Split stats file per database WAS: [HACKERS] autovacuum stress-testing our system

2013-02-06 Thread Tomas Vondra
On 7.2.2013 00:40, Tom Lane wrote: Jeff Janes jeff.ja...@gmail.com writes: On Tue, Feb 5, 2013 at 2:31 PM, Tomas Vondra t...@fuzzy.cz wrote: U, what you mean by catalog bump? There is a catalog number in src/include/catalog/catversion.h, which when changed forces one to redo initdb.

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-06 Thread Seamus Abshere
tl;dr Scala/JRuby/Clojure (any JVM-based language) + Postgres + hstore = awesome... why not just add a few lines to hstore--1.2.sql and make sure that all operators are available and indexable? hi Andrew, hi merlin, use the existing exist() function EXIST() can't use hstore's GiST or GIN

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-06 Thread Alexander Korotkov
On Wed, Feb 6, 2013 at 11:42 PM, Merlin Moncure mmonc...@gmail.com wrote: *) hacking pg_operator (carefully look up and change oprname for the specific hstore operator) bad solution. Why not just provide an additional operator? CREATE OPERATOR ~ ( LEFTARG = hstore,

[HACKERS] Vacuum/visibility is busted

2013-02-06 Thread Jeff Janes
While stress testing Pavan's 2nd pass vacuum visibility patch, I realized that vacuum/visibility was busted. But it wasn't his patch that busted it. As far as I can tell, the bad commit was in the range 692079e5dcb331..168d3157032879 Since a run takes 12 to 24 hours, it will take a while to

Re: [HACKERS] Vacuum/visibility is busted

2013-02-06 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: While stress testing Pavan's 2nd pass vacuum visibility patch, I realized that vacuum/visibility was busted. But it wasn't his patch that busted it. As far as I can tell, the bad commit was in the range 692079e5dcb331..168d3157032879 Since a run

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Daniel Farina
On Wed, Feb 6, 2013 at 3:00 PM, Joshua D. Drake j...@commandprompt.com wrote: On 02/06/2013 01:53 PM, Tom Lane wrote: ... if it's going to try to coerce us out of our email-centric habits, then I for one am very much against it. To me, the problems with the existing CF app are precisely

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Brendan Jurd
On 7 February 2013 08:07, Josh Berkus j...@agliodbs.com wrote: The existing Gerrit community would be keen to have the PostgreSQL project as a major user, though, and would theoretically help with modification needs. Current major users are OpenStack, Mediawiki, LibreOffice and QT. Do we

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Andres Freund
On 2013-02-06 13:25:31 -0800, Josh Berkus wrote: Mind you, when I explained our current CF review workflow for the SF ReviewFest last year, the attendees thought I was insane. It's kept me from doing more reviewfests. Our current workflow and tooling is definitely a serious obstacle to gettng

Re: [HACKERS] Considering Gerrit for CFs

2013-02-06 Thread Pavel Stehule
2013/2/7 Andres Freund and...@2ndquadrant.com: On 2013-02-06 13:25:31 -0800, Josh Berkus wrote: Mind you, when I explained our current CF review workflow for the SF ReviewFest last year, the attendees thought I was insane. It's kept me from doing more reviewfests. Our current workflow and

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-02-06 Thread Andres Freund
Hi Michael, On 2013-02-07 16:45:57 +0900, Michael Paquier wrote: Please find attached a patch fixing 3 of the 4 problems reported before (the patch does not contain docs). Cool! 1) Removal of the quadratic dependency with list_append_unique_oid 2) Minimization of the wait phase for parent