Re: [HACKERS] Bug in ALTER COLUMN SET DATA TYPE ?

2012-11-05 Thread Pavan Deolasee
On Mon, Nov 5, 2012 at 4:41 AM, Tom Lane t...@sss.pgh.pa.us wrote: It's clear that we need to pass down the information that this action is coming from re-creation of a check constraint, but I think the above proposal for how to do it is pretty wrong-headed. Yeah, I only meant that we need

Re: [HACKERS] Synchronous commit not... synchronous?

2012-11-05 Thread Peter Eisentraut
On 10/31/12 9:39 PM, Peter van Hardenberg wrote: This was rather surprising - my synchronous commit was... not cancelled. Is this expected behaviour? d5r5fdj6u5ieml= begin; BEGIN d5r5fdj6u5ieml= set synchronous_commit = 'on'; SET d5r5fdj6u5ieml= insert into data values ('baz'); INSERT 0

Re: [HACKERS] Synchronous commit not... synchronous?

2012-11-05 Thread Daniel Farina
On Fri, Nov 2, 2012 at 10:31 AM, Simon Riggs si...@2ndquadrant.com wrote: On 2 November 2012 16:27, Jeff Janes jeff.ja...@gmail.com wrote: It would be. But you are not cancelling the commit, you are *attempting* to cancel the commit. The message you receive explains to what extend your

Re: [HACKERS] Synchronous commit not... synchronous?

2012-11-05 Thread Jeff Janes
On Fri, Nov 2, 2012 at 11:41 AM, Daniel Farina dan...@heroku.com wrote: On Fri, Nov 2, 2012 at 10:31 AM, Simon Riggs si...@2ndquadrant.com wrote: On 2 November 2012 16:27, Jeff Janes jeff.ja...@gmail.com wrote: It would be. But you are not cancelling the commit, you are *attempting* to cancel

[HACKERS] Fwd: Stalled post to pgsql-hackers

2012-11-05 Thread Pavel Stehule
Hello I cannot to send a patch to mailing list Regards Pavel Stehule -- Forwarded message -- From: pgsql-hackers-ow...@postgresql.org Date: 2012/11/3 Subject: Stalled post to pgsql-hackers To: Pavel Stehule pavel.steh...@gmail.com Your message to pgsql-hackers has been

Re: [HACKERS] Fwd: Stalled post to pgsql-hackers

2012-11-05 Thread Magnus Hagander
That message just means it's stuck in moderation. You just have to wait for a moderator to approve it (which I just did now) /Magnus On Nov 5, 2012 10:19 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello I cannot to send a patch to mailing list Regards Pavel Stehule --

Re: [HACKERS] Fwd: Stalled post to pgsql-hackers

2012-11-05 Thread Pavel Stehule
Thanks Magnus :) Pavel 2012/11/5 Magnus Hagander mag...@hagander.net: That message just means it's stuck in moderation. You just have to wait for a moderator to approve it (which I just did now) /Magnus On Nov 5, 2012 10:19 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello I

Re: [HACKERS] foreign key locks

2012-11-05 Thread Alvaro Herrera
FWIW I have gotten a lot of feedback about this patch, and since I don't have time right now to produce an updated version, that I'm going to close this as Returned with Feedback, and submit an updated version to the upcoming commitfest. This patch still needs much more review -- for example, as

[HACKERS] gset updated patch

2012-11-05 Thread Pavel Stehule
Hello here is a updated patch Regards Pavel gset_12.diff Description: Binary data -- 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] foreign key locks

2012-11-05 Thread Andres Freund
On Monday, November 05, 2012 02:37:15 PM Alvaro Herrera wrote: FWIW I have gotten a lot of feedback about this patch, and since I don't have time right now to produce an updated version, that I'm going to close this as Returned with Feedback, and submit an updated version to the upcoming

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Magnus Hagander
On Mon, Oct 22, 2012 at 4:24 PM, Stephen Frost sfr...@snowman.net wrote: Magnus, all, * Magnus Hagander (mag...@hagander.net) wrote: On Thu, Oct 18, 2012 at 5:59 PM, Robert Haas robertmh...@gmail.com wrote: That seems like a sufficiently long deprecation window, but is gssapi a full

Re: [HACKERS] Allow WAL information to recover corrupted pg_controldata

