Re: [HACKERS] Streaming base backups

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 01:28, Cédric Villemain wrote: > 2011/1/10 Magnus Hagander : >> On Sun, Jan 9, 2011 at 23:33, Cédric Villemain >> wrote: >> I've committed the backend side of this, without that. Still working >> on the client, and on cleaning up Heikki's patch for grammar/parser >> suppor

[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 (pgsql-hackers@postgres

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 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 Hagander  Me: http://www.hagander.

[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 range_lbound('(3.7,9]'::numr

Re: [HACKERS] SQL/MED - file_fdw

2011-01-11 Thread Shigeru HANADA
On Mon, 10 Jan 2011 19:26:11 -0500 Tom Lane wrote: > Shigeru HANADA 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 ResetCopyFrom(). Is there > > anythin

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

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Tatsuo Ishii
> On Fri, Jan 7, 2011 at 6:28 PM, Florian Pflug 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 if th

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 wrote: > On Mon, Jan 10, 2011 at 10:41 AM, Simon Riggs 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 in there, should we >

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 4:46 AM, Tatsuo Ishii wrote: >> On Fri, Jan 7, 2011 at 6:28 PM, Florian Pflug 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 d

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 5:28 AM, Magnus Hagander 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 Enterprise PostgreSQL Compan

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 >

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 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 different tool r

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Robert Haas
On Mon, Jan 10, 2011 at 8:56 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Jan 10, 2011 at 7:52 PM, Tom Lane wrote: >>> My point is that this isn't a bug fix, it's more like moving the >>> goalposts on what getObjectDescription is supposed to do. > >> I think that adding the types to the

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 wrote: >> On Sat, Jan 8, 2011 at 9:52 AM, Tatsuo Ishii wrote: >>> While looking at the backend code, I realized that error code for >>> "terminating connection due to conflict with recovery" is >>> ERRCODE_ADMIN_SHUTDOWN. >>> >>> I thought the error c

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<--->

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Tatsuo Ishii
> On Tue, Jan 11, 2011 at 4:46 AM, Tatsuo Ishii wrote: >>> On Fri, Jan 7, 2011 at 6:28 PM, Florian Pflug 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 c

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 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. You might

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Robert Haas
On Tue, Jan 11, 2011 at 6:31 AM, Tatsuo Ishii 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 FROM foo_

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 12:17, Robert Haas wrote: > On Tue, Jan 11, 2011 at 5:28 AM, Magnus Hagander 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. Hah, I was waiting for that. I

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 12:23, Simon Riggs 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

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 pa

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 stat

Re: [HACKERS] system views for walsender activity

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 12:58, Simon Riggs 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? > > You've se

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 >

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 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 wrote: > On Tue, 2011-01-11 at 13:04 +0100, Magnus Hagander wrote: >> On Tue, Jan 11, 2011 at 12:58, Simon Riggs 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 stat

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 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 > > pa

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 wrote: > > Itagaki Takahiro writes: > >> It was reported from a tester that we don't have casts of money from/to > >> integer > >> types even though we have from/to numeric type. > > > > In most

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 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 do not

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 ve

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

[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 requi

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 de

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 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 > > TABLE, and

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 g

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Joel Jacobson
2011/1/11 Robert Haas : > 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 prioritization. If backw

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 wi

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Robert Haas
On Jan 11, 2011, at 8:25 AM, Joel Jacobson wrote: > 2011/1/11 Robert Haas : >> 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 >> stri

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

2011-01-11 Thread Robert Haas
On Jan 11, 2011, at 8:50 AM, Noah Misch 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 having > an EXPLAI

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 ve

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äinen 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(*) from test_t2;

Re: [HACKERS] SSI patch version 8

2011-01-11 Thread Kevin Grittner
Anssi Kääriäinen 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 be broken when using

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.

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Joel Jacobson 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 explained what problem you

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 : > 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 versions. In this

Re: [HACKERS] LOCK for non-tables

2011-01-11 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 11, 2011 at 4:46 AM, Tatsuo Ishii 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: >> >>

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 our

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Florian Pflug
On Jan11, 2011, at 16:12 , Tom Lane wrote: > Joel Jacobson 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 n

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: "1.7976931348

[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 > wrote: > > 2011/1/7 Magnus Hagander : > >> On Fri, Jan 7, 2011 at 01:47, Cédric Villemain > >> wrote: > >>> 2011/1/5 Magnus Hagander : > On Wed, Jan 5, 2011 at 22:58, Dimitri F

Re: [HACKERS] Add function dependencies

2011-01-11 Thread Dimitri Fontaine
Peter Eisentraut 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 constant, the ext

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Robert Haas writes: > On Mon, Jan 10, 2011 at 8:56 PM, Tom Lane 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 >>   (btree & hash). >> 2. The recor

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 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 adding a

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==?= 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 src/include/utils

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Florian Pflug 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 not.

Re: [HACKERS] pg_depend explained

2011-01-11 Thread Tom Lane
Joel Jacobson 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 (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Cédric Villemain
2011/1/11 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 >> wrote: >> > 2011/1/7 Magnus Hagander : >> >> On Fri, Jan 7, 2011 at 01:47, Cédric Villemain >> >> wrote: >> >>> 2011/1/5 Magnus Hagander : >> On W

Re: [HACKERS] pg_depend explained

2011-01-11 Thread Joel Jacobson
2011/1/11 Tom Lane : > 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 order of creation of a

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Joel Jacobson writes: > 2011/1/11 Tom Lane : >> 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

Re: [HACKERS] pg_depend explained

2011-01-11 Thread Tom Lane
Joel Jacobson 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 what a safe order

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 : > > On Mon, Jan 10, 2011 at 09:09:28AM -0500, Magnus Hagander wrote: > >> On Sun, Jan 9, 2011 at 23:33, Cédric Villemain > >> wrote: > >> > 2011/1/7 Magnus Hagander : > >> >> On Fri, Jan 7, 2011 at 01:47,

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 trou

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-hacker

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Cédric Villemain
2011/1/11 Garick Hamlin : > On Tue, Jan 11, 2011 at 11:39:20AM -0500, Cédric Villemain wrote: >> 2011/1/11 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 >> >> wrote: >> >> > 2011/1/7 Magnus Hagander : >> >

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==?= 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? > >> Tr

Re: [HACKERS] Streaming base backups

2011-01-11 Thread Tom Lane
Florian Pflug 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 assertions

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==?= 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 that includes

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 mi

[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 st

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 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

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Kevin Grittner
Florian Pflug 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 dig th

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Kevin Grittner
Jeff Davis 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 get concerned ab

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 T

Re: [HACKERS] SSI and 2PC

2011-01-11 Thread Kevin Grittner
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> BEGIN TRANSACTION ISOL

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 additi

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 >>

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Tom Lane
Heikki Linnakangas 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 file that the backup label > is

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Magnus Hagander
On Tue, Jan 11, 2011 at 19:51, Tom Lane wrote: > Heikki Linnakangas 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

Re: [HACKERS] Bug in pg_describe_object

2011-01-11 Thread Tom Lane
Andreas Karlsson 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 type(s) the function i

Re: [HACKERS] Allowing multiple concurrent base backups

2011-01-11 Thread Heikki Linnakangas
On 11.01.2011 20:51, Tom Lane wrote: Heikki Linnakangas 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 tempora

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 writes: > On Tue, Jan 11, 2011 at 19:51, Tom Lane 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 do we actually need this? >> I

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 backu

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 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 possible? What about cascading t

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 Linnakangas 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 t

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 oth

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==?= 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 b

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 it

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 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 > t

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 co

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 th

  1   2   >