Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Dave Page
On Sun, Apr 29, 2012 at 11:20 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Simon Riggs's message of jue abr 26 11:10:09 -0300 2012: On Thu, Apr 26, 2012 at 1:41 PM, Simon Riggs si...@2ndquadrant.com wrote: I will also be organising a small-medium sized Future of In-Core

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Simon Riggs
On Mon, Apr 30, 2012 at 7:35 AM, Dave Page dp...@pgadmin.org wrote: On Sun, Apr 29, 2012 at 11:20 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Simon Riggs's message of jue abr 26 11:10:09 -0300 2012: On Thu, Apr 26, 2012 at 1:41 PM, Simon Riggs si...@2ndquadrant.com

Re: [HACKERS] smart shutdown at end of transaction (was: Default mode for shutdown)

2012-04-30 Thread Albe Laurenz
Tom Lane wrote: On Fri, Apr 27, 2012 at 7:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: No, I'm not happy with that. Smart shutdown is defined to not affect current sessions. I'm fine with having a fourth mode that acts as you suggest (and, probably, even with making it the default); but not

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-30 Thread Magnus Hagander
On Mon, Apr 30, 2012 at 02:23, Devrim GÜNDÜZ dev...@gunduz.org wrote: On Sun, 2012-04-29 at 13:23 +0100, Simon Riggs wrote: (As a side note, RPMs *may not* be ready, because I (and Magnus) will be at PGDay Turkey on 12th, and will be busy over the whole weekend). Is that a closed meeting?

Re: [HACKERS] smart shutdown at end of transaction (was: Default mode for shutdown)

2012-04-30 Thread Wolfgang Wilhelm
Just for the ones interested in a view on another turf: In Oracle shutdown immediate is the fastest _clean_ shutdown and shutdown abort is equal to shutdown immediate in PG. The other modes are called shutdown normal and shutdown transactional. Wolfgang

[HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Albe Laurenz
During ANALYZE, in analyze.c, functions compute_minimal_stats and compute_scalar_stats, values whose length exceed WIDTH_THRESHOLD (= 1024) are not used for calculating statistics other than that they are counted as too wide rows and assumed to be all different. This works fine with regular

Re: [HACKERS] enable_indexonly

2012-04-30 Thread Magnus Hagander
On Sat, Apr 28, 2012 at 17:41, Andrew Dunstan and...@dunslane.net wrote: On 04/27/2012 12:44 PM, Magnus Hagander wrote: Hmm. Forgive me, I pressed the wrong button and looked at current docs rather than dev docs. (Easier when they used to look different...) Maybe we should have the

Re: [HACKERS] [PATCH] Allow breaking out of hung connection attempts

2012-04-30 Thread Ryan Kelly
On Sun, Apr 29, 2012 at 10:12:40PM -0400, Alvaro Herrera wrote: Excerpts from Ryan Kelly's message of sáb ene 14 16:22:21 -0300 2012: I have attached a new patch which handles the connect_timeout option by adding a PQconnectTimeout(conn) function to access the connect_timeout which I

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Atri Sharma
On Mon, Apr 30, 2012 at 12:39 PM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Apr 30, 2012 at 7:35 AM, Dave Page dp...@pgadmin.org wrote: On Sun, Apr 29, 2012 at 11:20 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Simon Riggs's message of jue abr 26 11:10:09 -0300

Re: [HACKERS] smart shutdown at end of transaction (was: Default mode for shutdown)

2012-04-30 Thread Greg Stark
On Mon, Apr 30, 2012 at 9:55 AM, Wolfgang Wilhelm wolfgang20121...@yahoo.de wrote: Just for the ones interested in a view on another turf: In Oracle shutdown immediate is the fastest _clean_ shutdown and shutdown abort is equal to shutdown immediate in PG. The other modes are called shutdown

Re: [HACKERS] [PATCH] Allow breaking out of hung connection attempts

2012-04-30 Thread Alvaro Herrera
Excerpts from Ryan Kelly's message of lun abr 30 07:10:14 -0400 2012: On Sun, Apr 29, 2012 at 10:12:40PM -0400, Alvaro Herrera wrote: Excerpts from Ryan Kelly's message of sáb ene 14 16:22:21 -0300 2012: I have attached a new patch which handles the connect_timeout option by adding

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: During ANALYZE, in analyze.c, functions compute_minimal_stats and compute_scalar_stats, values whose length exceed WIDTH_THRESHOLD (= 1024) are not used for calculating statistics other than that they are counted as too wide rows and assumed to be

Re: [HACKERS] default_transaction_isolation = serializable causes crash under Hot Standby

2012-04-30 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Simon Riggs si...@2ndquadrant.com wrote: * throw a WARNING if serializable is stated in other cases, and downgrade the request to repeatable read I think this would be reasonable, but it's still my second choice. The advantage of throwing an ERROR

Re: [HACKERS] default_transaction_isolation = serializable causes crash under Hot Standby

2012-04-30 Thread Robert Haas
On Mon, Apr 30, 2012 at 10:26 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: Simon Riggs si...@2ndquadrant.com wrote: * throw a WARNING if serializable is stated in other cases, and downgrade the request to repeatable read I think this would

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Albe Laurenz
Tom Lane wrote: During ANALYZE, in analyze.c, functions compute_minimal_stats and compute_scalar_stats, values whose length exceed WIDTH_THRESHOLD (= 1024) are not used for calculating statistics other than that they are counted as too wide rows and assumed to be all different. This works

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-30 Thread Greg Stark
On Sun, Apr 29, 2012 at 12:26 AM, Robert Haas robertmh...@gmail.com wrote: As for track_iotiming - track_io_timing, I'm fine with that as well. I'm still grumpy about the idea of a GUC changing the explain analyze output. How would people feel about adding an explain option that explicitly

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-30 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Sun, Apr 29, 2012 at 12:26 AM, Robert Haas robertmh...@gmail.com wrote: As for track_iotiming - track_io_timing, I'm fine with that as well. I'm still grumpy about the idea of a GUC changing the explain analyze output. How would people feel about adding an

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: Tom Lane wrote: I'm fairly skeptical that this is a real problem, and would prefer not to complicate wrappers until we see some evidence from the field that it's worth worrying about. If I have a table with 10 rows and

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Simon Riggs
On Mon, Apr 30, 2012 at 3:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: Albe Laurenz laurenz.a...@wien.gv.at writes: During ANALYZE, in analyze.c, functions compute_minimal_stats and compute_scalar_stats, values whose length exceed WIDTH_THRESHOLD (= 1024) are not used for calculating statistics

Re: [HACKERS] [PATCH] Allow breaking out of hung connection attempts

2012-04-30 Thread Ryan Kelly
On Mon, Apr 30, 2012 at 09:02:33AM -0400, Alvaro Herrera wrote: Excerpts from Ryan Kelly's message of lun abr 30 07:10:14 -0400 2012: On Sun, Apr 29, 2012 at 10:12:40PM -0400, Alvaro Herrera wrote: Excerpts from Ryan Kelly's message of sáb ene 14 16:22:21 -0300 2012: I have

[HACKERS] Typo in access/transam/xlog.c

2012-04-30 Thread Peter Geoghegan
Within access/transam/xlog.c , the following comment has an obvious error: * (This should not be called for for synchronous commits.) -- Peter Geoghegan       http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Noah Misch
On Mon, Apr 30, 2012 at 12:27:45PM +0200, Albe Laurenz wrote: During ANALYZE, in analyze.c, functions compute_minimal_stats and compute_scalar_stats, values whose length exceed WIDTH_THRESHOLD (= 1024) are not used for calculating statistics other than that they are counted as too wide rows

[HACKERS] Torn page hazard in ginRedoUpdateMetapage()

2012-04-30 Thread Noah Misch
When GIN changes a metapage, we WAL-log its ex-header content and never use a backup block. This reduces WAL volume since the vast majority of the metapage is unused. However, ginRedoUpdateMetapage() only restores the WAL-logged content if the metapage LSN predates the WAL record LSN. If a

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Bruce Momjian
On Thu, Apr 26, 2012 at 01:41:33PM +0100, Simon Riggs wrote: Some people have talked about the need for multi-master replication, whereby 2+ databases communicate changes to one another. This topic has been discussed in some depth in Computer Science academic papers, most notably, The Dangers

Re: [HACKERS] Patch: add conversion from pg_wchar to multibyte

2012-04-30 Thread Robert Haas
On Sun, Apr 29, 2012 at 8:12 AM, Erik Rijkers e...@xs4all.nl wrote: Perhaps I'm too early with these tests, but FWIW I reran my earlier test program against three instances.  (the patches compiled fine, and make check was without problem). These tests results seem to be more about the pg_trgm

Re: [HACKERS] precision and scale functions for numeric

2012-04-30 Thread Robert Haas
On Sun, Apr 29, 2012 at 1:51 PM, Peter Eisentraut pete...@gmx.net wrote: I didn't find a good way to find out how many digits a numeric value has or things like whether a numeric value is an integer.  (I had to go through bc(1) for the latter.)  Functions like precision() and scale() would

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Merlin Moncure
On Mon, Apr 30, 2012 at 12:38 PM, Bruce Momjian br...@momjian.us wrote: For example, you said that MM replication alone is not a solution for large data or the general case.  Why is that?  Is the goal of your work really to do logical replciation, which allows for major version upgrades?  Is

Re: [HACKERS] Torn page hazard in ginRedoUpdateMetapage()

2012-04-30 Thread Tom Lane
Noah Misch n...@leadboat.com writes: When GIN changes a metapage, we WAL-log its ex-header content and never use a backup block. This reduces WAL volume since the vast majority of the metapage is unused. However, ginRedoUpdateMetapage() only restores the WAL-logged content if the metapage

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Albe Laurenz
Simon Riggs wrote: During ANALYZE, in analyze.c, functions compute_minimal_stats and compute_scalar_stats, values whose length exceed WIDTH_THRESHOLD (= 1024) are not used for calculating statistics other than that they are counted as too wide rows and assumed to be all different. This

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Albe Laurenz
Tom Lane wrote: I'm fairly skeptical that this is a real problem, and would prefer not to complicate wrappers until we see some evidence from the field that it's worth worrying about. If I have a table with 10 rows and default_statistics_target at 100, then a sample of 3 rows will be

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Simon Riggs
On Mon, Apr 30, 2012 at 6:38 PM, Bruce Momjian br...@momjian.us wrote: I would love to see a layout of exactly where these things make sense, similar to what we do at the bottom of our documentation for High Availability, Load Balancing, and Replication:        

Re: [HACKERS] Analyzing foreign tables memory problems

2012-04-30 Thread Albe Laurenz
Noah Misch wrote: During ANALYZE, in analyze.c, functions compute_minimal_stats and compute_scalar_stats, values whose length exceed WIDTH_THRESHOLD (= 1024) are not used for calculating statistics other than that they are counted as too wide rows and assumed to be all different. This

Re: [HACKERS] precision and scale functions for numeric

2012-04-30 Thread David Johnston
-Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers- ow...@postgresql.org] On Behalf Of Robert Haas Sent: Monday, April 30, 2012 2:20 PM To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: [HACKERS] precision and scale functions for numeric I think

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Robert Haas
On Mon, Apr 30, 2012 at 2:33 PM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Apr 30, 2012 at 12:38 PM, Bruce Momjian br...@momjian.us wrote: For example, you said that MM replication alone is not a solution for large data or the general case.  Why is that?  Is the goal of your work really

