Re: [HACKERS] PANIC: could not write to log file

2012-11-26 Thread Cyril VELTER
On 23/11/12 17:24:48 mailto:t...@sss.pgh.pa.us wrote : Cyril VELTER cyril.vel...@metadys.com writes: I follow up on my previous message. Just got two more crash today very similar to the first ones : PANIC: could not write to log file 118, segment 237 at offset 2686976, length

Re: [HACKERS] WIP patch: add (PRE|POST)PROCESSOR options to COPY

2012-11-26 Thread Etsuro Fujita
find attached an updated version of the patch. Thanks, Best regards, Etsuro Fujita copy-popen-20121126.patch 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: Plugging fd leaks (was Re: [HACKERS] Switching timeline over streaming replication)

2012-11-26 Thread Amit Kapila
On Friday, November 23, 2012 7:03 PM Heikki Linnakangas On 15.11.2012 17:16, Heikki Linnakangas wrote: On 15.11.2012 16:55, Tom Lane wrote: Heikki Linnakangashlinnakan...@vmware.com writes: This is a fairly general issue, actually. Looking around, I can see at least two similar cases in

Re: [HACKERS] WIP: index support for regexp search

2012-11-26 Thread Heikki Linnakangas
On 25.11.2012 22:55, Alexander Korotkov wrote: On Tue, Nov 20, 2012 at 1:43 PM, Heikki Linnakangashlinnakan...@vmware.com wrote: Glad to see this patch hasn't been totally forgotten. Being able to use indexes for regular expressions would be really cool! Back in January, I asked for some

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Robert Haas
On Sun, Nov 25, 2012 at 7:30 PM, Marko Tiikkaja pgm...@joh.to wrote: As others have pointed out, replacing the contents of a table is something which people have been wanting to do for a long time, and I think having this ability would make this patch a lot better; now it just feels like

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Marko Tiikkaja
On 11/26/12 2:07 PM, Robert Haas wrote: On Sun, Nov 25, 2012 at 7:30 PM, Marko Tiikkaja pgm...@joh.to wrote: As others have pointed out, replacing the contents of a table is something which people have been wanting to do for a long time, and I think having this ability would make this patch a

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Peter Geoghegan
On 26 November 2012 13:07, Robert Haas robertmh...@gmail.com wrote: None of those patches were small patches. It's going to take multiple years to get materialized views up to a state where they're really useful to a broad audience in production applications, but I don't think we should sneer

Re: Plugging fd leaks (was Re: [HACKERS] Switching timeline over streaming replication)

2012-11-26 Thread Heikki Linnakangas
On 26.11.2012 14:53, Amit Kapila wrote: I have one usecase in feature (SQL Command to edit postgresql.conf) very similar to OpenFile/CloseFile, but I want that when CloseFile is called from abort, it should remove(unlink) the file as well and during open it has to retry few times if open is not

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2012-11-26 Thread Amit Kapila
Friday, November 23, 2012 5:38 AM Muhammad Usama wrote: Hi Amit I have reviewed and tested the patch, Following are my observations and comments. Thank you for the review. I need some clarification regarding some of the comments Observations and Comments

Re: Plugging fd leaks (was Re: [HACKERS] Switching timeline over streaming replication)

2012-11-26 Thread Amit Kapila
On Monday, November 26, 2012 7:01 PM Heikki Linnakangas wrote: On 26.11.2012 14:53, Amit Kapila wrote: I have one usecase in feature (SQL Command to edit postgresql.conf) very similar to OpenFile/CloseFile, but I want that when CloseFile is called from abort, it should remove(unlink) the

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Peter Eisentraut
On 11/14/12 9:28 PM, Kevin Grittner wrote: 17. Since the data viewed in an MV is not up-to-date with the latest committed transaction, So, the way I understand it, in Oracle terms, this feature is a snapshot, not a materialized view. Maybe that's what it should be called then. -- Sent

Re: Plugging fd leaks (was Re: [HACKERS] Switching timeline over streaming replication)

