Re: [HACKERS] Streaming base backups

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 01:28, Cédric Villemain cedric.villemain.deb...@gmail.com wrote: 2011/1/10 Magnus Hagander mag...@hagander.net: On Sun, Jan 9, 2011 at 23:33, Cédric Villemain cedric.villemain.deb...@gmail.com wrote: I've committed the backend side of this, without that. Still working

[HACKERS] Re: [COMMITTERS] pgsql: Set process title to indicate base backup is running

2011-01-11 Thread Heikki Linnakangas
On 10.01.2011 22:54, Magnus Hagander wrote: Set process title to indicate base backup is running It would be good to reset it after the base backup is finished.. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [COMMITTERS] pgsql: Set process title to indicate base backup is running

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 09:50, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 10.01.2011 22:54, Magnus Hagander wrote: Set process title to indicate base backup is running It would be good to reset it after the base backup is finished.. Good point, fixed. --  Magnus

[HACKERS] WIP: RangeTypes

2011-01-11 Thread Jeff Davis
Ok, I have made some progress. This is still a proof-of-concept patch, but the important pieces are working together. Synopsis: CREATE TYPE numrange AS RANGE (SUBTYPE=numeric, SUBTYPE_CMP=numeric_cmp); SELECT range_eq('[1,2.2)'::numrange,'[1,2.2]'); SELECT

Re: [HACKERS] SQL/MED - file_fdw

2011-01-11 Thread Shigeru HANADA
On Mon, 10 Jan 2011 19:26:11 -0500 Tom Lane t...@sss.pgh.pa.us wrote: Shigeru HANADA han...@metrosystems.co.jp writes: For the purpose of file_fdw, additional ResetCopyFrom() would be necessary. I'm planning to include such changes in file_fdw patch. Please find attached partial patch for

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Simon Riggs
On Sun, 2011-01-09 at 16:59 -0500, Noah Misch wrote: This begins the patch series for the design I recently proposed[1] for avoiding some table rewrites in ALTER TABLE ... ALTER COLUMN ... TYPE. I'm posting these patches today: These sound very good. I have a concern that by making the

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Tatsuo Ishii
On Fri, Jan 7, 2011 at 6:28 PM, Florian Pflug f...@phlo.org wrote: I forgot about sequences earlier. If we dump while someone deletes all rows and resets the sequence the dump might contain rows and still reset the sequence. This could cause duplicate key errors on restore. I haven't checked

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Koichi Suzuki
At present, XC does not seem to need locks to maintain cluster-wide integrity because it is maintained centrally in GTM. If application needs to do this, for example, to synchronize between different clusters, XC needs this capability obviously. -- Koichi Suzuki 2011/1/11 Tatsuo Ishii

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 02:24, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 10, 2011 at 10:41 AM, Simon Riggs si...@2ndquadrant.com wrote: I think we need a status enum. ('BACKUP', 'CATCHUP', 'STREAM') for the 3 phases of replication. That seems reasonable. But if we keep BACKUP

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 4:46 AM, Tatsuo Ishii is...@postgresql.org wrote: On Fri, Jan 7, 2011 at 6:28 PM, Florian Pflug f...@phlo.org wrote: I forgot about sequences earlier. If we dump while someone deletes all rows and resets the sequence the dump might contain rows and still reset the

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 5:28 AM, Magnus Hagander mag...@hagander.net wrote: Does this seem correct? It looks reasonable, except that I the way you've chosen to capitalize the wal sender states makes me want to shoot myself. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The

Re: [HACKERS] Compatibility GUC for serializable

2011-01-11 Thread Florian Pflug
On Jan10, 2011, at 23:56 , Kevin Grittner wrote: The proposed GUC would suppress the monitoring in SERIALIZABLE mode and avoid the new serialization failures, thereby providing legacy behavior -- anomalies and all. After posting that I realized that there's no technical reason that such a

Re: [HACKERS] pl/python custom exceptions for SPI