Re: [HACKERS] precision and scale functions for numeric

2012-04-30 Thread Robert Haas
On Mon, Apr 30, 2012 at 3:33 PM, David Johnston pol...@yahoo.com wrote: -Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers- ow...@postgresql.org] On Behalf Of Robert Haas Sent: Monday, April 30, 2012 2:20 PM To: Peter Eisentraut Cc: pgsql-hackers

Re: [HACKERS] precision and scale functions for numeric

2012-04-30 Thread Kevin Grittner
David Johnston pol...@yahoo.com wrote: I think you could test for integer-ness by testing whether val % 0 = 0. Modulus is a division function anything % 0 results in a division-by-zero It seems pretty clear that he meant % 1. test=# select '1.01'::numeric % 1; ?column? --

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Bruce Momjian
On Mon, Apr 30, 2012 at 07:55:00PM +0100, Simon Riggs wrote: On Mon, Apr 30, 2012 at 6:38 PM, Bruce Momjian br...@momjian.us wrote: I would love to see a layout of exactly where these things make sense, similar to what we do at the bottom of our documentation for High Availability, Load

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: The other half of the changes - applying the updates - is relatively straightforward, and it wouldn't bother me to leave that in user-land, especially in the MMR case, where you have to deal with conflict resolution rules that may be much simpler to

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Merlin Moncure
On Mon, Apr 30, 2012 at 2:38 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Apr 30, 2012 at 2:33 PM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Apr 30, 2012 at 12:38 PM, Bruce Momjian br...@momjian.us wrote: For example, you said that MM replication alone is not a solution for

Re: [HACKERS] Patch: add conversion from pg_wchar to multibyte

2012-04-30 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Hopefully that's not too hard to fix; the basic approach seems quite promising. After playing with trigram searches for name searches against copies of production database with appropriate indexing, our shop has chosen it as the new way to do name

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Josh Berkus
If we just had that much in core - that is, the ability to efficiently extra tuple inserts, updates, and deletes on a logical level - it would be much easier to build a good logical replication system around PostgreSQL than it is today, and the existing systems could be adapted to deliver

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Simon Riggs
On Mon, Apr 30, 2012 at 11:43 PM, Josh Berkus j...@agliodbs.com wrote: Well, this *is* the purpose of the cluster-hackers group Well, I tried all available means to discuss my ideas before organising an external meeting. You can think of the InCore meeting as an extension of the cluster hackers

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Josh Berkus
Well, this *is* the purpose of the cluster-hackers group Well, I tried all available means to discuss my ideas before organising an external meeting. You can think of the InCore meeting as an extension of the cluster hackers meeting if you wish. That comment wasn't for you, it was for

Re: [HACKERS] Future In-Core Replication

2012-04-30 Thread Tatsuo Ishii
Those are the basic requirements that I am trying to address. There are a great many important details, but the core of this is probably what I would call logical replication, that is shipping changes to other nodes in a way that does not tie us to the same physical representation that

[HACKERS] Call for Lightning Talks for pgCon

2012-04-30 Thread Josh Berkus
Hackers, users, pgCon attendees: You want to give a lightning talk at pgCon! Yes, you do. The fun, the glory, the laughter, the everlasting fame! These can all be yours. Be one of the ten brave and true who put together five minutes about PostgreSQL tools, experiences, forks, ideas, websites,