Re: [HACKERS] Re: logical changeset generation v3 - comparison to Postgres-R change set format

2013-01-14 Thread Hannu Krosing
On 01/13/2013 08:06 PM, Dimitri Fontaine wrote: Hannu Krosing ha...@2ndquadrant.com writes: Does this hint that postgreSQL also needs an sameness operator ( is or === in same languages). How do people feel about adding a real sameness operator ? Well. I would prefer it if we can bypass the

Re: [HACKERS] Re: logical changeset generation v3 - comparison to Postgres-R change set format

2013-01-14 Thread Markus Wanner
On 01/13/2013 09:04 PM, Hannu Krosing wrote: I'd just start with what send() and recv() on each type produces now using GCC on 64bit Intel and move towards adjusting others to match. For a period anything else would still be allowed, but be non-standard Intel being little endian seems like a

[HACKERS] Thinking about WITH CHECK OPTION for views

2013-01-14 Thread Dean Rasheed
I've been thinking about WITH CHECK OPTION for auto-updatable views. Given the timing I doubt if this will be ready for 9.3, since I only get occasional evenings and weekends to hack on postgres, but I think it's probably worth kicking off a discussion, starting with a description of what the

Re: [HACKERS] pg_retainxlog for inclusion in 9.3?

2013-01-14 Thread Magnus Hagander
On Sat, Jan 5, 2013 at 3:11 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Jan 4, 2013 at 7:13 PM, Peter Eisentraut pete...@gmx.net wrote: On 1/3/13 12:30 PM, Robert Haas wrote: On Thu, Jan 3, 2013 at 11:32 AM, Magnus Hagander mag...@hagander.net wrote: Any particular reason? It goes

[HACKERS] common fe/be library (was Re: [PATCH] binary heap implementation)

2013-01-14 Thread Abhijit Menon-Sen
At 2012-11-15 12:08:12 -0500, robertmh...@gmail.com wrote: Still, maybe we could have a src/framework directory that uses the same trick to produce a libpgframework that frontend code can use, and a lib pgframework_srv that can be linked into the backend. That's might not actually be that

[HACKERS] pg_ctl idempotent option

2013-01-14 Thread Peter Eisentraut
Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. The previous discussion was at http://www.postgresql.org/message-id/1253165415.18853.32.ca...@vanquo.pezone.net. diff

[HACKERS] find libxml2 using pkg-config

2013-01-14 Thread Peter Eisentraut
In multi-arch OS installations, using a single foo-config script to find libraries is problematic, because you don't know which architecture it will point to, and you can't choose which one you want. Using pkg-config is better in that situation, because you can use its environment variables to

[HACKERS] passing diff options to pg_regress

2013-01-14 Thread Peter Eisentraut
I sometimes find it useful to view a regression test difference using other diff options, such as -u -w or more context. There is currently no easy way to accomplish that. I suggest allowing to override the diff options using an environment variable, such as PG_REGRESS_DIFF_OPTS. The patch is

Re: [HACKERS] Bug: Windows installer modifies ACLs on the whole volume

2013-01-14 Thread Sandeep Thakkar
Alex, how much of your D:\ is occupied or what is the total size of the files and folders in D:\ ? Can you just try the following command manually to see if it returns quick? icacls D:\ /grant UserName:RX On Fri, Jan 11, 2013 at 9:28 AM, Craig Ringer cr...@2ndquadrant.com wrote: On

Re: [HACKERS] passing diff options to pg_regress

2013-01-14 Thread Andres Freund
On 2013-01-14 06:57:52 -0500, Peter Eisentraut wrote: I sometimes find it useful to view a regression test difference using other diff options, such as -u -w or more context. There is currently no easy way to accomplish that. I suggest allowing to override the diff options using an

Re: [HACKERS] pgcrypto seeding problem when ssl=on