2012-11-26 Thread Tom Lane
Amit Kapila amit.kap...@huawei.com writes: On Monday, November 26, 2012 7:01 PM Heikki Linnakangas wrote: Hmm, if it's just for locking purposes, how about using a lwlock or a heavy-weight lock instead? Its not only for lock, the main idea is that we create temp file and write modified

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Robert Haas
On Mon, Nov 26, 2012 at 8:14 AM, Marko Tiikkaja pgm...@joh.to wrote: First of all, I have to apologize. Re-reading the email I sent out last night, it does indeed feel a bit harsh and I can understand your reaction. At no point did I mean to belittle Kevin's efforts or the patch itself. I

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Andrew Dunstan
On 11/26/2012 09:46 AM, Peter Eisentraut wrote: On 11/14/12 9:28 PM, Kevin Grittner wrote: 17. Since the data viewed in an MV is not up-to-date with the latest committed transaction, So, the way I understand it, in Oracle terms, this feature is a snapshot, not a materialized view. Maybe

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread David Fetter
On Mon, Nov 26, 2012 at 09:46:33AM -0500, Peter Eisentraut wrote: On 11/14/12 9:28 PM, Kevin Grittner wrote: 17. Since the data viewed in an MV is not up-to-date with the latest committed transaction, So, the way I understand it, in Oracle terms, this feature is a snapshot, not a

Re: [HACKERS] [WIP] pg_ping utility

2012-11-26 Thread Peter Eisentraut
On 11/23/12 9:48 AM, Michael Paquier wrote: We waited a couple of days for feedback for this feature. So based on all the comments provided by everybody on this thread, perhaps we should move on and implement the options that would make pg_ping a better wrapper for PQPing. Comments?

Re: [HACKERS] [WIP] pg_ping utility

2012-11-26 Thread Michael Paquier
On Tue, Nov 27, 2012 at 12:26 AM, Peter Eisentraut pete...@gmx.net wrote: On 11/23/12 9:48 AM, Michael Paquier wrote: We waited a couple of days for feedback for this feature. So based on all the comments provided by everybody on this thread, perhaps we should move on and implement the

[HACKERS] Upcoming back-branch releases

2012-11-26 Thread Tom Lane
We're about due for a new set of back-branch update releases. After some discussion among the packagers, it seems the best window for getting this done before the holiday season sets in is next week. Also, as previously mentioned, we're experimenting with weekday rather than over-the-weekend

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Robert Haas
On Wed, Nov 21, 2012 at 3:16 PM, Andrew Dunstan and...@dunslane.net wrote: Non-builtin types are now searched for a cast to json, and if it exists it is used instead of the type's text representation. I didn't add a special type to look for a cast to, as was discussed before, as it seemed a bit

Re: [HACKERS] change in LOCK behavior

2012-11-26 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 11 October 2012 20:43, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: So we have to take the snapshot before you begin execution, but it seems that to avoid surprising behavior we also have to take it after acquiring

[HACKERS] Duplicated oids between tables - problem or not?

2012-11-26 Thread Magnus Hagander
I noticed after a pg_upgrade on a system, that the same oid is used both for a database and a user (repeated many times for different combinations of databases and users). This is because pg_upgrade doesn't preserve the database oid, and it reused the oid of the row in pg_authid. The reason I

Re: [HACKERS] change in LOCK behavior

2012-11-26 Thread Robert Haas
On Mon, Nov 26, 2012 at 10:55 AM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 11 October 2012 20:43, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: So we have to take the snapshot before you begin execution, but it seems that

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Peter Geoghegan
On 26 November 2012 15:24, David Fetter da...@fetter.org wrote: I hate to add to the bike-shedding, but we should probably add REFRESH SNAPSHOT as an optional piece of the grammar, with more REFRESH options to come. I don't know that they should be called materialised views, but do we really

Re: [HACKERS] Duplicated oids between tables - problem or not?

2012-11-26 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: I noticed after a pg_upgrade on a system, that the same oid is used both for a database and a user (repeated many times for different combinations of databases and users). This is because pg_upgrade doesn't preserve the database oid, and it reused

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread David Fetter
On Mon, Nov 26, 2012 at 04:02:17PM +, Peter Geoghegan wrote: On 26 November 2012 15:24, David Fetter da...@fetter.org wrote: I hate to add to the bike-shedding, but we should probably add REFRESH SNAPSHOT as an optional piece of the grammar, with more REFRESH options to come. I don't