2012-11-05 Thread Alvaro Herrera
I'm not sure what to do with this patch. There was some resistance to the idea originally; then after some discussion, there was some apparent agreement that it might be useful on occasion. Later, a patch was posted, but there was almost no review of it; except to say that it should probably be

Re: [HACKERS] Unresolved error 0xC0000409 on Windows Server

2012-11-05 Thread Matthew Gerber
On Sun, Nov 4, 2012 at 3:39 AM, Craig Ringer ring...@ringerc.id.au wrote: On 11/04/2012 08:47 AM, Matthew Gerber wrote: So I attached the VS debugger, but the server died without raising an exception in VS. Not sure what's going on here. Try creating a directory called crashdumps in

Re: [HACKERS] Statistics and selectivity estimation for ranges

2012-11-05 Thread Alvaro Herrera
What's going on with this patch? I haven't seen any activity in a while. Should I just move this to the next commitfest? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Unresolved error 0xC0000409 on Windows Server

2012-11-05 Thread Merlin Moncure
On Fri, Nov 2, 2012 at 8:00 PM, Noah Misch n...@leadboat.com wrote: hm, several times over the last couple of months (both on postgres 9.1 and 9.2), i've seen a similar crash, but on linux. It hits the log like this: Execution halted (~ 200x) Error: segfault from C stack overflow

Re: [HACKERS] Allow WAL information to recover corrupted pg_controldata

2012-11-05 Thread Amit Kapila
On Monday, November 05, 2012 7:33 PM Alvaro Herrera wrote: I'm not sure what to do with this patch. There was some resistance to the idea originally; then after some discussion, there was some apparent agreement that it might be useful on occasion. Later, a patch was posted, but there was

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Stephen Frost
Magnus, * Magnus Hagander (mag...@hagander.net) wrote: I have no idea what platform that would be. Both the standard implementations of krb5 have supported gssapi since forever. The only nonstandard environment we support there is Windows, and that one *only* has support for GSSAPI/SSPI.

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 9:57 AM, Stephen Frost sfr...@snowman.net wrote: Magnus, * Magnus Hagander (mag...@hagander.net) wrote: I have no idea what platform that would be. Both the standard implementations of krb5 have supported gssapi since forever. The only nonstandard environment we

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Magnus Hagander
On Mon, Nov 5, 2012 at 6:10 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Nov 5, 2012 at 9:57 AM, Stephen Frost sfr...@snowman.net wrote: Magnus, * Magnus Hagander (mag...@hagander.net) wrote: I have no idea what platform that would be. Both the standard implementations of krb5

Re: [HACKERS] WIP checksums patch

2012-11-05 Thread Robert Haas
On Mon, Oct 29, 2012 at 4:31 PM, Jim Nasby j...@nasby.net wrote: For whatever it's worth... we (and presumably others) still use londiste (or Slony) as our upgrade path, so we could tolerate a cluster-wide setting. We'd just set it when building new clusters via londiste and forget about it.

Re: [HACKERS] [PERFORM] out of memory