2013-01-14 Thread Marko Kreen
On Mon, Jan 14, 2013 at 12:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: Marko Kreen mark...@gmail.com writes: On Fri, Dec 21, 2012 at 10:27 PM, Noah Misch n...@leadboat.com wrote: How about instead calling RAND_cleanup() after each backend fork? Attached is a patch that adds RAND_cleanup() to

Re: [HACKERS] pgcrypto seeding problem when ssl=on

2013-01-14 Thread Noah Misch
On Mon, Jan 14, 2013 at 02:21:00PM +0200, Marko Kreen wrote: Note: reading from /dev/urandom does not affect /dev/random. Reading from /dev/urandom drains the pool that serves /dev/random: $ cat /proc/sys/kernel/random/entropy_avail 3596 $ dd iflag=nonblock bs=100 count=1 if=/dev/random

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-14 Thread Boszormenyi Zoltan
2013-01-14 07:47 keltezéssel, Amit kapila írta: On Sunday, January 13, 2013 2:45 PM Boszormenyi Zoltan wrote: 2013-01-13 05:49 keltezéssel, Amit kapila írta: On Sunday, January 13, 2013 12:41 AM Tom Lane wrote: Boszormenyi Zoltan z...@cybertec.at writes: No, I mean the reaper(SIGNAL_ARGS)

Re: [HACKERS] pgcrypto seeding problem when ssl=on

2013-01-14 Thread Marko Kreen
On Mon, Jan 14, 2013 at 3:00 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 14, 2013 at 02:21:00PM +0200, Marko Kreen wrote: Note: reading from /dev/urandom does not affect /dev/random. Reading from /dev/urandom drains the pool that serves /dev/random: $ cat

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: Attached is a patch to add a 'COMPRESSED' option to COPY which will cause COPY to expect a gzip'd file on input and which will output a gzip'd file on output. Included is support for backend COPY,

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Simon Riggs
On 14 January 2013 13:43, Stephen Frost sfr...@snowman.net wrote: Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: Attached is a patch to add a 'COMPRESSED' option to COPY which will cause COPY to expect a gzip'd file on input and which will output a

Re: [HACKERS] common fe/be library (was Re: [PATCH] binary heap implementation)

2013-01-14 Thread Merlin Moncure
On Mon, Jan 14, 2013 at 4:55 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: At 2012-11-15 12:08:12 -0500, robertmh...@gmail.com wrote: Still, maybe we could have a src/framework directory that uses the same trick to produce a libpgframework that frontend code can use, and a lib

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. Idempotent is a ten-dollar word. Can we find something that average

Re: [HACKERS] find libxml2 using pkg-config

2013-01-14 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: The attached patch looks for pkg-config first, and finds libxml2 using that if available. Otherwise it falls back to using xml2-config. What happens if pkg-config is installed but doesn't know anything about xml2? I'd expect the code to fall back to

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Alvaro Herrera
Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. Idempotent is a ten-dollar word. Can we find

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-14 Thread Alvaro Herrera
Tom Lane escribió: I will bet that this is more breakage from the DDL-code refactoring that has been going on. I am getting closer and closer to wanting that reverted. KaiGai-san seems to have been throwing out lots of special cases that were there for good reasons. I will have a look. --

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped.

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Thom Brown
On 14 January 2013 15:29, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Stephen Frost
* Simon Riggs (si...@2ndquadrant.com) wrote: There is a new option being added to pre/post process data, so it seems like the best way to add new features - in general. That structure appears to have no option for passing compressed data to or from a client connection. Instead, it actually

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-14 Thread Alvaro Herrera
Tom Lane escribió: Erik Rijkers e...@xs4all.nl writes: On Sun, January 13, 2013 22:09, Tom Lane wrote: BTW, although Erik claimed this behaved more sanely in 9.2, a closer look at the commit logs says that the bogus commit shipped in 9.2, so AFAICS it's broken there too. [ not so ]

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Claudio Freire
On Mon, Jan 14, 2013 at 1:01 PM, Stephen Frost sfr...@snowman.net wrote: I do like the idea of a generalized answer which just runs a user-provided command on the server but that's always going to require superuser privileges. Unless it's one of a set of superuser-authorized compression tools.

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-14 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane escribió: I will bet that this is more breakage from the DDL-code refactoring that has been going on. I am getting closer and closer to wanting that reverted. KaiGai-san seems to have been throwing out lots of special cases that were

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: I do like the idea of a generalized answer which just runs a user-provided command on the server but that's always going to require superuser privileges. The design that was being kicked around allowed pipes to be used on the client side too, ie \copy