Re: [HACKERS] Upcoming back-branch releases

2012-11-26 Thread Pavan Deolasee
On Mon, Nov 26, 2012 at 9:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: We're about due for a new set of back-branch update releases. After some discussion among the packagers, it seems the best window for getting this done before the holiday season sets in is next week. Also, as previously

Re: [HACKERS] Duplicated oids between tables - problem or not?

2012-11-26 Thread Magnus Hagander
On Mon, Nov 26, 2012 at 5:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: I noticed after a pg_upgrade on a system, that the same oid is used both for a database and a user (repeated many times for different combinations of databases and users). This is

Re: [HACKERS] change in LOCK behavior

2012-11-26 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Nov 26, 2012 at 10:55 AM, Tom Lane t...@sss.pgh.pa.us wrote: We have to do something about this one way or another before we can ship 9.2.2. Is the consensus to revert this patch:

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-26 Thread Robert Haas
On Fri, Nov 23, 2012 at 5:34 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Thu, Nov 15, 2012 at 7:05 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Wed, Nov 14, 2012 at 11:49 AM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Janes jeff.ja...@gmail.com writes: On Thu, Nov 8, 2012 at 9:50 PM, Tom Lane

Re: [HACKERS] Upcoming back-branch releases

2012-11-26 Thread Andres Freund
On 2012-11-26 21:35:05 +0530, Pavan Deolasee wrote: On Mon, Nov 26, 2012 at 9:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: We're about due for a new set of back-branch update releases. After some discussion among the packagers, it seems the best window for getting this done before the

[HACKERS] 64 bit ints vs libpq-fe.h

2012-11-26 Thread Magnus Hagander
It's no longer possible to build pgadmin with libpq from git master: /opt/pgsql/inst-pg/head/include/libpq-fe.h:551:8: error: ‘pg_int64’ does not name a type and related messages about it. This seems to be related to

Re: [HACKERS] Upcoming back-branch releases

2012-11-26 Thread Magnus Hagander
On Mon, Nov 26, 2012 at 5:21 PM, Andres Freund and...@2ndquadrant.com wrote: On 2012-11-26 21:35:05 +0530, Pavan Deolasee wrote: On Mon, Nov 26, 2012 at 9:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: We're about due for a new set of back-branch update releases. After some discussion among the

Re: [HACKERS] Upcoming back-branch releases

2012-11-26 Thread Andres Freund
On 2012-11-26 17:27:11 +0100, Magnus Hagander wrote: On Mon, Nov 26, 2012 at 5:21 PM, Andres Freund and...@2ndquadrant.com wrote: On 2012-11-26 21:35:05 +0530, Pavan Deolasee wrote: On Mon, Nov 26, 2012 at 9:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: We're about due for a new set of

Re: [HACKERS] 64 bit ints vs libpq-fe.h

2012-11-26 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: It's no longer possible to build pgadmin with libpq from git master: /opt/pgsql/inst-pg/head/include/libpq-fe.h:551:8: error: ‘pg_int64’ does not name a type [ scratches head ... ] That should be typedef'd in postgres_ext.h.

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Andrew Dunstan
On 11/26/2012 10:55 AM, Robert Haas wrote: On Wed, Nov 21, 2012 at 3:16 PM, Andrew Dunstan and...@dunslane.net wrote: Non-builtin types are now searched for a cast to json, and if it exists it is used instead of the type's text representation. I didn't add a special type to look for a cast to,

Re: [HACKERS] 64 bit ints vs libpq-fe.h