2012-11-05 Thread Robert Haas
On Tue, Oct 30, 2012 at 6:08 AM, Tatsuo Ishii is...@postgresql.org wrote: i have sql file (it's size are 1GB ) when i execute it then the String is 987098801 bytr too long for encoding conversion error occured . pls give me solution about You hit the upper limit of internal memory

Re: [HACKERS] [PERFORM] out of memory

2012-11-05 Thread John R Pierce
On 11/05/12 9:27 AM, Robert Haas wrote: That is, if we have a large datum that we're trying to send back to the client, could we perhaps chop off the first 50MB or so, do the encoding on that amount of data, send the data to the client, lather, rinse, repeat? I'd suggest work_mem sized chunks

Re: [HACKERS] What are the advantages of not being able to access multiple databases with one connection?

2012-11-05 Thread Robert Haas
On Tue, Oct 30, 2012 at 8:37 AM, crocket crockabisc...@gmail.com wrote: MySQL permits a connection to access multiple databases. But Postgresql restricts a connection to one database. I think postgresql database connection is somewhat limited. Is it an old and decrepit design? or does it

Re: [HACKERS] [PATCH] PL/Python: Add spidata to all spiexceptions

2012-11-05 Thread Robert Haas
On Wed, Oct 31, 2012 at 5:33 AM, Jan Urbański wulc...@wulczer.org wrote: On 30/10/12 22:06, Oskari Saarenmaa wrote: PL/Python maps Python SPIError exceptions with 'spidata' attribute into SQL errors. PL/Python also creates classes in plpy.spiexceptions for all known errors but does not

Re: [HACKERS] [PATCH] PL/Python: Add spidata to all spiexceptions

2012-11-05 Thread Jan Urbański
On 05/11/12 18:35, Robert Haas wrote: On Wed, Oct 31, 2012 at 5:33 AM, Jan Urbańskiwulc...@wulczer.org wrote: On 30/10/12 22:06, Oskari Saarenmaa wrote: PL/Python maps Python SPIError exceptions with 'spidata' attribute into SQL errors. Here's an alternative patch that takes advantage of

Re: [HACKERS] September 2012 commitfest

2012-11-05 Thread Alvaro Herrera
I said last week: Waiting on Author: 1 Needs Review: 10 Ready for Committer: 7 Now there are only 9 patches Ready for committer. All other patches have either been moved to the next commitfest, or returned with feedback. So we've made some progress, but we need a final push from committers.

Re: [HACKERS] Limiting the number of parameterized indexpaths created

2012-11-05 Thread Robert Haas
On Tue, Oct 30, 2012 at 5:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: I looked into the complaint of unreasonable planner runtime in bug #7626, http://archives.postgresql.org/pgsql-bugs/2012-10/msg00232.php In the given example, the indexed relation foo has join clauses with 30 other relations.

Re: [HACKERS] alter table tablename add column - breaks pl/pgsql function returns tablename

2012-11-05 Thread Robert Haas
On Thu, Nov 1, 2012 at 12:14 AM, Amit kapila amit.kap...@huawei.com wrote: Is this very hard to fix? Currently the compiled body is not discarded on DDL's, so I believe it is not a bug as per current implementation. However it can be thought of as a new feature. Seems like a bug to

Re: [HACKERS] Bug in ALTER COLUMN SET DATA TYPE ?

2012-11-05 Thread Tom Lane
Pavan Deolasee pavan.deola...@gmail.com writes: Please see attached patch which does what you suggested above. May be it needs a little more commentary to record why we made this specific change. Please let me know if you think so and want me to do that. Applied with some cosmetic adjustments

Re: [HACKERS] Doc patch, distinguish sections with an empty row in error code table

2012-11-05 Thread Robert Haas
On Fri, Oct 26, 2012 at 10:03 AM, Karl O. Pinc k...@meme.com wrote: This patch adds an empty row before each section header in the error codes table in the docs. I tried not putting an empty row before the first section, but it looks better to always have an empty row. IMO. File:

Re: [HACKERS] [PATCH] PL/Python: Add spidata to all spiexceptions

2012-11-05 Thread Jan Urbański
On 05/11/12 19:07, Jan Urbański wrote: On 05/11/12 18:35, Robert Haas wrote: You should probably add this to the next CF so we don't forget about it. I will, as soon as I recover my community account. Added as https://commitfest.postgresql.org/action/patch_view?id=971 J -- Sent via

Re: [HACKERS] Update obsolete text in indexam.sgml

2012-11-05 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: ISTM it would be better to update the text about index cost estimation in indexam.sgml. Please find attached a patch. I'm not too thrilled with the proposed patch. In the first place, I don't think it's necessary to address costing of index

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Peter Eisentraut
On 11/5/12 12:13 PM, Magnus Hagander wrote: AFAICS there is no icon for gssapi. So your first statement is correct, but the second one isn't. Yeah, for example it's used here: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=smewdt=2012-11-02%2011%3A38%3A04 -- Sent via pgsql-hackers

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Andrew Dunstan
On 11/05/2012 12:13 PM, Magnus Hagander wrote: http://www.pgbuildfarm.org/cgi-bin/show_status.pl ...it seems there are LOTS of machines building with krb5, and NONE with gssapi. AFAICS there is no icon for gssapi. So your first statement is correct, but the second one isn't.

Re: [HACKERS] RFC: Timing Events

2012-11-05 Thread Josh Berkus
I think auto_explain would help you solve such rare incidents if it could dump several statistics into server log, including lock waits and block reads/writes statistic per-session, for example. Do we have something to add to auto_explain? Well, to be frank, I've never found auto-explain

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Magnus Hagander
On Mon, Nov 5, 2012 at 7:50 PM, Andrew Dunstan and...@dunslane.net wrote: On 11/05/2012 12:13 PM, Magnus Hagander wrote: http://www.pgbuildfarm.org/**cgi-bin/show_status.plhttp://www.pgbuildfarm.org/cgi-bin/show_status.pl ...it seems there are LOTS of machines building with

Re: [HACKERS] Limiting the number of parameterized indexpaths created

2012-11-05 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 30, 2012 at 5:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: I looked into the complaint of unreasonable planner runtime in bug #7626, http://archives.postgresql.org/pgsql-bugs/2012-10/msg00232.php You know, when I read this, my first thought

Re: [HACKERS] Limiting the number of parameterized indexpaths created

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 2:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Oct 30, 2012 at 5:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: I looked into the complaint of unreasonable planner runtime in bug #7626,

Re: [HACKERS] Limiting the number of parameterized indexpaths created

2012-11-05 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Nov 5, 2012 at 2:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: There are three different parameterized paths we could create: one relying on x only, one relying on y only, one relying on both. Sure, but that example is different from the test case

Re: [HACKERS] Limiting the number of parameterized indexpaths created

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 2:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Nov 5, 2012 at 2:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: There are three different parameterized paths we could create: one relying on x only, one relying on y only, one

Re: [HACKERS] Synchronous commit not... synchronous?

2012-11-05 Thread Daniel Farina
On Sun, Nov 4, 2012 at 6:00 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Nov 3, 2012 at 5:44 PM, Florian Weimer f...@deneb.enyo.de wrote: * Daniel Farina: The idea of canceling a COMMIT statement causing a COMMIT seems pretty strange to me. Canceling commits is inherently racy, so

Re: [HACKERS] Limiting the number of parameterized indexpaths created

2012-11-05 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Nov 5, 2012 at 2:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um, no. This is a useful counterexample: WHERE t.a x.c1 AND t.a y.c2 Well, OK. So maybe you also need the operator to be the same as well. Nope. A counterexample to that

[HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
Magnus reported that a customer with a million tables was finding pg_upgrade slow. I had never considered many table to be a problem, but decided to test it. I created a database with 2k tables like this: CREATE TABLE test1990 (x SERIAL); Running the git version of pg_upgrade on that

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Magnus reported that a customer with a million tables was finding pg_upgrade slow. You sure there's not an O(N^2) issue in there somewhere? I don't see anything unsafe about having pg_upgrade use synchronous_commit=off. No objection, but this seems

Re: [HACKERS] Limiting the number of parameterized indexpaths created

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 3:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Nov 5, 2012 at 2:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um, no. This is a useful counterexample: WHERE t.a x.c1 AND t.a y.c2 Well, OK. So maybe you also need the

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Magnus Hagander
On Mon, Nov 5, 2012 at 9:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: Magnus reported that a customer with a million tables was finding pg_upgrade slow. You sure there's not an O(N^2) issue in there somewhere? I don't see anything unsafe about having

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Mon, Nov 5, 2012 at 9:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, does pg_upgrade run pg_restore in --single-transaction mode? That would probably make synchronous_commit moot, at least for that step. It doesn't use pg_restore at all - it

Re: [HACKERS] [PATCH] Prefetch index pages for B-Tree index scans

2012-11-05 Thread Bruce Momjian
On Fri, Nov 2, 2012 at 09:59:08AM -0400, John Lumby wrote: Thanks for the mentioning this posting.    Interesting. However,    the OP describes an implementation based on libaio. Today what we have (for linux) is librt,  which is quite different. It is arguable worse than libaio (well

Re: [HACKERS] Doc patch, distinguish sections with an empty row in error code table

2012-11-05 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Oct 26, 2012 at 10:03 AM, Karl O. Pinc k...@meme.com wrote: This patch adds an empty row before each section header in the error codes table in the docs. This doesn't seem like a particularly good idea to me, but what do other people think?

Re: [HACKERS] RFC: Timing Events

2012-11-05 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Do we have something to add to auto_explain? Well, to be frank, I've never found auto-explain to be useful because of its restriction to superuser sessions. It's an interesting proof-of-concept, but completely useless at any production site. Huh? The

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
On Mon, Nov 5, 2012 at 03:30:32PM -0500, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Mon, Nov 5, 2012 at 9:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, does pg_upgrade run pg_restore in --single-transaction mode? That would probably make synchronous_commit moot, at

Re: [HACKERS] RFC: Timing Events

2012-11-05 Thread Jeff Janes
On Sun, Nov 4, 2012 at 1:35 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello 2012/11/4 Satoshi Nagayasu sn...@uptime.jp: Do we have something to add to auto_explain? Now I am working on expanding slow query record and auto_explain with some locking times (lock on objects, lock on

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Magnus Hagander
On Mon, Nov 5, 2012 at 9:49 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Nov 5, 2012 at 03:30:32PM -0500, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Mon, Nov 5, 2012 at 9:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, does pg_upgrade run pg_restore in

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
On Mon, Nov 5, 2012 at 10:01:22PM +0100, Magnus Hagander wrote: On Mon, Nov 5, 2012 at 9:49 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Nov 5, 2012 at 03:30:32PM -0500, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Mon, Nov 5, 2012 at 9:14 PM, Tom Lane

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Jeff Janes
On Mon, Nov 5, 2012 at 12:49 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Nov 5, 2012 at 03:30:32PM -0500, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Mon, Nov 5, 2012 at 9:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, does pg_upgrade run pg_restore in

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes jeff.ja...@gmail.com wrote: Or have options for pg_dump and pg_restore to insert set synchronous_commit=off into the SQL stream? It would be kind of neat if we had a command that would force all previously-asynchronous commits to complete. It seems

Re: [HACKERS] Doc patch, distinguish sections with an empty row in error code table

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 3:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Oct 26, 2012 at 10:03 AM, Karl O. Pinc k...@meme.com wrote: This patch adds an empty row before each section header in the error codes table in the docs. This doesn't seem

Re: [HACKERS] Synchronous commit not... synchronous?

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 2:59 PM, Daniel Farina dan...@heroku.com wrote: On Sun, Nov 4, 2012 at 6:00 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Nov 3, 2012 at 5:44 PM, Florian Weimer f...@deneb.enyo.de wrote: * Daniel Farina: The idea of canceling a COMMIT statement causing a COMMIT

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Andrew Dunstan
On 11/05/2012 01:53 PM, Magnus Hagander wrote: On Mon, Nov 5, 2012 at 7:50 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 11/05/2012 12:13 PM, Magnus Hagander wrote: http://www.pgbuildfarm.org/cgi-bin/show_status.pl ...it seems there

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
On Mon, Nov 5, 2012 at 04:14:47PM -0500, Robert Haas wrote: On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes jeff.ja...@gmail.com wrote: Or have options for pg_dump and pg_restore to insert set synchronous_commit=off into the SQL stream? It would be kind of neat if we had a command that would

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Jeff Janes
On Mon, Nov 5, 2012 at 1:14 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes jeff.ja...@gmail.com wrote: Or have options for pg_dump and pg_restore to insert set synchronous_commit=off into the SQL stream? It would be kind of neat if we had a command

Re: [HACKERS] alter table tablename add column - breaks pl/pgsql function returns tablename

2012-11-05 Thread Tom Lane
Palle Girgensohn gir...@pingpong.net writes: Please note that this problem does not go away by disconnecting and reconnecting, and other sessions get the error immediately, so the claim that it is bound to a session is false. Huh? The test case you provided certainly doesn't exhibit any

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
On Mon, Nov 5, 2012 at 01:23:58PM -0800, Jeff Janes wrote: On Mon, Nov 5, 2012 at 1:14 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes jeff.ja...@gmail.com wrote: Or have options for pg_dump and pg_restore to insert set synchronous_commit=off into

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Alvaro Herrera
Bruce Momjian escribió: On Mon, Nov 5, 2012 at 04:14:47PM -0500, Robert Haas wrote: On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes jeff.ja...@gmail.com wrote: Or have options for pg_dump and pg_restore to insert set synchronous_commit=off into the SQL stream? It would be kind of neat if

Re: [HACKERS] install zic binary

2012-11-05 Thread Bruce Momjian
On Tue, Oct 23, 2012 at 12:40:54PM -0200, Euler Taveira wrote: Hi, Every year we have a ton of questions about updating the time zone data in Brazil (our politics decided to do it at 90min at the second half). Problem is that there is not sufficient time to release a new minor version with

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
On Mon, Nov 5, 2012 at 06:33:16PM -0300, Alvaro Herrera wrote: Bruce Momjian escribió: On Mon, Nov 5, 2012 at 04:14:47PM -0500, Robert Haas wrote: On Mon, Nov 5, 2012 at 4:07 PM, Jeff Janes jeff.ja...@gmail.com wrote: Or have options for pg_dump and pg_restore to insert set

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 4:33 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: AFAIR any transaction that modifies catalogs gets sync commit forcibly, regardless of the setting. And sync commit means you get to wait for all previous transactions to be flushed as well. So simply creating a

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
On Mon, Nov 5, 2012 at 04:39:27PM -0500, Robert Haas wrote: On Mon, Nov 5, 2012 at 4:33 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: AFAIR any transaction that modifies catalogs gets sync commit forcibly, regardless of the setting. And sync commit means you get to wait for all

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Robert Haas
On Mon, Nov 5, 2012 at 4:42 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Nov 5, 2012 at 04:39:27PM -0500, Robert Haas wrote: On Mon, Nov 5, 2012 at 4:33 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: AFAIR any transaction that modifies catalogs gets sync commit forcibly,

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Magnus Hagander
On Mon, Nov 5, 2012 at 10:21 PM, Andrew Dunstan and...@dunslane.net wrote: On 11/05/2012 01:53 PM, Magnus Hagander wrote: On Mon, Nov 5, 2012 at 7:50 PM, Andrew Dunstan and...@dunslane.netmailto: and...@dunslane.net wrote: On 11/05/2012 12:13 PM, Magnus Hagander wrote:

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Andres Freund
On Mon, Nov 05, 2012 at 04:42:56PM -0500, Bruce Momjian wrote: On Mon, Nov 5, 2012 at 04:39:27PM -0500, Robert Haas wrote: On Mon, Nov 5, 2012 at 4:33 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: AFAIR any transaction that modifies catalogs gets sync commit forcibly, regardless

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Jeff Janes
On Mon, Nov 5, 2012 at 1:39 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Nov 5, 2012 at 4:33 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: AFAIR any transaction that modifies catalogs gets sync commit forcibly, regardless of the setting. And sync commit means you get to wait for

Re: [HACKERS] Deprecations in authentication

2012-11-05 Thread Andrew Dunstan
On 11/05/2012 04:54 PM, Magnus Hagander wrote: On Mon, Nov 5, 2012 at 10:21 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 11/05/2012 01:53 PM, Magnus Hagander wrote: On Mon, Nov 5, 2012 at 7:50 PM, Andrew Dunstan and...@dunslane.net

Re: [HACKERS] alter table tablename add column - breaks pl/pgsql function returns tablename

2012-11-05 Thread Palle Girgensohn
5 nov 2012 kl. 19:36 skrev Robert Haas robertmh...@gmail.com: On Thu, Nov 1, 2012 at 12:14 AM, Amit kapila amit.kap...@huawei.com wrote: Is this very hard to fix? Currently the compiled body is not discarded on DDL's, so I believe it is not a bug as per current implementation.

Re: [HACKERS] foreign key locks

2012-11-05 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: FOR NON KEY UPDATE FOR KEY UPDATE KEY is the default, so FOR UPDATE is a synonym of FOR KEY UPDATE Not really sure about the proposed syntax, but yes clearly we need some other syntax to mean FOR NON KEY UPDATE. I would rather keep FOR

Re: [HACKERS] Synchronous commit not... synchronous?

2012-11-05 Thread Daniel Farina
On Mon, Nov 5, 2012 at 1:19 PM, Robert Haas robertmh...@gmail.com wrote: Well, feel free to make a suggestion. We could have a mode where a commit, once initiated, is not user-cancellable, but that doesn't seem like a usability improvement to me. That just forces somebody to bounce the

Re: [HACKERS] What are the advantages of not being able to access multiple databases with one connection?

2012-11-05 Thread Josh Berkus
functional gap here. I am not sure I'd bother implementing the multi-database concept today if we didn't have it already ... but it seems kind of pointless to rip it out given that it's already there. It's very useful for webhosts. You can give each user their own private database and not

Re: [HACKERS] alter table tablename add column - breaks pl/pgsql function returns tablename

2012-11-05 Thread Palle Girgensohn
5 nov 2012 kl. 22:23 skrev Tom Lane t...@sss.pgh.pa.us: Palle Girgensohn gir...@pingpong.net writes: Please note that this problem does not go away by disconnecting and reconnecting, and other sessions get the error immediately, so the claim that it is bound to a session is false. Huh?

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Jeff Janes
On Mon, Nov 5, 2012 at 12:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: Magnus reported that a customer with a million tables was finding pg_upgrade slow. You sure there's not an O(N^2) issue in there somewhere? There certainly will be before he gets to a

Re: [HACKERS] What are the advantages of not being able to access multiple databases with one connection?

2012-11-05 Thread Merlin Moncure
On Mon, Nov 5, 2012 at 11:33 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Oct 30, 2012 at 8:37 AM, crocket crockabisc...@gmail.com wrote: MySQL permits a connection to access multiple databases. But Postgresql restricts a connection to one database. I think postgresql database

Re: [HACKERS] alter table tablename add column - breaks pl/pgsql function returns tablename

2012-11-05 Thread Tom Lane
Palle Girgensohn gir...@pingpong.net writes: Ah, sorry. Other sessions get the error immediately as well though. Would input parameters matter, or is it just the return type? I'll see if I can find a test case that breaks permanently, but I'm probably mistaken about that bit then. It's

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: That could generate a lot of WAL files if used regularly. :-( Does SELECT txid_current() generate WAL? I think it does. Well, it assigns a XID. I'm not sure it'd be a good idea to assume that the mere act of doing that, without actually writing

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Josh Berkus
Sorry, I should've said psql --single-transaction. Although that isn't going to work either given the presence of \connect commands in the script. I wonder whether pg_dumpall ought to have some sort of one transaction per database please option. pg_dumpall ought to support -Fc output ...

Re: [HACKERS] RFC: Timing Events

2012-11-05 Thread Josh Berkus
Huh? The typical use-case is to enable it for all sessions by including it in shared_preload_libraries. That doesn't require any particular session to be superuser. (If you're superuser you can then turn it *off* in your session, should you wish.) It's not practical to have auto-explain

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Bruce Momjian
On Mon, Nov 5, 2012 at 05:39:40PM -0800, Josh Berkus wrote: Sorry, I should've said psql --single-transaction. Although that isn't going to work either given the presence of \connect commands in the script. I wonder whether pg_dumpall ought to have some sort of one transaction per

Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-05 Thread Andrew Dunstan
On 11/05/2012 08:52 PM, Bruce Momjian wrote: On Mon, Nov 5, 2012 at 05:39:40PM -0800, Josh Berkus wrote: Sorry, I should've said psql --single-transaction. Although that isn't going to work either given the presence of \connect commands in the script. I wonder whether pg_dumpall ought to

Re: [HACKERS] Logical to physical page mapping

2012-11-05 Thread Bruce Momjian
On Mon, Oct 29, 2012 at 07:05:39AM -0400, Robert Haas wrote: Yet another idea we've tossed around is to make only vacuum records include FPWs, and have the more common heap insert/update/delete operations include enough information that they can still be applied correctly even if the page has

Re: [HACKERS] Doc patch, distinguish sections with an empty row in error code table

2012-11-05 Thread Karl O. Pinc
On 11/05/2012 02:40:12 PM, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Oct 26, 2012 at 10:03 AM, Karl O. Pinc k...@meme.com wrote: This patch adds an empty row before each section header in the error codes table in the docs. This doesn't seem like a particularly

Re: [HACKERS] Arguments to foreign tables?

2012-11-05 Thread Jeff Davis
On Sun, 2012-11-04 at 15:13 -0500, Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: Is there any fundamental or philosophical reason why a foreign table can't accept arguments? That isn't a table; it's some sort of function. Now that we have LATERAL, there is no good reason to

Re: [HACKERS] Statistics and selectivity estimation for ranges

2012-11-05 Thread Jeff Davis
On Mon, 2012-11-05 at 11:12 -0300, Alvaro Herrera wrote: What's going on with this patch? I haven't seen any activity in a while. Should I just move this to the next commitfest? Sorry, I dropped the ball here. I will still review it, whether it makes this commitfest or not. Regards,

Re: [HACKERS] Update obsolete text in indexam.sgml

2012-11-05 Thread Etsuro Fujita
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: ISTM it would be better to update the text about index cost estimation in indexam.sgml. Please find attached a patch. I'm not too thrilled with the proposed patch. In the first place, I don't