Re: [HACKERS] Timing events WIP v1

2013-01-14 Thread Peter Geoghegan
I decided to take a look at this. On 15 November 2012 09:56, Greg Smith g...@2ndquadrant.com wrote: -I modeled the hook here on the logging one that went into 9.2. It's defined in its own include file and it gets initialized by the logging system. No strong justification for putting it

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Stephen Frost
* Claudio Freire (klaussfre...@gmail.com) wrote: On Mon, Jan 14, 2013 at 1:01 PM, Stephen Frost sfr...@snowman.net wrote: I do like the idea of a generalized answer which just runs a user-provided command on the server but that's always going to require superuser privileges. Unless it's

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-14 Thread Amit kapila
On Monday, January 14, 2013 6:48 PM Boszormenyi Zoltan wrote: 2013-01-14 07:47 keltezéssel, Amit kapila írta: On Sunday, January 13, 2013 2:45 PM Boszormenyi Zoltan wrote: 2013-01-13 05:49 keltezéssel, Amit kapila írta: On Sunday, January 13, 2013 12:41 AM Tom Lane wrote: Boszormenyi Zoltan

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: I do like the idea of a generalized answer which just runs a user-provided command on the server but that's always going to require superuser privileges. The design that was being kicked around allowed pipes

Re: [HACKERS] json api WIP patch

2013-01-14 Thread Robert Haas
On Thu, Jan 10, 2013 at 6:42 PM, Andrew Dunstan and...@dunslane.net wrote: Udated patch that contains most of the functionality I'm after. One piece left is populate_recordset (populate a set of records from a single json datum which is an array of objects, in one pass). That requires a bit of

Re: [HACKERS] [PERFORM] Slow query: bitmap scan troubles

2013-01-14 Thread Robert Haas
On Thu, Jan 10, 2013 at 8:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Comments? I'm not sure I have anything intelligent to add to this conversation - does that make me the wisest of all the Greeks? - but I do think it worth mentioning that I have heard occasional reports within EDB of the query

Re: [HACKERS] Get current query in a trigger function

2013-01-14 Thread Robert Haas
On Fri, Jan 11, 2013 at 4:47 AM, Vlad Arkhipov arhi...@dc.baikal.ru wrote: Is there any simple way of getting a query for which a trigger was executed? debug_query_string and ActivePortal-sourceText return the top query when there are nested triggers. I believe - only if the trigger is written

Re: [HACKERS] pg_ctl idempotent option

2013-01-14 Thread Boszormenyi Zoltan
2013-01-14 16:22 keltezéssel, Tom Lane írta: Peter Eisentraut pete...@gmx.net writes: Here is a patch to add an option -I/--idempotent to pg_ctl, the result of which is that pg_ctl doesn't error on start or stop if the server is already running or already stopped. Idempotent is a ten-dollar

Re: [HACKERS] GIN over array of ENUMs

2013-01-14 Thread Robert Haas
On Thu, Jan 10, 2013 at 12:08 PM, Rod Taylor p...@rbt.ca wrote: I wish to create this data structure but GIN does not currently support an array of ENUM. Is intarray() a good place to look into adding ENUM support or is there already an operator class for working supports enums that I simply

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-14 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane escribi�: I will bet that this is more breakage from the DDL-code refactoring that has been going on. I am getting closer and closer to wanting that reverted. KaiGai-san seems to have been throwing out lots of

Re: [HACKERS] bugfix: --echo-hidden is not supported by \sf statements