2012-11-26 Thread Magnus Hagander
On Mon, Nov 26, 2012 at 5:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: It's no longer possible to build pgadmin with libpq from git master: /opt/pgsql/inst-pg/head/include/libpq-fe.h:551:8: error: ‘pg_int64’ does not name a type [ scratches head ... ]

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Robert Haas
On Mon, Nov 26, 2012 at 11:43 AM, Andrew Dunstan and...@dunslane.net wrote: I don't understand why you would want to create such a cast. If the cast doesn't exist it will do exactly what it does now, i.e. use the type's output function and then json quote and escape it, which in the case of

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Merlin Moncure
On Thu, Nov 22, 2012 at 4:54 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Andrew Dunstan and...@dunslane.net writes: Here is a WIP patch for enhancements to json generation. First, there is the much_requested json_agg, which will aggregate rows directly to json. So the following will

Re: [HACKERS] Suggestion for --truncate-tables to pg_restore

2012-11-26 Thread Robert Haas
On Wed, Nov 21, 2012 at 12:53 AM, Josh Kupershmidt schmi...@gmail.com wrote: TBH, I didn't find the example above particularly compelling for demonstrating the need for this feature. If you've just got one table with dependent views which needs to be restored, it's pretty easy to manually

Re: [HACKERS] [WIP] pg_ping utility

2012-11-26 Thread Bruce Momjian
On Mon, Nov 26, 2012 at 10:26:27AM -0500, Peter Eisentraut wrote: On 11/23/12 9:48 AM, Michael Paquier wrote: We waited a couple of days for feedback for this feature. So based on all the comments provided by everybody on this thread, perhaps we should move on and implement the options that

Re: [HACKERS] Upcoming back-branch releases

2012-11-26 Thread Alvaro Herrera
Andres Freund escribió: On 2012-11-26 17:27:11 +0100, Magnus Hagander wrote: On Mon, Nov 26, 2012 at 5:21 PM, Andres Freund and...@2ndquadrant.com wrote: I have submitted a proposed fix for it friday:

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Peter Eisentraut
On 11/21/12 3:16 PM, Andrew Dunstan wrote: One open question regarding this feature is whether this should return NULL or '[]' for 0 rows. Currently it returns NULL but I could be convinced to return '[]', and the change would be very small. Although my intuition would be [], the existing

Re: Use of fsync; was Re: [HACKERS] Pg_upgrade speed for many tables

