[HACKERS] triggers and inheritance tree

2012-03-28 Thread Jaime Casanova
Hi, i was trying to create triggers that redirect INSERT/UPDATE/DELETE actions from parent to childs, but found that UPDATE/DELETE doesn't get redirected. Actually, the triggers BEFORE UPDATE and BEFORE DELETE aren't even fired. I haven't tried with AFTER triggers to see if they are fired but i

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-28 Thread Thom Brown
2012/3/28 Shigeru HANADA shigeru.han...@gmail.com: (2012/03/27 20:32), Thom Brown wrote: 2012/3/26 Shigeru HANADAshigeru.han...@gmail.com: * pgsql_fdw_v17.patch     - Adds pgsql_fdw as contrib module * pgsql_fdw_pushdown_v10.patch     - Adds WHERE push down capability to pgsql_fdw *

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-28 Thread Thom Brown
On 28 March 2012 08:13, Thom Brown t...@linux.com wrote: 2012/3/28 Shigeru HANADA shigeru.han...@gmail.com: (2012/03/27 20:32), Thom Brown wrote: 2012/3/26 Shigeru HANADAshigeru.han...@gmail.com: * pgsql_fdw_v17.patch     - Adds pgsql_fdw as contrib module * pgsql_fdw_pushdown_v10.patch    

Re: [HACKERS] Command Triggers patch v18