2013-01-14 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: this is very simple patch - it enables hidden_queries for commands \sf and \ef to be consistent with other describing commands. So far as I can tell, get_create_function_cmd (and lookup_function_oid too) were intentionally designed to not show

Re: [HACKERS] pg_retainxlog for inclusion in 9.3?

2013-01-14 Thread Robert Haas
On Fri, Jan 4, 2013 at 4:55 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Mostly that it seems like a hack, and I suspect we may come up with a better way to do this in the future. Do you have the specs of such better way? Would it be a problem

Re: [HACKERS] bugfix: --echo-hidden is not supported by \sf statements

2013-01-14 Thread Pavel Stehule
2013/1/14 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: this is very simple patch - it enables hidden_queries for commands \sf and \ef to be consistent with other describing commands. So far as I can tell, get_create_function_cmd (and lookup_function_oid too)

Re: [HACKERS] PL/perl should fail on configure, not make

2013-01-14 Thread Tom Lane
pgbuildf...@jdrake.com writes: On Thu, 10 Jan 2013, Andrew Dunstan wrote: Without access to the machine it's pretty hard to know, so I was just speculating fairly wildly. If Jeremy can find out what the problem is that would be good, or if he can give us access to the machine it shouldn't be

Re: [HACKERS] [PERFORM] Slow query: bitmap scan troubles

2013-01-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I'm not sure I have anything intelligent to add to this conversation - does that make me the wisest of all the Greeks? - but I do think it worth mentioning that I have heard occasional reports within EDB of the query planner refusing to use extremely

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-14 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: The attached patch seems to work: alvherre=# create table pg_catalog.foo (a int); ERROR: permission denied for schema pg_catalog I notice that contrib/adminpack now fails, though (why doesn't this module have a regression test?): alvherre=#

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-14 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Um. I knew that that module's desire to shove stuff into pg_catalog would bite us someday. But now that I think about it, I'm pretty sure I recall discussions to the effect that there are other third-party modules doing similar things. Yes, and some more

[HACKERS] Re: Privileges for INFORMATION_SCHEMA.SCHEMATA (was Re: [DOCS] Small clarification in 34.41. schemata)

2013-01-14 Thread Casey Allen Shobe
On Wed, Jan 9, 2013 at 8:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, it seems to me that this behavior is actually wrong for our purposes, as it represents a too-literal reading of the spec. The SQL standard has no concept of privileges on schemas, only ownership. We do have

Re: [HACKERS] [PERFORM] Slow query: bitmap scan troubles

2013-01-14 Thread Robert Haas
On Mon, Jan 14, 2013 at 12:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I'm not sure I have anything intelligent to add to this conversation - does that make me the wisest of all the Greeks? - but I do think it worth mentioning that I have heard

Re: [HACKERS] bugfix: --echo-hidden is not supported by \sf statements

2013-01-14 Thread Robert Haas
On Mon, Jan 14, 2013 at 11:56 AM, Tom Lane t...@sss.pgh.pa.us wrote: So far as I can tell, get_create_function_cmd (and lookup_function_oid too) were intentionally designed to not show their queries, and for that matter they go out of their way to produce terse error output if they fail. I'm

Re: [HACKERS] json api WIP patch

2013-01-14 Thread Andrew Dunstan
On 01/14/2013 11:32 AM, Robert Haas wrote: So, how much performance does this lose on json_in() on a large cstring, as compared with master? That's a good question. I'll try to devise a test. I can't shake the feeling that this is adding a LOT of unnecessary data copying. For one thing,

Re: [HACKERS] [PERFORM] Slow query: bitmap scan troubles

2013-01-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jan 14, 2013 at 12:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: The old code definitely had an unreasonably large charge for indexes exceeding 1e8 or so tuples. This wouldn't matter that much for simple single-table lookup queries, but I could

Re: [HACKERS] bugfix: --echo-hidden is not supported by \sf statements