2012-11-26 Thread Bruce Momjian
On Sat, Nov 24, 2012 at 09:42:08PM -0800, Jeff Janes wrote: On Fri, Nov 23, 2012 at 7:22 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Nov 19, 2012 at 12:11:26PM -0800, Jeff Janes wrote: Yes, it is with synchronous_commit=off. (or if it wasn't originally, it is now, with the same

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Hannu Krosing
On 11/26/2012 08:12 PM, Peter Eisentraut wrote: On 11/21/12 3:16 PM, Andrew Dunstan wrote: One open question regarding this feature is whether this should return NULL or '[]' for 0 rows. Currently it returns NULL but I could be convinced to return '[]', and the change would be very small.

Re: [HACKERS] WIP: index support for regexp search

2012-11-26 Thread Alexander Korotkov
On Mon, Nov 26, 2012 at 4:55 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Great, that top-level comment helped tremendously! I feel enlightened. I fixed some spelling, formatting etc. trivial stuff while reading through the patch, see attached. Below is some feedback on the details:

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Andrew Dunstan
On 11/26/2012 02:46 PM, Hannu Krosing wrote: On 11/26/2012 08:12 PM, Peter Eisentraut wrote: On 11/21/12 3:16 PM, Andrew Dunstan wrote: One open question regarding this feature is whether this should return NULL or '[]' for 0 rows. Currently it returns NULL but I could be convinced to return

Re: [HACKERS] WIP json generation enhancements: fk-tree-to-json()

2012-11-26 Thread Hannu Krosing
On 11/22/2012 11:54 AM, Dimitri Fontaine wrote: Andrew Dunstan and...@dunslane.net writes: Here is a WIP patch for enhancements to json generation. First, there is the much_requested json_agg, which will aggregate rows directly to json. So the following will now work: select

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Tom Lane
Hannu Krosing ha...@2ndquadrant.com writes: In some previous mail Tom Lane claimed that by SQL standard either an array of all NULLs or a record with all fields NULLs (I don't remember which) is also considered NULL. If this is true, then an empty array - which can be said to consist of

Re: [HACKERS] Removing PD_ALL_VISIBLE

2012-11-26 Thread Jeff Davis
On Sun, 2012-11-25 at 22:30 -0500, Tom Lane wrote: I'd be worried about the case of a lot of sessions touching a lot of unrelated tables. This change implies doubling the number of buffers that are held pinned by any given query, and the distributed overhead from that (eg, adding cycles to

Re: [HACKERS] WIP json generation enhancements : strange IS NULL behaviour

2012-11-26 Thread Hannu Krosing
On 11/26/2012 09:05 PM, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: In some previous mail Tom Lane claimed that by SQL standard either an array of all NULLs or a record with all fields NULLs (I don't remember which) is also considered NULL. If this is true, then an empty array -

Re: [HACKERS] WIP json generation enhancements : strange IS NULL behaviour

2012-11-26 Thread Tom Lane
Hannu Krosing ha...@2ndquadrant.com writes: On 11/26/2012 09:05 PM, Tom Lane wrote: The analogy to other aggregates is probably a better thing to argue from. On the other hand, I don't know anyone outside the SQL standards committee who thinks it's actually a good idea that SUM() across no

Re: [HACKERS] Removing PD_ALL_VISIBLE

2012-11-26 Thread Robert Haas
On Mon, Nov 26, 2012 at 3:29 PM, Jeff Davis pg...@j-davis.com wrote: Your intuition here is better than mine, but I am still missing something here. If we keep the buffer pinned, then there will be very few pin/unpin cycles here, so I don't see where the contention would come from (any more

Re: [HACKERS] WIP json generation enhancements

2012-11-26 Thread Robert Haas
On Mon, Nov 26, 2012 at 3:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: The analogy to other aggregates is probably a better thing to argue from. On the other hand, I don't know anyone outside the SQL standards committee who thinks it's actually a good idea that SUM() across no rows returns null

Re: [HACKERS] Removing PD_ALL_VISIBLE

2012-11-26 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Sun, 2012-11-25 at 22:30 -0500, Tom Lane wrote: Another possibly important point is that reducing the number of pin/unpin cycles for a given VM page might actually hurt the chances of it being found in shared buffers, because IIRC the usage_count is

Re: [HACKERS] support for LDAP URLs

2012-11-26 Thread Alvaro Herrera
Peter Eisentraut wrote: Here is a patch to support RFC 2255 LDAP URLs in pg_hba.conf. So, instead of, say host ... ldap ldapserver=ldap.example.net ldapbasedn=dc=example, dc=net ldapsearchattribute=uid you could write host ... ldap

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Kevin Grittner
Marko Tiikkaja wrote: On 15/11/2012 03:28, Kevin Grittner wrote: I have been testing the patch a bit Thanks! and I'm slightly disappointed by the fact that it still doesn't solve this problem (and I apologize if I have missed discussion about this in the docs or in this thread): assume

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Kevin Grittner
David Fetter wrote: On Mon, Nov 26, 2012 at 09:46:33AM -0500, Peter Eisentraut wrote: So, the way I understand it, in Oracle terms, this feature is a snapshot, not a materialized view. Maybe that's what it should be called then. Snapshot is one of the options for refreshing an Oracle

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread David Fetter
On Mon, Nov 26, 2012 at 04:34:36PM -0500, Kevin Grittner wrote: David Fetter wrote: On Mon, Nov 26, 2012 at 09:46:33AM -0500, Peter Eisentraut wrote: So, the way I understand it, in Oracle terms, this feature is a snapshot, not a materialized view. Maybe that's what it should be called

Re: [HACKERS] Re: Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-26 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2012-10-31 11:41:37 +0530, Amit Kapila wrote: There seems to be a problem in behavior of Create Index Concurrently and Hot Update in HEAD code . At pgcon.it I had a chance to discuss with Simon how to fix this bug. Please check the attached

Re: [HACKERS] Suggestion for --truncate-tables to pg_restore

2012-11-26 Thread Karl O. Pinc
On 11/26/2012 12:06:56 PM, Robert Haas wrote: On Wed, Nov 21, 2012 at 12:53 AM, Josh Kupershmidt schmi...@gmail.com wrote: TBH, I didn't find the example above particularly compelling for demonstrating the need for this feature. If you've just got one table with dependent views which

Re: [HACKERS] Removing PD_ALL_VISIBLE

2012-11-26 Thread Jeff Davis
On Mon, 2012-11-26 at 16:10 -0500, Tom Lane wrote: There's still the issue of whether the IOS code is safe in machines with weak memory ordering. I think that it probably is safe, but the argument for it in the current code comment is wrong; most likely, a correct argument has to depend on

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-26 Thread Bruce Momjian
On Wed, Nov 14, 2012 at 10:08:15AM -0500, Bruce Momjian wrote: I agree that parallel restore for schemas is a hard problem. But I didn't mean parallelism within the restore, I meant that we could start both postmasters and pipe the output from dump directly to restore. This way the times

Re: [HACKERS] New statistics for WAL buffer dirty writes

2012-11-26 Thread Alvaro Herrera
Satoshi Nagayasu escribió: I attached the latest one, which splits the reset_time for bgwriter and walwriter, and provides new system view, called pg_stat_walwriter, to show the dirty write counter and the reset time. Thanks. I gave this a look and I have a couple of comments: 1. The

Re: [HACKERS] Suggestion for --truncate-tables to pg_restore

2012-11-26 Thread Robert Haas
On Mon, Nov 26, 2012 at 4:51 PM, Karl O. Pinc k...@meme.com wrote: Where I would like to go with this is to first introduce, as a new patch, an ALTER TABLE option to disable a constraint. Something like ALTER TABLE foo UNVALIDATE CONSTRAINT constraintname; This doesn't really make sense,

Re: [HACKERS] Removing PD_ALL_VISIBLE

2012-11-26 Thread Merlin Moncure
On Mon, Nov 26, 2012 at 3:03 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Nov 26, 2012 at 3:29 PM, Jeff Davis pg...@j-davis.com wrote: Your intuition here is better than mine, but I am still missing something here. If we keep the buffer pinned, then there will be very few pin/unpin

Re: [HACKERS] Failing SSL connection due to weird interaction with openssl

2012-11-26 Thread Alvaro Herrera
Lars Kanis wrote: While investigating a ruby-pg issue [1], we noticed that a libpq SSL connection can fail, if the running application uses OpenSSL for other work, too. Root cause is the thread local error queue of OpenSSL, that is used to transmit textual error messages to the application

Re: [HACKERS] Further pg_upgrade analysis for many tables

2012-11-26 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Testing pg_dump for 4k tables (16 seconds) shows the first row is not output by pg_dump until 15 seconds, meaning there can't be any parallelism with a pipe. (Test script attached.) Does anyone know how to get pg_dump to send some output earlier? You

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread Peter Eisentraut
On Mon, 2012-11-26 at 09:46 -0500, Peter Eisentraut wrote: On 11/14/12 9:28 PM, Kevin Grittner wrote: 17. Since the data viewed in an MV is not up-to-date with the latest committed transaction, So, the way I understand it, in Oracle terms, this feature is a snapshot, not a

Re: [HACKERS] Suggestion for --truncate-tables to pg_restore

2012-11-26 Thread Josh Kupershmidt
On Mon, Nov 26, 2012 at 3:42 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Nov 26, 2012 at 4:51 PM, Karl O. Pinc k...@meme.com wrote: P.S. An outstanding question regards --truncate-tables is whether it should drop indexes before truncate and re-create them after restore. Sounds like

Re: [HACKERS] Failing SSL connection due to weird interaction with openssl

2012-11-26 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: I gather that this is supposed to be back-patched to all supported branches. FWIW, I don't like that patch any better than Robert does. It seems as likely to do harm as good. If there are places where libpq itself is leaving entries on the error

Re: [HACKERS] Suggestion for --truncate-tables to pg_restore

2012-11-26 Thread Karl O. Pinc
On 11/26/2012 08:45:08 PM, Josh Kupershmidt wrote: On Mon, Nov 26, 2012 at 3:42 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Nov 26, 2012 at 4:51 PM, Karl O. Pinc k...@meme.com wrote: P.S. An outstanding question regards --truncate-tables is whether it should drop indexes before

Re: [HACKERS] Re: Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-26 Thread Tom Lane
I wrote: I'm a bit inclined to think that DROP INDEX CONCURRENTLY should have an additional step that somehow marks the pg_index row in a new way that makes RelationGetIndexList ignore it, and then wait out existing transactions before taking the final step of dropping the index. The Right

Re: [HACKERS] Bugs in CREATE/DROP INDEX CONCURRENTLY

2012-11-26 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2012-10-05 19:56:40 -0400, Tom Lane wrote: I think this could possibly be fixed by using nontransactional update-in-place when we're trying to change indisvalid and/or indisready, but I've not really thought through the details. I couldn't

Re: [HACKERS] Suggestion for --truncate-tables to pg_restore

2012-11-26 Thread Karl O. Pinc
On 11/26/2012 09:30:48 PM, Karl O. Pinc wrote: On 11/26/2012 08:45:08 PM, Josh Kupershmidt wrote: It is a common administrative task to selectively restore some existing tables' contents from a backup, and IIRC was the impetus for this patch. Yes. (And aside from listing tables

Re: [HACKERS] [WIP] pg_ping utility

2012-11-26 Thread Peter Eisentraut
On Mon, 2012-11-26 at 13:14 -0500, Bruce Momjian wrote: I would normally agree with this analysis, but pg_ctl -w certainly need this ping functionality, so it kind of makes sense that others might need it too. Sure, PQping is useful for this very specific use case of seeing whether the server

Re: [HACKERS] Transform mapped XPath expressions into XML containing relational data

2012-11-26 Thread Peter Eisentraut
On Mon, 2012-11-26 at 09:26 -0800, Thangalin wrote: Is it possible to build an XML (or JSON) document using a map database columns to XPath expressions? For example: rootpeople person person person.first_name - name/first person.last_name - name/last

Re: [HACKERS] Re: Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-26 Thread Michael Paquier
On Tue, Nov 27, 2012 at 12:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: I'm a bit inclined to think that DROP INDEX CONCURRENTLY should have an additional step that somehow marks the pg_index row in a new way that makes RelationGetIndexList ignore it, and then wait out existing

Re: [HACKERS] Materialized views WIP patch

2012-11-26 Thread David Rowley
-Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers- ow...@postgresql.org] On Behalf Of Peter Eisentraut Sent: 27 November 2012 13:35 To: Kevin Grittner Cc: Pgsql Hackers Subject: Re: [HACKERS] Materialized views WIP patch On Mon, 2012-11-26 at 09:46

Re: [HACKERS] Re: Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-26 Thread Pavan Deolasee
On Tue, Nov 27, 2012 at 9:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Either state of indcheckxmin is valid with all three of these combinations, so the specific kluge I was contemplating above doesn't work. But there is no valid reason for an index to be in this state: indisvalid

[HACKERS] ilist.h fails cpluspluscheck

2012-11-26 Thread Peter Eisentraut
In file included from ./src/include/utils/catcache.h:25:0, from /tmp/cpluspluscheck.bt8VZr/test.cpp:3: src/include/lib/ilist.h: In function ‘dlist_node* dlist_head_node(dlist_head*)’: src/include/lib/ilist.h:470:39: error: invalid conversion from ‘void*’ to ‘dlist_node*’

Re: [HACKERS] Re: Problem Observed in behavior of Create Index Concurrently and Hot Update

2012-11-26 Thread Tom Lane
Pavan Deolasee pavan.deola...@gmail.com writes: On Tue, Nov 27, 2012 at 9:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: Either state of indcheckxmin is valid with all three of these combinations, so the specific kluge I was contemplating above doesn't work. But there is no valid reason for an

Re: [HACKERS] ilist.h fails cpluspluscheck

2012-11-26 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: In file included from ./src/include/utils/catcache.h:25:0, from /tmp/cpluspluscheck.bt8VZr/test.cpp:3: src/include/lib/ilist.h: In function ‘dlist_node* dlist_head_node(dlist_head*)’: src/include/lib/ilist.h:470:39: error: invalid