2012-03-28 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: I think BEFORE command triggers ideally should run * before permission checks * before locking * before internal checks are done (nameing conflicts, type checks and such) It is possible to do this, and it would actually be much easier and less

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Peter Geoghegan
[ also for the archives' sake ] On 27 March 2012 22:05, Tom Lane t...@sss.pgh.pa.us wrote: Well, testing function pointers for null is certainly OK --- note that all our hook function call sites do that.  It's true that testing for equality to a particular function's name can fail on some

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-28 Thread Heikki Linnakangas
Ok, seems that the API issue is settled, so I'm now looking at the code actually doing the checking. My first impression is that this is a lot of code. Can we simplify it? Since this is deeply integrated into the PL/pgSQL interpreter, I was expecting that this would run through the normal

[HACKERS] Feature proposal: list role members in psql

2012-03-28 Thread Anssi Kääriäinen
It seems there is no way to get role members using psql. \du and \dg give you this role is a member of information, but no information about who have been granted the role. I would like to write a patch implementing this feature. Some questions: - Is this wanted? - Should there be a new

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-28 Thread Thom Brown
On 28 March 2012 08:39, Thom Brown t...@linux.com wrote: On 28 March 2012 08:13, Thom Brown t...@linux.com wrote: 2012/3/28 Shigeru HANADA shigeru.han...@gmail.com: (2012/03/27 20:32), Thom Brown wrote: 2012/3/26 Shigeru HANADAshigeru.han...@gmail.com: * pgsql_fdw_v17.patch     - Adds

Re: [HACKERS] Command Triggers patch v18

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 4:12 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: I think BEFORE command triggers ideally should run * before permission checks * before locking * before internal checks are done (nameing conflicts, type checks and such)

Re: [HACKERS] Command Triggers patch v18

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 7:16 AM, Robert Haas robertmh...@gmail.com wrote: Now I can see why implementing that on top of the ANY command feature is surprising enough for wanting to not do it this way. Maybe the answer is to use another keyword to be able to register command triggers that run

[HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Robert Haas
On Tue, Mar 27, 2012 at 10:10 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Mar 28, 2012 at 5:17 AM, Robert Haas rh...@postgresql.org wrote: pg_test_timing utility, to measure clock monotonicity and timing cost. When I compiled this, I got a compiler warning. Attached patch silences

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-28 Thread Shigeru HANADA
(2012/03/28 16:18), Albe Laurenz wrote: I wrote: How about getting # of rows estimate by executing EXPLAIN for fully-fledged remote query (IOW, contains pushed-down WHERE clause), and estimate selectivity of local filter on the basis of the statistics which are generated by FDW via

Re: [HACKERS] PATCH: pg_basebackup (missing exit on error)

2012-03-28 Thread Robert Haas
On Tue, Mar 27, 2012 at 7:13 AM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch removes the fflush() part, changes the log message and removes the check of tarfile, as above. With this patch applied, we end up with: if (strcmp(basedir, -) == 0) { #ifdef

Re: [HACKERS] Improvement of log messages in pg_basebackup

2012-03-28 Thread Robert Haas
On Tue, Mar 27, 2012 at 5:25 AM, Fujii Masao masao.fu...@gmail.com wrote:       fprintf(stderr, _(%s: could not identify system: %s\n),                       progname, PQerrorMessage(conn)); Since PQerrorMessage() result includes a trailing newline, the above log message in pg_basebackup

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Marko Kreen
On Wed, Mar 28, 2012 at 08:19:37AM -0400, Robert Haas wrote: On Tue, Mar 27, 2012 at 10:10 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Mar 28, 2012 at 5:17 AM, Robert Haas rh...@postgresql.org wrote: pg_test_timing utility, to measure clock monotonicity and timing cost. When I

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Marko Kreen
On Wed, Mar 28, 2012 at 03:46:26PM +0300, Marko Kreen wrote: On Wed, Mar 28, 2012 at 08:19:37AM -0400, Robert Haas wrote: On Tue, Mar 27, 2012 at 10:10 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Mar 28, 2012 at 5:17 AM, Robert Haas rh...@postgresql.org wrote: pg_test_timing

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 8:51 AM, Marko Kreen mark...@gmail.com wrote: How about:  .. %10 INT64_FORMAT .. ? Well, it won't work because unlike inttypes.h, Postgres *_FORMAT includes '%' in it. I guess that why inttypes.h does not do it... Hmm, I guess we could change that, but it would

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-03-28 Thread Shigeru HANADA
(2012/03/28 21:07), Albe Laurenz wrote: I found another limitation of this approach: pgsql_fdw_analyze() has to run as a user who can update pg_statistic, and this user needs a user mapping to a remote user who can read pg_statistic. This is not necessary for normal operation and needs to

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Marko Kreen
On Wed, Mar 28, 2012 at 08:57:42AM -0400, Robert Haas wrote: On Wed, Mar 28, 2012 at 8:51 AM, Marko Kreen mark...@gmail.com wrote: How about:  .. %10 INT64_FORMAT .. ? Well, it won't work because unlike inttypes.h, Postgres *_FORMAT includes '%' in it. I guess that why inttypes.h

Re: [HACKERS] triggers and inheritance tree

2012-03-28 Thread Jaime Casanova
On Wed, Mar 28, 2012 at 1:21 AM, Jaime Casanova ja...@2ndquadrant.com wrote: Hi, i was trying to create triggers that redirect INSERT/UPDATE/DELETE actions from parent to childs, but found that UPDATE/DELETE doesn't get redirected. Actually, the triggers BEFORE UPDATE and BEFORE DELETE

Re: [HACKERS] triggers and inheritance tree

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 9:16 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Wed, Mar 28, 2012 at 1:21 AM, Jaime Casanova ja...@2ndquadrant.com wrote: Hi, i was trying to create triggers that redirect INSERT/UPDATE/DELETE actions from parent to childs, but found that UPDATE/DELETE doesn't

Re: [HACKERS] 9.2 commitfest closure (was Command Triggers, v16)

2012-03-28 Thread Robert Haas
On Tue, Mar 27, 2012 at 1:36 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Mar 26, 2012 at 7:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fine. What do you propose, specifically? The end of the month is coming up.  How about we propose to close the 'fest on April 1st?  Anything that's not

Re: [HACKERS] Review of pg_archivecleanup -x option patch

2012-03-28 Thread Robert Haas
On Sun, Mar 11, 2012 at 9:28 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Mar 10, 2012 at 2:38 PM, Jaime Casanova ja...@2ndquadrant.com wrote: On Fri, Mar 9, 2012 at 9:07 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 9, 2012 at 12:47 AM, Jaime Casanova ja...@2ndquadrant.com

Re: [HACKERS] archive_keepalive_command

2012-03-28 Thread Robert Haas
On Mon, Mar 5, 2012 at 11:55 AM, Simon Riggs si...@2ndquadrant.com wrote: On Sun, Mar 4, 2012 at 1:20 AM, Jeff Janes jeff.ja...@gmail.com wrote: Does this patch have any user-visible effect?  I thought it would make pg_last_xact_replay_timestamp() advance, but it does not seem to.  I looked

Re: [HACKERS] Should I implement DROP INDEX CONCURRENTLY?

2012-03-28 Thread Robert Haas
On Fri, Feb 3, 2012 at 10:28 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 1, 2012 at 2:39 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Feb 1, 2012 at 7:31 PM, Peter Eisentraut pete...@gmx.net wrote: On sön, 2012-01-29 at 22:01 +, Simon Riggs wrote: Patch now locks index

Re: [HACKERS] PL/pgSQL return value in after triggers

2012-03-28 Thread Robert Haas
On Sun, Jan 1, 2012 at 11:37 PM, Peter Eisentraut pete...@gmx.net wrote: One thing that I'm concerned about with this is that it treats a plain RETURN in a BEFORE trigger as RETURN NULL, whereas arguably it should be an error.  I haven't found a good way to handle that yet, but I'll keep

Re: [HACKERS] 9.2 commitfest closure (was Command Triggers, v16)

2012-03-28 Thread Simon Riggs
On Wed, Mar 28, 2012 at 2:45 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 27, 2012 at 1:36 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Mar 26, 2012 at 7:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fine. What do you propose, specifically? The end of the month is coming up.  

Re: [HACKERS] Cross-backend signals and administration (Was: Re: pg_terminate_backend for same-role)

2012-03-28 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Andres Freund and...@anarazel.de wrote: On Tuesday, March 27, 2012 07:51:59 PM Kevin Grittner wrote: As Tom pointed out, if there's another person sharing the user ID you're using, and you don't trust them, their ability to cancel your

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Peter Geoghegan
On 27 March 2012 20:26, Tom Lane t...@sss.pgh.pa.us wrote:  Have yet to look at the pg_stat_statements code itself. I merged upstream changes with the intention of providing a new patch for you to review. I found a problem that I'd guess was introduced by commit

Re: [HACKERS] [PATCH] Lazy hashaggregate when no aggregation is needed

2012-03-28 Thread Tom Lane
Ants Aasma a...@cybertec.at writes: A user complained on pgsql-performance that SELECT col FROM table GROUP BY col LIMIT 2; performs a full table scan. ISTM that it's safe to return tuples from hash-aggregate as they are found when no aggregate functions are in use. Attached is a first shot at

Re: [HACKERS] 9.2 commitfest closure (was Command Triggers, v16)

2012-03-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Mar 27, 2012 at 1:36 PM, Robert Haas robertmh...@gmail.com wrote: Let's split the difference: how about we close it a week from this Friday. That would be April 6, 2012, ten days from today. Anybody, anybody? Can we try to get some agreement

Re: [HACKERS] Cross-backend signals and administration (Was: Re: pg_terminate_backend for same-role)

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 10:02 AM, Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Andres Freund and...@anarazel.de wrote: On Tuesday, March 27, 2012 07:51:59 PM Kevin Grittner wrote: As Tom pointed out, if there's another person sharing the user ID you're

Re: [HACKERS] Publish checkpoint timing and sync files summary data to pg_stat_bgwriter

2012-03-28 Thread Robert Haas
On Thu, Mar 22, 2012 at 6:07 PM, Peter Geoghegan pe...@2ndquadrant.com wrote: On 23 January 2012 02:08, Robert Haas robertmh...@gmail.com wrote: On Sat, Jan 21, 2012 at 6:32 PM, Jeff Janes jeff.ja...@gmail.com wrote: I'm finding the backend_writes column pretty unfortunate.  The only use I

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2012-03-28 Thread Marco Nenciarini
Il giorno lun, 19/03/2012 alle 18.41 +0100, Marco Nenciarini ha scritto: Attached is v5, which should address all the remaining issues. Please find attached v6 of the EACH Foreign Key patch. From v5 only cosmetic changes to the documentation were made. Regards, Marco -- Marco Nenciarini -

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Tom Lane
Peter Geoghegan pe...@2ndquadrant.com writes: I merged upstream changes with the intention of providing a new patch for you to review. I found a problem that I'd guess was introduced by commit 9dbf2b7d75de5af38d087cbe2b1147dd0fd10f0a, Restructure SELECT INTO's parsetree representation into

Re: [HACKERS] Cross-backend signals and administration (Was: Re: pg_terminate_backend for same-role)

2012-03-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I'm coming around to the point of view that we should just make pg_terminate_backend()'s behavior consistent with pg_cancel_backend() and call it good. Yeah, the issues that are really of concern are not ones that that function in itself can address.

[HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Fujii Masao
On Wed, Mar 28, 2012 at 9:19 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 27, 2012 at 10:10 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Mar 28, 2012 at 5:17 AM, Robert Haas rh...@postgresql.org wrote: pg_test_timing utility, to measure clock monotonicity and timing cost.

Re: [HACKERS] 9.2 commitfest closure (was Command Triggers, v16)

2012-03-28 Thread Noah Misch
On Wed, Mar 28, 2012 at 09:45:29AM -0400, Robert Haas wrote: On Tue, Mar 27, 2012 at 1:36 PM, Robert Haas robertmh...@gmail.com wrote: Let's split the difference: how about we close it a week from this Friday. ?That would be April 6, 2012, ten days from today. Anybody, anybody? Can we try

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Peter Geoghegan
On 28 March 2012 15:25, Tom Lane t...@sss.pgh.pa.us wrote: That's been an issue right along for cases such as EXPLAIN and EXECUTE, I believe. Possible, since I didn't have test coverage for either of those 2 commands.  Perhaps the right thing is to consider such executor calls as nested

Re: [HACKERS] triggers and inheritance tree

2012-03-28 Thread Jaime Casanova
On Wed, Mar 28, 2012 at 8:29 AM, Robert Haas robertmh...@gmail.com wrote: I think the problem is that the UPDATE or DELETE can only fire once a matching row has been identified, so that OLD can be filled in appropriately.  But in this case, the matching row gets found not in the parent table,

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Tom Lane
A couple other issues about this patch ... Is there any actual benefit in providing the pg_stat_statements.string_key GUC? It looks to me more like something that was thrown in because it was easy than because anybody would want it. I'd just as soon leave it out and avoid the incremental API

Re: [HACKERS] Finer Extension dependencies

2012-03-28 Thread Robert Haas
On Thu, Mar 22, 2012 at 2:08 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Alvaro Herrera alvhe...@commandprompt.com writes: get_available_versions_for_extension seems to contain a bunch of commented-out lines ... Damn. Sorry about that.  Here's a cleaned-up version of the patch. I'm

Re: [HACKERS] triggers and inheritance tree

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 10:46 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Wed, Mar 28, 2012 at 8:29 AM, Robert Haas robertmh...@gmail.com wrote: I think the problem is that the UPDATE or DELETE can only fire once a matching row has been identified, so that OLD can be filled in

Re: [HACKERS] PATCH: pg_basebackup (missing exit on error)

2012-03-28 Thread Fujii Masao
On Wed, Mar 28, 2012 at 9:40 PM, Robert Haas robertmh...@gmail.com wrote: I think it would make sense to rearrange that so that we don't have two tests for ztarfile != NULL; do that test first, and then if it fails, do the strcmp after that. Makes sense. Also, if we're going to test the

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: This seems a simplest workaround. How about attached patch? I think you need to tweak that to get the number to be right-justified not left-justified. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Finer Extension dependencies

2012-03-28 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: I'm not completely convinced that the case has been made that this is a useful thing to have. You're basically saying that the current lack of extension distribution is a good reason for not building the tools allowing to create said distribution. WTF?

Re: [HACKERS] Finer Extension dependencies

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 11:28 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: In practice, however, that sounds like a real pain in the neck.  I would expect most people who were packaging extensions to handle a situation like this by forcing the user to provide the name of the function to

Re: [HACKERS] Feature proposal: list role members in psql

2012-03-28 Thread David Fetter
On Wed, Mar 28, 2012 at 01:55:06PM +0300, Anssi Kääriäinen wrote: It seems there is no way to get role members using psql. \du and \dg give you this role is a member of information, but no information about who have been granted the role. I would like to write a patch implementing this

Re: [HACKERS] Finer Extension dependencies

2012-03-28 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: accomplish. Instead, you're just concerned about allowing some but not all versions of package A to provide feature F, so that other extensions can depend on F to get the specific version of A that they need (and not, as I had assumed, so that they

[HACKERS] max_files_per_process ignored on Windows

2012-03-28 Thread Heikki Linnakangas
At postmaster startup, we determine the maximum number of open files we can handle by trying to open a lot of file descriptors, up to max_files_per_process. This is done in set_max_safe_fds(), and the determined max_safe_fds value is inherited by child processes at fork(). However, with

Re: [HACKERS] Review of pg_archivecleanup -x option patch

2012-03-28 Thread Jaime Casanova
On Wed, Mar 28, 2012 at 8:47 AM, Robert Haas robertmh...@gmail.com wrote: $ ./pg_archivecleanup -x bz2 /tmp 000100010058 Hmm, but I thought that the idea was that the extension was optional. Perhaps I'm missing something but I don't think the previous patch will complain about

Re: [HACKERS] max_files_per_process ignored on Windows

2012-03-28 Thread Magnus Hagander
On Wed, Mar 28, 2012 at 18:12, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: At postmaster startup, we determine the maximum number of open files we can handle by trying to open a lot of file descriptors, up to max_files_per_process. This is done in set_max_safe_fds(), and the

Re: [HACKERS] Finer Extension dependencies

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 12:11 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: On a more prosaic note, you seem to have made a mistake when generating the v5 diff.  It includes reverts of a couple of unrelated, recent patches. Ouch. It seems to happen to me too often. I probably need to get

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Peter Geoghegan
On 28 March 2012 15:57, Tom Lane t...@sss.pgh.pa.us wrote: Is there any actual benefit in providing the pg_stat_statements.string_key GUC? It looks to me more like something that was thrown in because it was easy than because anybody would want it. I'd just as soon leave it out and avoid the

Re: [HACKERS] [COMMITTERS] pgsql: Remove dead assignment

2012-03-28 Thread Peter Eisentraut
On mån, 2012-03-26 at 15:53 -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On mån, 2012-03-26 at 15:15 -0400, Tom Lane wrote: I also do not think it does anything for readability for this call of read_info() to be unexpectedly unlike all the others. I do not think that

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Robert Haas
On Sun, Mar 25, 2012 at 10:50 PM, Joachim Wieland j...@mcknight.de wrote: On Fri, Mar 23, 2012 at 11:11 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Are you going to provide a rebased version? Rebased version attached, this patch also includes Robert's earlier suggestions. I keep

[HACKERS] pgxs and bison, flex

2012-03-28 Thread Peter Eisentraut
There are some extensions that build with pgxs that use bison and flex. Their makefiles are set up to use the variables BISON and FLEX that pgxs provides. Except that that depends on how PostgreSQL was built. A binary package that was built in a clean chroot would probably not have those

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié mar 28 14:46:30 -0300 2012: I keep hoping someone who knows Windows is going to take a look at this, but so far no luck. It could also really use some attention from someone who has an actual really big database handy, to see how successful it is

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 2:20 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié mar 28 14:46:30 -0300 2012: I keep hoping someone who knows Windows is going to take a look at this, but so far no luck.  It could also really use some attention from

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Andrew Dunstan
On 03/28/2012 02:27 PM, Robert Haas wrote: On Wed, Mar 28, 2012 at 2:20 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié mar 28 14:46:30 -0300 2012: I keep hoping someone who knows Windows is going to take a look at this, but so far no luck.

Re: [HACKERS] Command Triggers patch v18

2012-03-28 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Further thought: I think maybe we shouldn't use keywords at all for this, and instead use descriptive strings like post-parse or pre-execution or command-start, because I bet in the end we're going to end up with a bunch of them

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Marko Kreen
On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata - OK txid_current_snapshot() - OK Standby pg_controldata - OK txid_current_snapshot() - lower value On Skytools list is report about master with slaves, but the lower value appears on master too:

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-28 Thread Pavel Stehule
Hello 2012/3/28 Heikki Linnakangas heikki.linnakan...@enterprisedb.com: Ok, seems that the API issue is settled, so I'm now looking at the code actually doing the checking. My first impression is that this is a lot of code. Can we simplify it? I am afraid so there are not a big space for

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Andrew Dunstan
On 03/28/2012 03:17 PM, Andrew Dunstan wrote: On 03/28/2012 02:27 PM, Robert Haas wrote: On Wed, Mar 28, 2012 at 2:20 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié mar 28 14:46:30 -0300 2012: I keep hoping someone who knows Windows is

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Simon Riggs
On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen mark...@gmail.com wrote: On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata - OK txid_current_snapshot() - OK Standby pg_controldata - OK txid_current_snapshot() - lower value On Skytools list is report about master

Re: [HACKERS] Finer Extension dependencies

2012-03-28 Thread Robert Haas
On Wed, Mar 28, 2012 at 3:09 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Could you possibly generate a new diff to save me the trouble of fixing the one you sent before? Please find it attached, it looks better now, and I rebased it against

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-03-28 Thread Simon Riggs
On Wed, Mar 28, 2012 at 10:24 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Mar 28, 2012 at 9:48 PM, Marko Kreen mark...@gmail.com wrote: On Fri, Mar 23, 2012 at 08:52:40AM +, Simon Riggs wrote: Master pg_controldata - OK txid_current_snapshot() - OK Standby pg_controldata - OK

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Tom Lane
Peter Geoghegan pe...@2ndquadrant.com writes: On 28 March 2012 15:57, Tom Lane t...@sss.pgh.pa.us wrote: Is there any actual benefit in providing the pg_stat_statements.string_key GUC? It looks to me more like something that was thrown in because it was easy than because anybody would want

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Peter Geoghegan
On 29 March 2012 00:14, Tom Lane t...@sss.pgh.pa.us wrote: I'm planning to commit the patch with a USAGE_NON_EXEC_STICK value of 3.0, which is the largest value that stays below 10% wastage. We can twiddle that logic later, so if you want to experiment with an alternate decay rule, feel free.

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Joachim Wieland
On Wed, Mar 28, 2012 at 5:19 PM, Andrew Dunstan and...@dunslane.net wrote: First hurdle: It doesn't build under Windows/mingw-w64:   parallel.c:40:12: error: static declaration of 'pgpipe' follows   non-static declaration Strange, I'm not seeing this but I'm building with VC2005. What happens

Re: [HACKERS] ECPG FETCH readahead

2012-03-28 Thread Noah Misch
On Sat, Mar 24, 2012 at 10:49:07AM +0100, Boszormenyi Zoltan wrote: Sorry for the delay, I had been busy with other tasks and I rewrote this code to better cope with unknown result size, scrollable cursors and negative cursor positions. I think all points raised by Noah is addressed:

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Andrew Dunstan
On 03/28/2012 08:28 PM, Joachim Wieland wrote: On Wed, Mar 28, 2012 at 5:19 PM, Andrew Dunstanand...@dunslane.net wrote: First hurdle: It doesn't build under Windows/mingw-w64: parallel.c:40:12: error: static declaration of 'pgpipe' follows non-static declaration Strange, I'm not

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Tom Lane
Peter Geoghegan pe...@2ndquadrant.com writes: doc-patch is attached. I'm not sure if I got the balance right - it may be on the verbose side. Thanks. I've committed the patch along with the docs, after rather heavy editorialization. There remain some loose ends that should be worked on but

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Joachim Wieland
On Thu, Mar 29, 2012 at 2:46 AM, Andrew Dunstan and...@dunslane.net wrote: But your patch hasn't got rid of them, and so it's declared twice. There is no pgpipe.h, BTW, it's declared in port.h. If VC2005 doesn't complain about the double declaration then that's a bug in the compiler, IMNSHO.

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Joachim Wieland
On Wed, Mar 28, 2012 at 1:46 PM, Robert Haas robertmh...@gmail.com wrote: I'm wondering if we really need this much complexity around shutting down workers.  I'm not sure I understand why we need both a hard and a soft method of shutting them down.  At least on non-Windows systems, it seems

Re: [HACKERS] max_files_per_process ignored on Windows

2012-03-28 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Mar 28, 2012 at 18:12, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: An obvious fix would be to call set_max_safe_fds() in the child processes, although I wonder if that's too expensive. Another option is to pass down the

Re: [HACKERS] pgxs and bison, flex

2012-03-28 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: There are some extensions that build with pgxs that use bison and flex. Their makefiles are set up to use the variables BISON and FLEX that pgxs provides. Except that that depends on how PostgreSQL was built. A binary package that was built in a clean

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Fujii Masao
On Thu, Mar 29, 2012 at 12:15 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: This seems a simplest workaround. How about attached patch? I think you need to tweak that to get the number to be right-justified not left-justified. Unless I'm missing something,

Re: [HACKERS] Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)

2012-03-28 Thread Tom Lane
BTW, I forgot to mention that I did experiment with your python-based test script for pg_stat_statements, but decided not to commit it. There are just too many external dependencies for my taste: 1. python 2. psycopg2 3. dellstore2 test database That coupled with the apparent impossibility of

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

2012-03-28 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: On Thu, Mar 29, 2012 at 12:15 AM, Tom Lane t...@sss.pgh.pa.us wrote: I think you need to tweak that to get the number to be right-justified not left-justified. Unless I'm missing something, I did that because the patch uses %10s not %-10s. No? Oh,

Re: [HACKERS] patch for parallel pg_dump

2012-03-28 Thread Andrew Dunstan
On 03/28/2012 09:12 PM, Joachim Wieland wrote: On Thu, Mar 29, 2012 at 2:46 AM, Andrew Dunstanand...@dunslane.net wrote: But your patch hasn't got rid of them, and so it's declared twice. There is no pgpipe.h, BTW, it's declared in port.h. If VC2005 doesn't complain about the double

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-03-28 Thread Fujii Masao
On Tue, Feb 28, 2012 at 6:08 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Feb 8, 2012 at 1:33 AM, Magnus Hagander mag...@hagander.net wrote: Will it break using pg_basebackup 9.2 on a 9.1 server, though? that would also be very useful in the scenario of the central server... No unless