2013-01-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jan 14, 2013 at 11:56 AM, Tom Lane t...@sss.pgh.pa.us wrote: So far as I can tell, get_create_function_cmd (and lookup_function_oid too) were intentionally designed to not show their queries, and for that matter they go out of their way to

Re: [HACKERS] Re: Privileges for INFORMATION_SCHEMA.SCHEMATA (was Re: [DOCS] Small clarification in 34.41. schemata)

2013-01-14 Thread Tom Lane
Casey Allen Shobe ca...@shobe.info writes: On Wed, Jan 9, 2013 at 8:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, it seems to me that this behavior is actually wrong for our purposes, as it represents a too-literal reading of the spec. The SQL standard has no concept of privileges on

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-01-14 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@2ndquadrant.com writes: alvherre=# create extension adminpack; ERROR: permission denied for schema pg_catalog Um. I knew that that module's desire to shove stuff into pg_catalog would bite us someday. But now that I think about it, I'm pretty

Re: [HACKERS] Hash twice

2013-01-14 Thread Robert Haas
On Sat, Jan 12, 2013 at 11:39 AM, Simon Riggs si...@2ndquadrant.com wrote: Lock code says it calculates hash value once and then pass around as needed. But it actually calculates it twice for new locks. Trivial patch attached to make it follow the comments in LockTagHashCode and save a few

Re: [HACKERS] Hash twice

2013-01-14 Thread Simon Riggs
On 14 January 2013 19:12, Robert Haas robertmh...@gmail.com wrote: On Sat, Jan 12, 2013 at 11:39 AM, Simon Riggs si...@2ndquadrant.com wrote: Lock code says it calculates hash value once and then pass around as needed. But it actually calculates it twice for new locks. Trivial patch

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-14 Thread David Johnston
Tom Lane-2 wrote Gurjeet Singh lt; singh.gurjeet@ gt; writes: Can somebody explain why a standalone count(*) returns 1? postgres=# select count(*); count --- 1 (1 row) The Oracle equivalent of that would be SELECT count(*) FROM dual. Does it make more sense to you thought

Re: [HACKERS] Validation in to_date()

2013-01-14 Thread Tom Lane
Hitoshi Harada umi.tan...@gmail.com writes: to_date() doesn't check the date range, which results in unreadable data like this. foo=# create table t as select to_date('-12-10 BC', '-MM-DD BC')::timestamp; SELECT 1 foo=# table t; ERROR: timestamp out of range Attached is to add

Re: [HACKERS] Timing events WIP v1

2013-01-14 Thread Greg Smith
On 1/14/13 11:19 AM, Peter Geoghegan wrote: I noticed that when !log_checkpoints, control never reaches the site where the hook is called, and thus the checkpoint info is not stored. Is that the intended behaviour of the patch? I was aware and considered it a defensible situation--that turning

Re: [HACKERS] fix SQL example syntax in file comment

2013-01-14 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= wulc...@wulczer.org writes: Here's a trivial patch that fixes a comment in execProcNode.c Applied, thanks. For archeological interest, that comment dates back to when it was written in POSTQUEL... The cleanup in a9b1ff4c1d699c8aa615397d47bb3071275c64ef

Re: [HACKERS] [Pgbuildfarm-members] Version 4.10 of buildfarm client released.

2013-01-14 Thread Kevin Grittner
Andrew Dunstan wrote: For Linux, perhaps some form of lsof with the +D option? This actually won't help. In most cases the relevant data directory has long disappeared out from under the rogue postmaster as part of buildfarm cleanup. Also, lsof is not universally available. We try to

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-14 Thread Tom Lane
David Johnston pol...@yahoo.com writes: Tom Lane-2 wrote For that to return zero, it would also be necessary for SELECT 2+2 to return zero rows. Which would be consistent with some views of the universe, but not particularly useful. Given that: SELECT *; Results in: SQL Error: ERROR:

[HACKERS] Curious buildfarm failures