2011-01-11 Thread Jan Urbański
On 11/01/11 01:27, Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: On 10.1.2011 17:20, Jan Urbański wrote: I changed that patch to use Perl instead of sed to generate the exceptions, which should be a more portable. Why not python ? Because we're not adding even more

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Robert Haas
On Mon, Jan 10, 2011 at 8:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Jan 10, 2011 at 7:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: My point is that this isn't a bug fix, it's more like moving the goalposts on what getObjectDescription is supposed

Re: [HACKERS] Error code for terminating connection due to conflict with recovery

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 1:30 AM, Tatsuo Ishii is...@postgresql.org wrote: On Sat, Jan 8, 2011 at 9:52 AM, Tatsuo Ishii is...@postgresql.org wrote: While looking at the backend code, I realized that error code for terminating connection due to conflict with recovery is ERRCODE_ADMIN_SHUTDOWN.

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Simon Riggs
On Tue, 2011-01-11 at 11:28 +0100, Magnus Hagander wrote: (You'd need a 4th mode for WAITING or so, to indicate it's waiting for a command) That's something different. The 3 phases are more concrete. BACKUP -- CATCHUP--- STREAM When you connect you either do

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Tatsuo Ishii
On Tue, Jan 11, 2011 at 4:46 AM, Tatsuo Ishii is...@postgresql.org wrote: On Fri, Jan 7, 2011 at 6:28 PM, Florian Pflug f...@phlo.org wrote: I forgot about sequences earlier. If we dump while someone deletes all rows and resets the sequence the dump might contain rows and still reset the

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Robert Haas
On Sun, Jan 9, 2011 at 4:59 PM, Noah Misch n...@leadboat.com wrote: This begins the patch series for the design I recently proposed[1] for avoiding some table rewrites in ALTER TABLE ... ALTER COLUMN ... TYPE.  I'm posting these patches today: 0 - new test cases This doesn't look right.

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 6:31 AM, Tatsuo Ishii is...@postgresql.org wrote: For query based replication tools like pgpool-II (I don't know any other tools, for example Postgres XC falls in this category or not...), we need to be able to lock sequences. Fortunately it is allowed to: SELECT 1

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 12:17, Robert Haas robertmh...@gmail.com wrote: On Tue, Jan 11, 2011 at 5:28 AM, Magnus Hagander mag...@hagander.net wrote: Does this seem correct? It looks reasonable, except that I the way you've chosen to capitalize the wal sender states makes me want to shoot

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 12:23, Simon Riggs si...@2ndquadrant.com wrote: On Tue, 2011-01-11 at 11:28 +0100, Magnus Hagander wrote: (You'd need a 4th mode for WAITING or so, to indicate it's waiting for a command) That's something different. The 3 phases are more concrete.

Re: [HACKERS] Compatibility GUC for serializable

2011-01-11 Thread Florian Pflug
On Jan10, 2011, at 20:29 , Josh Berkus wrote: The only reason I'm ambivalent about this is I'm unsure that there are more than a handful of people using SERIALIZABLE in production applications, precisely because it's been so unintuitive in the past. I've used it quite extensively in the past.

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Simon Riggs
On Tue, 2011-01-11 at 12:41 +0100, Magnus Hagander wrote: Just to be clear, you're objecting to the *name* of the state, right, not how/where it's set? Yes In particular, how the catchup/streaming things are set? You've set it in the right places. I would personally constrain the state

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 12:58, Simon Riggs si...@2ndquadrant.com wrote: On Tue, 2011-01-11 at 12:41 +0100, Magnus Hagander wrote: Just to be clear, you're objecting to the *name* of the state, right, not how/where it's set? Yes In particular, how the catchup/streaming things are set?

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Noah Misch
On Tue, Jan 11, 2011 at 09:24:46AM +, Simon Riggs wrote: On Sun, 2011-01-09 at 16:59 -0500, Noah Misch wrote: This begins the patch series for the design I recently proposed[1] for avoiding some table rewrites in ALTER TABLE ... ALTER COLUMN ... TYPE. I'm posting these patches

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Simon Riggs
On Tue, 2011-01-11 at 13:04 +0100, Magnus Hagander wrote: On Tue, Jan 11, 2011 at 12:58, Simon Riggs si...@2ndquadrant.com wrote: On Tue, 2011-01-11 at 12:41 +0100, Magnus Hagander wrote: Just to be clear, you're objecting to the *name* of the state, right, not how/where it's set? Yes

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 13:18, Simon Riggs si...@2ndquadrant.com wrote: On Tue, 2011-01-11 at 13:04 +0100, Magnus Hagander wrote: On Tue, Jan 11, 2011 at 12:58, Simon Riggs si...@2ndquadrant.com wrote: On Tue, 2011-01-11 at 12:41 +0100, Magnus Hagander wrote: Just to be clear, you're

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Noah Misch
On Tue, Jan 11, 2011 at 06:37:33AM -0500, Robert Haas wrote: On Sun, Jan 9, 2011 at 4:59 PM, Noah Misch n...@leadboat.com wrote: This begins the patch series for the design I recently proposed[1] for avoiding some table rewrites in ALTER TABLE ... ALTER COLUMN ... TYPE. ?I'm posting

Re: [HACKERS] Fwd: [TESTERS] [TEST REPORT] 9.1Alpha3 Feature E.1.4.7.2 in release notes.

2011-01-11 Thread Peter Eisentraut
On tis, 2011-01-11 at 12:30 +0900, Itagaki Takahiro wrote: On Tue, Jan 11, 2011 at 11:10, Tom Lane t...@sss.pgh.pa.us wrote: Itagaki Takahiro itagaki.takah...@gmail.com writes: It was reported from a tester that we don't have casts of money from/to integer types even though we have

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 7:14 AM, Noah Misch n...@leadboat.com wrote: I have a concern that by making the ALTER TABLE more complex that we might not be able to easily tell if a rewrite happens, or not. Perhaps we should add a WITHOUT REWRITE clause? That would allow a user to specify that they

Re: [HACKERS] SSI patch version 8

2011-01-11 Thread Anssi Kääriäinen
On 01/10/2011 06:03 PM, Kevin Grittner wrote: Due to popular request (Hey, David's popular, right?), I'm posting a patch for Serializable Snapshot Isolation (SSI), although I don't yet have everything in it that I was planning on submitting before the CF. I will probably be submitting another

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Simon Riggs
On Tue, 2011-01-11 at 07:14 -0500, Noah Misch wrote: These changes do make it harder to guess how much work the ALTER TABLE will do. Indeed, about 1/4 of my own guesses prior to writing were wrong. Something like WITHOUT REWRITE might be the way to go, though there are more questions: if it

[HACKERS] PGCon 2011 Call for Papers - reminder

2011-01-11 Thread Dan Langille
A reminder about PGCon 2011; the deadline is 19 January 2011. PGCon 2011 will be held 19-20 May 2011, in Ottawa at the University of Ottawa. It will be preceded by two days of tutorials on 17-18 May 2011. We are now accepting proposals for talks. Proposals can be quite simple. We do not

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Noah Misch
On Tue, Jan 11, 2011 at 12:37:28PM +, Simon Riggs wrote: On Tue, 2011-01-11 at 07:14 -0500, Noah Misch wrote: These changes do make it harder to guess how much work the ALTER TABLE will do. Indeed, about 1/4 of my own guesses prior to writing were wrong. Something like WITHOUT

Re: [HACKERS] Add function dependencies

2011-01-11 Thread Peter Eisentraut
On mån, 2011-01-10 at 23:59 +0100, Joel Jacobson wrote: It would be equally useful if it warned you when trying to drop a function other functions might depend on. This would only work for a small subset of cases, so the argument can be made that it is less surprising to say, we don't track

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Noah Misch
On Tue, Jan 11, 2011 at 07:27:46AM -0500, Robert Haas wrote: On Tue, Jan 11, 2011 at 7:14 AM, Noah Misch n...@leadboat.com wrote: True. ?At least we could completely document the lock choices on the ALTER TABLE reference page. ?The no-rewrite cases are defined at arms length from ALTER

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Simon Riggs
On Tue, 2011-01-11 at 08:06 -0500, Noah Misch wrote: On Tue, Jan 11, 2011 at 12:37:28PM +, Simon Riggs wrote: On Tue, 2011-01-11 at 07:14 -0500, Noah Misch wrote: These changes do make it harder to guess how much work the ALTER TABLE will do. Indeed, about 1/4 of my own guesses

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Joel Jacobson
2011/1/11 Robert Haas robertmh...@gmail.com: I don't get it.  If two different items that exist in the system out of the box have the same description, it seems clear that relevant piece of disambiguating information exists nowhere in the description string. I guess it is a question of

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Noah Misch
On Tue, Jan 11, 2011 at 01:17:23PM +, Simon Riggs wrote: On Tue, 2011-01-11 at 08:06 -0500, Noah Misch wrote: On Tue, Jan 11, 2011 at 12:37:28PM +, Simon Riggs wrote: Given your thoughts above, my preference would be for EXPLAIN ALTER TABLE to describe the actions that will take

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Robert Haas
On Jan 11, 2011, at 8:25 AM, Joel Jacobson j...@gluefinance.com wrote: 2011/1/11 Robert Haas robertmh...@gmail.com: I don't get it. If two different items that exist in the system out of the box have the same description, it seems clear that relevant piece of disambiguating information exists

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Robert Haas
On Jan 11, 2011, at 8:50 AM, Noah Misch n...@leadboat.com wrote: Okay; I'll see what I can come up with. The other part I was going to try to finish before the last commitfest begins is avoiding unnecessary rebuilds of indexes involving changed columns. Is that more or less important than

Re: [HACKERS] SSI patch version 8

2011-01-11 Thread Anssi Kääriäinen
On 01/10/2011 06:03 PM, Kevin Grittner wrote: Due to popular request (Hey, David's popular, right?), I'm posting a patch for Serializable Snapshot Isolation (SSI), although I don't yet have everything in it that I was planning on submitting before the CF. I will probably be submitting another

Re: [HACKERS] ALTER TYPE 0: Introduction; test cases

2011-01-11 Thread Csaba Nagy
On Tue, 2011-01-11 at 07:14 -0500, Noah Misch wrote: On Tue, Jan 11, 2011 at 09:24:46AM +, Simon Riggs wrote: I have a concern that by making the ALTER TABLE more complex that we might not be able to easily tell if a rewrite happens, or not. What about add EXPLAIN support to it, then

Re: [HACKERS] SSI patch version 8

2011-01-11 Thread Kevin Grittner
Anssi Kääriäinenanssi.kaariai...@thl.fi wrote: A speed test showing a significant drop in performance when using SSI: hot2= create table test_t2 as (select generate_series(0, 100)); hot2= \timing begin transaction isolation level repeatable read; Time: 0.185 ms hot2= select count(*)

Re: [HACKERS] SSI patch version 8

2011-01-11 Thread Kevin Grittner
Anssi Kääriäinenanssi.kaariai...@thl.fi wrote: I think I found a problem. This is using SSI v8. Thanks much for testing. You're managing to exercise some code paths I didn't think to test, which is great! I guess this is the up side of having posted yesterday. :-) So, something seems to

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Jan Urbański
On 28/12/10 12:25, Jan Urbański wrote: Here's the basic errcodes.txt file and three scripts to generate errcodes.h, plerrcodes.h and part of errcodes.sgml. I tried wiring it into the build system, but failed, I can't figure out which Makefiles should be updated in order to make errcodes.h

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Joel Jacobson j...@gluefinance.com writes: I instead propose we introduce a new function named pg_get_object_unique_identifier( classid oid, objid oid, objsubid integer ) returns text. Seems like concatenating the OIDs would accomplish that. (If you think not, well, you still haven't

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mar ene 11 10:52:12 -0300 2011: Well, we shouldn't change them randomly or arbitrarily, but improving them is another thing altogether. I think the contention that any user or application anywhere is depending on the exact textual representation of a

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Joel Jacobson
2011/1/11 Tom Lane t...@sss.pgh.pa.us: Seems like concatenating the OIDs would accomplish that.  (If you think not, well, you still haven't explained what problem you're trying to solve...) The can be different in two different databases sharing the same original schema, but of two different

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jan 11, 2011 at 4:46 AM, Tatsuo Ishii is...@postgresql.org wrote: For query based replication tools like pgpool-II (I don't know any other tools, for example Postgres XC falls in this category or not...), we need to be able to lock sequences.

Re: [HACKERS] SSI patch version 8

2011-01-11 Thread Anssi Kääriäinen
On 01/11/2011 04:53 PM, Kevin Grittner wrote: Thanks much for testing. You're managing to exercise some code paths I didn't think to test, which is great! I guess this is the up side of having posted yesterday. :-) Glad that I can help. This feature is something that is very important to

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Florian Pflug
On Jan11, 2011, at 16:12 , Tom Lane wrote: Joel Jacobson j...@gluefinance.com writes: I instead propose we introduce a new function named pg_get_object_unique_identifier( classid oid, objid oid, objsubid integer ) returns text. Seems like concatenating the OIDs would accomplish that. (If

Re: [HACKERS] casts: max double precision text double precision fails with out or range error

2011-01-11 Thread Alvaro Herrera
Excerpts from Maciej Sakrejda's message of mar ene 11 03:28:13 -0300 2011: Tried asking this in pgsql-general but I got no response, so I thought I'd give hackers a shot: postgres=# select (((1.7976931348623157081e+308)::double precision)::text)::double precision; ERROR:

[HACKERS] pg_depend explained

2011-01-11 Thread Joel Jacobson
Has anyone written a in-depth description on how to traverse the pg_depend tree? The 'a' and 'i' deptype really makes it hard to figure out the dependency order, a topological sort does not work. My latest attempt involved trying to group by all objects connected to each other via deptype 'a' or

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Garick Hamlin
On Mon, Jan 10, 2011 at 09:09:28AM -0500, Magnus Hagander wrote: On Sun, Jan 9, 2011 at 23:33, Cédric Villemain cedric.villemain.deb...@gmail.com wrote: 2011/1/7 Magnus Hagander mag...@hagander.net: On Fri, Jan 7, 2011 at 01:47, Cédric Villemain cedric.villemain.deb...@gmail.com wrote:

Re: [HACKERS] Add function dependencies

2011-01-11 Thread Dimitri Fontaine
Peter Eisentraut pete...@gmx.net writes: Making it work for language SQL would be nice, though. Please consider a new DEPENDENCY_XXX constant for that though, because otherwise I think it could cause problems in the extension's dependency tracking. Even with a new DEPENDENCY_FUNCALL or other

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jan 10, 2011 at 8:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Not really.  AFAIR, there are two cases that exist in practice, depending on which AM you're talking about: 1. The recorded types match the input types of the operator/function  

Re: [HACKERS] Fwd: [TESTERS] [TEST REPORT] 9.1Alpha3 Feature E.1.4.7.2 in release notes.

2011-01-11 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-01-11 at 12:30 +0900, Itagaki Takahiro wrote: If we won't to add accept integers for money, we should fix the docs. | integer and floating-point string literals |~~~ Will it get better? I think

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= wulc...@wulczer.org writes: I tried wiring it into the build system, but failed, I can't figure out which Makefiles should be updated in order to make errcodes.h and plerrcodes.h generated headers. Could someone help with that? Trying a bit harder to make

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Florian Pflug f...@phlo.org writes: @OP: Wouldn't it be sufficient to provide such a thing for structure objects that people are actually going to modify on a regular basis? Yeah, I still don't see the need to argue over whether the elements of an operator class are uniquely identifiable or

Re: [HACKERS] pg_depend explained

2011-01-11 Thread Tom Lane
Joel Jacobson j...@gluefinance.com writes: Has anyone written a in-depth description on how to traverse the pg_depend tree? Try reading the code in src/backend/catalog/dependency.c. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Cédric Villemain
2011/1/11 Garick Hamlin gham...@isc.upenn.edu: On Mon, Jan 10, 2011 at 09:09:28AM -0500, Magnus Hagander wrote: On Sun, Jan 9, 2011 at 23:33, Cédric Villemain cedric.villemain.deb...@gmail.com wrote: 2011/1/7 Magnus Hagander mag...@hagander.net: On Fri, Jan 7, 2011 at 01:47, Cédric

Re: [HACKERS] pg_depend explained

2011-01-11 Thread Joel Jacobson
2011/1/11 Tom Lane t...@sss.pgh.pa.us: Try reading the code in src/backend/catalog/dependency.c. I've tried but failed to figure it out anyway. The focus in dependency.c is to find out dependencies of a given object. What I want to do is something slighly different. I need to figure out the

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Joel Jacobson j...@gluefinance.com writes: 2011/1/11 Tom Lane t...@sss.pgh.pa.us: Seems like concatenating the OIDs would accomplish that.  (If you think not, well, you still haven't explained what problem you're trying to solve...) The can be different in two different databases sharing the

Re: [HACKERS] pg_depend explained

2011-01-11 Thread Tom Lane
Joel Jacobson j...@gluefinance.com writes: I need to figure out the order of creation of all objects, not just the dependencies for a single object. In that case try pg_dump's pg_dump_sort.c. You will never get the order of creation of objects, because that isn't tracked; but you can find out

Re: [HACKERS] Fwd: [TESTERS] [TEST REPORT] 9.1Alpha3 Feature E.1.4.7.2 in release notes.

2011-01-11 Thread Peter Eisentraut
On tis, 2011-01-11 at 11:03 -0500, Tom Lane wrote: We explicitly rejected the idea of providing direct casts to/from floating point types, on the grounds of not wanting any roundoff error; so I don't think this is a point that should be revisited. We also explicitly chose floating point as

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Garick Hamlin
On Tue, Jan 11, 2011 at 11:39:20AM -0500, Cédric Villemain wrote: 2011/1/11 Garick Hamlin gham...@isc.upenn.edu: On Mon, Jan 10, 2011 at 09:09:28AM -0500, Magnus Hagander wrote: On Sun, Jan 9, 2011 at 23:33, Cédric Villemain cedric.villemain.deb...@gmail.com wrote: 2011/1/7 Magnus

Re: [HACKERS] pg_depend explained

2011-01-11 Thread Florian Pflug
On Jan11, 2011, at 16:54 , Joel Jacobson wrote: Has anyone written a in-depth description on how to traverse the pg_depend tree? The 'a' and 'i' deptype really makes it hard to figure out the dependency order, a topological sort does not work. Could you give an example of the kind of trouble

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Florian Pflug
On Jan11, 2011, at 18:09 , Garick Hamlin wrote: My gut was that direct io would likely work right on Linux and Solaris, at least. Didn't we discover recently that O_DIRECT fails for ext4 on linux if ordered=data, or something like that? best regards, Florian Pflug -- Sent via pgsql-hackers

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Cédric Villemain
2011/1/11 Garick Hamlin gham...@isc.upenn.edu: On Tue, Jan 11, 2011 at 11:39:20AM -0500, Cédric Villemain wrote: 2011/1/11 Garick Hamlin gham...@isc.upenn.edu: On Mon, Jan 10, 2011 at 09:09:28AM -0500, Magnus Hagander wrote: On Sun, Jan 9, 2011 at 23:33, Cédric Villemain

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Jeff Davis
On Mon, 2011-01-10 at 11:50 -0600, Kevin Grittner wrote: I'm trying not to panic here, but I haven't looked at 2PC before yesterday and am just dipping into the code to support it, and time is short. Can anyone give me a pointer to anything I should read before I dig through the 2PC code,

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Jan Urbański
On 11/01/11 17:11, Tom Lane wrote: =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= wulc...@wulczer.org writes: I tried wiring it into the build system, but failed, I can't figure out which Makefiles should be updated in order to make errcodes.h and plerrcodes.h generated headers. Could someone help with

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Tom Lane
Florian Pflug f...@phlo.org writes: On Jan11, 2011, at 18:09 , Garick Hamlin wrote: My gut was that direct io would likely work right on Linux and Solaris, at least. Didn't we discover recently that O_DIRECT fails for ext4 on linux if ordered=data, or something like that? Quite. Blithe

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= wulc...@wulczer.org writes: On 11/01/11 17:11, Tom Lane wrote: Huh? Why in the world would the specific location of the #include have anything to do with the problem? I'v having a hard time convincing make to generate errcodes.h before compiling any .c file

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Florian Pflug
On Jan10, 2011, at 18:50 , Kevin Grittner wrote: I'm trying not to panic here, but I haven't looked at 2PC before yesterday and am just dipping into the code to support it, and time is short. Can anyone give me a pointer to anything I should read before I dig through the 2PC code, which might

[HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Heikki Linnakangas
Now that we have a basic over-the-wire base backup capability in walsender, it would be nice to allow taking multiple base backups at the same time. It might not seem very useful at first, but it makes it easier to set up standbys for small databases. At the moment, if you want to set up two

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Garick Hamlin
On Tue, Jan 11, 2011 at 12:45:02PM -0500, Tom Lane wrote: Florian Pflug f...@phlo.org writes: On Jan11, 2011, at 18:09 , Garick Hamlin wrote: My gut was that direct io would likely work right on Linux and Solaris, at least. Didn't we discover recently that O_DIRECT fails for ext4 on

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Kevin Grittner
Florian Pflug f...@phlo.org wrote: On Jan10, 2011, at 18:50 , Kevin Grittner wrote: I'm trying not to panic here, but I haven't looked at 2PC before yesterday and am just dipping into the code to support it, and time is short. Can anyone give me a pointer to anything I should read before I

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Kevin Grittner
Jeff Davis pg...@j-davis.com wrote: I don't expect this to be a huge roadblock for the feature though. It seems fairly contained. I haven't read the 2PC code either, but I don't expect that you'll need to change the rest of your algorithm just to support it. Agreed; but I am starting to

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Heikki Linnakangas
On 11.01.2011 20:08, Florian Pflug wrote: Unfortunately, it seems that doing things this way will undermine the guarantee that retrying a failed SSI transaction won't fail due to the same conflict as it did originally. Consider T1 BEGIN TRANSACTION ISOLATION SERIALIZABLE T1 SELECT * FROM T T1

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Kevin Grittner
Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 11.01.2011 20:08, Florian Pflug wrote: Unfortunately, it seems that doing things this way will undermine the guarantee that retrying a failed SSI transaction won't fail due to the same conflict as it did originally. Consider T1

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Andreas Karlsson
On Tue, 2011-01-11 at 11:43 -0500, Tom Lane wrote: If that's what you're after, getObjectDescription is entirely unsuitable, because of the fact that its results are dependent on search path and language settings. regards, tom lane Agreed, and as long as the additional

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Florian Pflug
On Jan11, 2011, at 19:41 , Heikki Linnakangas wrote: On 11.01.2011 20:08, Florian Pflug wrote: Unfortunately, it seems that doing things this way will undermine the guarantee that retrying a failed SSI transaction won't fail due to the same conflict as it did originally. Consider T1

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: I implemented this in two ways, and can't decide which I like better: 1. The contents of the backup label file are returned to the caller of do_pg_start_backup() as a palloc'd string. 2. do_pg_start_backup() creates a temporary

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 19:51, Tom Lane t...@sss.pgh.pa.us wrote: Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: I implemented this in two ways, and can't decide which I like better: 1. The contents of the backup label file are returned to the caller of do_pg_start_backup() as

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Andreas Karlsson andr...@proxel.se writes: So would anyone be confused by a description of pg_amproc not including the types? It really shouldn't be useful to include those. Attend what it says in the fine manual for CREATE OPERATOR CLASS: In a FUNCTION clause, the operand data

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Heikki Linnakangas
On 11.01.2011 20:51, Tom Lane wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: I implemented this in two ways, and can't decide which I like better: 1. The contents of the backup label file are returned to the caller of do_pg_start_backup() as a palloc'd string. 2.

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Josh Berkus
It makes it very convenient to set up standbys, without having to worry that you'll conflict e.g with a nightly backup. I don't imagine people will use streaming base backups for very large databases anyway. Also, imagine that you're provisioning a 10-node replication cluster on EC2. This

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Jan 11, 2011 at 19:51, Tom Lane t...@sss.pgh.pa.us wrote: Seems like either one of these is fairly problematic in that you have to have some monstrous kluge to get the backup_label file to appear with the right name in the tarfile.  How badly

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Heikki Linnakangas
On 11.01.2011 20:17, Heikki Linnakangas wrote: Patches for both approaches attached. They're also available in my github repository at g...@github.com:hlinnaka/postgres.git. Just so people won't report the same issues again, a couple of bugs have already cropped up (thanks Magnus): * a

Re: [HACKERS] WIP: RangeTypes

2011-01-11 Thread David Fetter
On Tue, Jan 11, 2011 at 01:16:47AM -0800, Jeff Davis wrote: Ok, I have made some progress. This is still a proof-of-concept patch, but the important pieces are working together. Synopsis: CREATE TYPE numrange AS RANGE (SUBTYPE=numeric, SUBTYPE_CMP=numeric_cmp); SELECT

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Dimitri Fontaine
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Now that we have a basic over-the-wire base backup capability in walsender, it would be nice to allow taking multiple base backups at the same time. I would prefer to be able to take a base backup from a standby, or is that already

Re: [HACKERS] DISCARD ALL ; stored procedures

2011-01-11 Thread Alvaro Herrera
Excerpts from Stephen Frost's message of vie ene 07 15:29:52 -0300 2011: * Stephen Frost (sfr...@snowman.net) wrote: * Robert Haas (robertmh...@gmail.com) wrote: Making it part of DISCARD PLANS; and back-patching it to 8.3 where DISCARD was introduced would be awesome for me. :)

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Heikki Linnakangas
On 11.01.2011 21:50, Dimitri Fontaine wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: Now that we have a basic over-the-wire base backup capability in walsender, it would be nice to allow taking multiple base backups at the same time. I would prefer to be able to take a

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Jeff Davis
On Tue, 2011-01-11 at 20:17 +0200, Heikki Linnakangas wrote: So, this patch modifies the internal do_pg_start/stop_backup functions so that in addition to the traditional mode of operation, where a backup_label file is created in the data directory where it's backed up along with all other

Re: [HACKERS] autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

2011-01-11 Thread Jan Urbański
On 11/01/11 18:59, Tom Lane wrote: =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= wulc...@wulczer.org writes: On 11/01/11 17:11, Tom Lane wrote: Huh? Why in the world would the specific location of the #include have anything to do with the problem? I'v having a hard time convincing make to generate

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Heikki Linnakangas
On 11.01.2011 22:16, Jeff Davis wrote: On Tue, 2011-01-11 at 20:17 +0200, Heikki Linnakangas wrote: So, this patch modifies the internal do_pg_start/stop_backup functions so that in addition to the traditional mode of operation, where a backup_label file is created in the data directory where

Re: [HACKERS] Add function dependencies

2011-01-11 Thread Peter Eisentraut
On tis, 2011-01-11 at 16:57 +0100, Dimitri Fontaine wrote: Peter Eisentraut pete...@gmx.net writes: Making it work for language SQL would be nice, though. Please consider a new DEPENDENCY_XXX constant for that though, because otherwise I think it could cause problems in the extension's

Re: [HACKERS] [PERFORM] pgbench to the MAXINT

2011-01-11 Thread Euler Taveira de Oliveira
Em 10-01-2011 05:25, Greg Smith escreveu: Euler Taveira de Oliveira wrote: Em 07-01-2011 22:59, Greg Smith escreveu: setrandom: invalid maximum number -2147467296 It is failing at atoi() circa pgbench.c:1036. But it just the first one. There are some variables and constants that need to be

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Jeff Davis
On Tue, 2011-01-11 at 22:56 +0200, Heikki Linnakangas wrote: 1. If it's a primary recovering from a crash, and there is a backup_label file, and the WAL referenced in the backup_label exists, then it does a bunch of extra work during recovery; and 2. In the same situation, if the WAL

  1   2   >