2013-01-14 Thread Tom Lane
Since commit 2065dd2834e832eb820f1fbcd16746d6af1f6037, there have been a few buildfarm failures along the lines of -- Commit table drop COMMIT PREPARED 'regress-two'; ! PANIC: failed to re-find shared proclock object ! PANIC: failed to re-find shared proclock object ! connection to server

Re: [HACKERS] Curious buildfarm failures

2013-01-14 Thread Andres Freund
On 2013-01-14 16:35:48 -0500, Tom Lane wrote: Since commit 2065dd2834e832eb820f1fbcd16746d6af1f6037, there have been a few buildfarm failures along the lines of -- Commit table drop COMMIT PREPARED 'regress-two'; ! PANIC: failed to re-find shared proclock object ! PANIC: failed to

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Peter Eisentraut
On 1/14/13 11:28 AM, Stephen Frost wrote: While there is no option currently for having the server do the compression before sending the data over the wire. OpenSSL? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Curious buildfarm failures

2013-01-14 Thread Andres Freund
On 2013-01-14 22:50:16 +0100, Andres Freund wrote: On 2013-01-14 16:35:48 -0500, Tom Lane wrote: Since commit 2065dd2834e832eb820f1fbcd16746d6af1f6037, there have been a few buildfarm failures along the lines of -- Commit table drop COMMIT PREPARED 'regress-two'; ! PANIC: failed

Re: [HACKERS] Curious buildfarm failures

2013-01-14 Thread Heikki Linnakangas
On 14.01.2013 23:35, Tom Lane wrote: Since commit 2065dd2834e832eb820f1fbcd16746d6af1f6037, there have been a few buildfarm failures along the lines of -- Commit table drop COMMIT PREPARED 'regress-two'; ! PANIC: failed to re-find shared proclock object ! PANIC: failed to re-find shared

[HACKERS] s/size_t/off_t/ in sendTimeLineHistory

2013-01-14 Thread Andres Freund
Hi, When looking at the report of probable fallout from the elog stuff I noticed this warning: walsender.c(366): warning #186: pointless comparison of unsigned integer with zero Which is accurate, the rather unlikely problem of a seek error could not be noticed atm and would probably send

Re: [HACKERS] recent ALTER whatever .. SET SCHEMA refactoring

2013-01-14 Thread Alvaro Herrera
Kohei KaiGai escribió: I'm probably saying same idea. It just adds invocation of external functions to check naming conflicts of functions or collation; that takes additional 4-lines for special case handling in AlterObjectNamespace_internal(). Okay, I can agree with this implementation

Re: [HACKERS] Curious buildfarm failures

2013-01-14 Thread Heikki Linnakangas
On 15.01.2013 00:14, Heikki Linnakangas wrote: On 14.01.2013 23:35, Tom Lane wrote: Since commit 2065dd2834e832eb820f1fbcd16746d6af1f6037, there have been a few buildfarm failures along the lines of -- Commit table drop COMMIT PREPARED 'regress-two'; ! PANIC: failed to re-find shared proclock

Re: [HACKERS] s/size_t/off_t/ in sendTimeLineHistory

2013-01-14 Thread Heikki Linnakangas
On 15.01.2013 00:27, Andres Freund wrote: When looking at the report of probable fallout from the elog stuff I noticed this warning: walsender.c(366): warning #186: pointless comparison of unsigned integer with zero Which is accurate, the rather unlikely problem of a seek error could not be

[HACKERS] [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body

2013-01-14 Thread Andres Freund
Hi, the attached trivial patch allows to compile with -Wtype-limits -Wempty-body (or -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers). As the two fixes seem harmless, that seems to be a good idea. And the recent bug (its not really that, but ...) in walsender.c

Re: [HACKERS] json api WIP patch

2013-01-14 Thread Merlin Moncure
On Thu, Jan 10, 2013 at 5:42 PM, Andrew Dunstan and...@dunslane.net wrote: On 01/04/2013 03:23 PM, Andrew Dunstan wrote: On 01/02/2013 05:51 PM, Andrew Dunstan wrote: On 01/02/2013 04:45 PM, Robert Haas wrote: On Wed, Dec 26, 2012 at 3:33 PM, Andrew Dunstan and...@dunslane.net wrote:

Re: [HACKERS] json api WIP patch

2013-01-14 Thread Andrew Dunstan
On 01/14/2013 07:36 PM, Merlin Moncure wrote: While testing this I noticed that integer based 'get' routines are zero based -- was this intentional? Virtually all other aspects of SQL are 1 based: postgres=# select json_get('[1,2,3]', 1); json_get -- 2 (1 row) postgres=# select

Re: [HACKERS] [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body

2013-01-14 Thread Peter Eisentraut
On Tue, 2013-01-15 at 00:29 +0100, Andres Freund wrote: Independently from this patch, should we add -Wtype-limits to the default parameters? I think we have had a discussion along this line before. I am against fixing warnings from this option, because those changes would hide errors if a

Re: [HACKERS] [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body

2013-01-14 Thread Andres Freund
On 2013-01-14 20:39:05 -0500, Peter Eisentraut wrote: On Tue, 2013-01-15 at 00:29 +0100, Andres Freund wrote: Independently from this patch, should we add -Wtype-limits to the default parameters? I think we have had a discussion along this line before. I am against fixing warnings from

Re: [HACKERS] logical changeset generation v4

2013-01-14 Thread Josh Berkus
Andreas, Is there a git fork for logical replication somewhere? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] logical changeset generation v4

2013-01-14 Thread anara...@anarazel.de
Josh Berkus j...@agliodbs.com schrieb: Andreas, Is there a git fork for logical replication somewhere? Check the bottom of the email ;) --- Please excuse brevity and formatting - I am writing this on my mobile phone. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] logical changeset generation v4

2013-01-14 Thread Abhijit Menon-Sen
At 2013-01-14 18:15:39 -0800, j...@agliodbs.com wrote: Is there a git fork for logical replication somewhere? git://git.postgresql.org/git/users/andresfreund/postgres.git, branch xlog-decoding-rebasing-cf4 (and xlogreader_v4). -- Abhijit -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [PATCH] COPY .. COMPRESSED

2013-01-14 Thread Stephen Frost
* Peter Eisentraut (pete...@gmx.net) wrote: On 1/14/13 11:28 AM, Stephen Frost wrote: While there is no option currently for having the server do the compression before sending the data over the wire. OpenSSL? To be honest, I expected that to come up earlier in this discussion. It'd be

Re: [HACKERS] Get current query in a trigger function

2013-01-14 Thread Vlad Arkhipov
On 01/15/2013 01:45 AM, Robert Haas wrote: On Fri, Jan 11, 2013 at 4:47 AM, Vlad Arkhipov arhi...@dc.baikal.ru wrote: Is there any simple way of getting a query for which a trigger was executed? debug_query_string and ActivePortal-sourceText return the top query when there are nested triggers.

Re: [HACKERS] Curious buildfarm failures

2013-01-14 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: The problem seems to be when the the old and the key hash to the same bucket. In that case, hash_update_hash_key() tries to link the entry to itself. The attached patch fixes it for me. Doh! I had a feeling that that needed a special case,

Re: [HACKERS] logical changeset generation v4

2013-01-14 Thread Abhijit Menon-Sen
At 2013-01-15 02:38:45 +0100, and...@2ndquadrant.com wrote: 2) Currently the logical replication infrastructure assigns a 'slot-id' when a new replica is setup. That slot id isn't really nice (e.g. id-321578-3). It also requires that [18] keeps state in a global variable to make writing

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-14 Thread Gurjeet Singh
On Mon, Jan 14, 2013 at 3:09 PM, David Johnston pol...@yahoo.com wrote: What does SELECT * FROM dual in Oracle yield? AFAICR, 'dual' table has one column named 'DUMMY' and one row with value, single character X. -- Gurjeet Singh http://gurjeet.singh.im/

Re: [HACKERS] [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body

2013-01-14 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-14 20:39:05 -0500, Peter Eisentraut wrote: On Tue, 2013-01-15 at 00:29 +0100, Andres Freund wrote: Independently from this patch, should we add -Wtype-limits to the default parameters? I think we have had a discussion along this line

Re: [HACKERS] Patches for TODO item: Avoid truncating empty OCDR temp tables on COMMIT

2013-01-14 Thread Tom Lane
Gurjeet Singh singh.gurj...@gmail.com writes: Please find attached two patches, implementing two different approaches to fix the issue of COMMIT truncating empty TEMP tables that have the ON COMMIT DELETE ROWS attribute. v2.patch: This approach introduces a boolean 'rd_rows_inserted' in

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-14 Thread Gurjeet Singh
On Mon, Jan 14, 2013 at 4:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: David Johnston pol...@yahoo.com writes: Tom Lane-2 wrote For that to return zero, it would also be necessary for SELECT 2+2 to return zero rows. Which would be consistent with some views of the universe, but not

Re: [HACKERS] logical changeset generation v4

2013-01-14 Thread Alvaro Herrera
Andres Freund wrote: I've been giving a couple of these parts a look. In particular [03] Split out xlog reading into its own module called xlogreader Cleaned this one up a bit last week. I will polish it some more, publish for some final comments, and commit. [08] wal_decoding: Introduce

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-14 Thread Alvaro Herrera
Gurjeet Singh escribió: Interesting to note that SELECT * FROM table_with_zero_cols does not complain of anything. postgres=# select * from test1; -- (0 rows) This I believe result of the fact that we allow user to drop all columns of a table. On a side note, Postgres allows me to

Re: [HACKERS] Patches for TODO item: Avoid truncating empty OCDR temp tables on COMMIT

2013-01-14 Thread Gurjeet Singh
On Mon, Jan 14, 2013 at 10:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh singh.gurj...@gmail.com writes: Please find attached two patches, implementing two different approaches to fix the issue of COMMIT truncating empty TEMP tables that have the ON COMMIT DELETE ROWS attribute.

Re: [HACKERS] count(*) of zero rows returns 1

2013-01-14 Thread Gurjeet Singh
On Mon, Jan 14, 2013 at 11:03 PM, Alvaro Herrera alvhe...@2ndquadrant.comwrote: Gurjeet Singh escribió: Interesting to note that SELECT * FROM table_with_zero_cols does not complain of anything. postgres=# select * from test1; -- (0 rows) This I believe result of the fact that

Re: [HACKERS] logical changeset generation v4

2013-01-14 Thread Mark Kirkwood
On 15/01/13 14:38, Andres Freund wrote: Hi everyone, Here is the newest version of logical changeset generation. I'm quite interested in this feature - so tried applying the 19 patches to the latest 9.3 checkout. Patch and compile are good. However portals seem busted: bench=# BEGIN;

Re: [HACKERS] logical changeset generation v4

2013-01-14 Thread Mark Kirkwood
On 15/01/13 17:37, Mark Kirkwood wrote: On 15/01/13 14:38, Andres Freund wrote: Hi everyone, Here is the newest version of logical changeset generation. I'm quite interested in this feature - so tried applying the 19 patches to the latest 9.3 checkout. Patch and compile are good.

Re: [HACKERS] unlogged tables vs. GIST

2013-01-14 Thread Jeevan Chalke
Hi Robert / Tom I think to support GiST with unlogged table we need to do three things: 1. Teach the buffer manager that the LSN of a page not marked BM_PERMANENT can be ignored 2. Teach GetXLogRecPtrForTemp() to allocate fake LSNs for GiST buffers using a 64-bit, counter that is persisted

Re: [HACKERS] pg_retainxlog for inclusion in 9.3?

2013-01-14 Thread Magnus Hagander
On Mon, Jan 14, 2013 at 5:56 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Jan 4, 2013 at 4:55 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Mostly that it seems like a hack, and I suspect we may come up with a better way to do this in