Re: [HACKERS] patch: shared session variables

2012-09-24 Thread Heikki Linnakangas
Having read through this thread, the consensus seems to be that we don't want this patch as it is (and I agree with that). As I understand it, you are trying to solve two problems: 1. Passing parameters to a DO statement. You could quote the parameters and inline them in the block itself in

Re: [HACKERS] [PATCH] lock_timeout and common SIGALRM framework

2012-09-24 Thread Boszormenyi Zoltan
2012-09-22 20:49 keltezéssel, Tom Lane írta: Boszormenyi Zoltan z...@cybertec.at writes: new version with a lot more cleanup is attached. I looked at this patch, and frankly I'm rather dismayed. It's a mess. Thank you for the kind words. :-) To start at the bottom level, the changes to

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Heikki Linnakangas
On 21.09.2012 00:10, Selena Deckelmann wrote: Hello! I've spent a little time with this patch and have attached revision 6. Thanks, Noah, for a fantastically detailed review. The only thing I didn't do that Noah suggested was run pgindent on guc-file.l. A cursory search did not reveal source

Re: [HACKERS] Patch for option in pg_resetxlog for restore from WAL files

2012-09-24 Thread Heikki Linnakangas
On 18.07.2012 16:47, Amit kapila wrote: Patch implementing the design in below mail chain is attached with this mail. This patch copies the ReadRecord() function and a bunch of related functions from xlog.c into pg_resetxlog.c. There's a separate patch in the current commitfest to make that

Re: [HACKERS] 64-bit API for large object

2012-09-24 Thread Nozomi Anzai
Here is 64-bit API for large object version 2 patch. I checked this patch. It can be applied onto the latest master branch without any problems. My comments are below. 2012/9/11 Tatsuo Ishii is...@postgresql.org: Ok, here is the patch to implement 64-bit API for large object, to allow to

Re: [HACKERS] Patch for option in pg_resetxlog for restore from WAL files

2012-09-24 Thread Amit Kapila
On Monday, September 24, 2012 2:30 PM Heikki Linnakangas wrote: On 18.07.2012 16:47, Amit kapila wrote: Patch implementing the design in below mail chain is attached with this mail. This patch copies the ReadRecord() function and a bunch of related functions from xlog.c into

[HACKERS] Re: [WIP] Performance Improvement by reducing WAL for Update Operation

2012-09-24 Thread Amit kapila
From: Heikki Linnakangas [mailto:heikki(dot)linnakangas(at)enterprisedb(dot)com] Sent: Monday, August 27, 2012 5:58 PM To: Amit kapila On 27.08.2012 15:18, Amit kapila wrote: I have implemented the WAL Reduction Patch for the case of HOT Update as pointed out by Simon and Robert. In this patch it

Re: [HACKERS] Proof of concept: auto updatable views [Review of Patch]

2012-09-24 Thread Amit Kapila
On Sunday, September 23, 2012 12:33 AM Dean Rasheed wrote: On 18 September 2012 14:23, Amit kapila amit.kap...@huawei.com wrote: Please find the review of the patch. Thanks for the review. Attached is an updated patch, and I've include some responses to specific review comments below.

[HACKERS] DROP INDEX CONCURRENTLY is not really concurrency safe leaves around undroppable indexes

2012-09-24 Thread Andres Freund
Hi, Problem 1: concurrency: Testcase: Session 1: CREATE TABLE test_drop_concurrently(id serial primary key, data int); INSERT INTO test_drop_concurrently(data) SELECT * FROM generate_series(1, 10); CREATE INDEX test_drop_concurrently_data ON test_drop_concurrently(data); BEGIN; EXPLAIN

Re: [HACKERS] DROP INDEX CONCURRENTLY is not really concurrency safe leaves around undroppable indexes

2012-09-24 Thread Andres Freund
On Monday, September 24, 2012 01:27:54 PM Andres Freund wrote: Problem 2: undroppable indexes: Session 1: CREATE TABLE test_drop_concurrently(id serial primary key, data int); CREATE INDEX test_drop_concurrently_data ON test_drop_concurrently(data); BEGIN; EXPLAIN ANALYZE SELECT * FROM

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Sun, Sep 23, 2012 at 06:46:33PM -0400, Peter Eisentraut wrote: On Sun, 2012-09-23 at 22:20 +0800, Rural Hunter wrote: Ah yes, seems I used a wrong parameter. The --locale='zh_CN.utf8' works. --locale='zh_CN.UTF8' also works. But still the question is, should the encoding name be case

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Peter Eisentraut
On 9/24/12 8:55 AM, Bruce Momjian wrote: I can confirm that pg_upgrade does case-insensitive comparisons of encoding/locale names: static void check_locale_and_encoding(ControlData *oldctrl, ControlData *newctrl) { /* These are

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 09:06:04AM -0400, Peter Eisentraut wrote: On 9/24/12 8:55 AM, Bruce Momjian wrote: I can confirm that pg_upgrade does case-insensitive comparisons of encoding/locale names: static void check_locale_and_encoding(ControlData *oldctrl,

[HACKERS] PostgreSQL in the French news

2012-09-24 Thread Fabien COELHO
Dear devs, For your information, PostgreSQL appears explicitely in the list of Free software cited by the French Prime Minister, Jean-Marc Ayrault, in his Circulaire (i.e. a kind of instruction to civil servants) signed last week. See on page 9 and 18 of the pdf (not the pages of the

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Rural Hunter
于 2012/9/24 20:55, Bruce Momjian 写道: On Sun, Sep 23, 2012 at 06:46:33PM -0400, Peter Eisentraut wrote: On Sun, 2012-09-23 at 22:20 +0800, Rural Hunter wrote: Ah yes, seems I used a wrong parameter. The --locale='zh_CN.utf8' works. --locale='zh_CN.UTF8' also works. But still the question is,

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I can confirm that pg_upgrade does case-insensitive comparisons of encoding/locale names: Or we could just remove dashes from the name before comparisons. That would merely move the breakage somewhere else. I think you are already assuming far too much

Re: [HACKERS] Caught up

2012-09-24 Thread Alvaro Herrera
Excerpts from Thom Brown's message of sáb sep 22 14:58:04 -0300 2012: On 3 September 2012 15:20, Bruce Momjian br...@momjian.us wrote: On a related note, I apologize that many of these items didn't make it into 9.2, though they are committed for 9.3. The good news is that most of my work

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: This seems pretty much ready to commit. One tiny detail that I'd like to clarify: the docs say: Multiple files within an include directory are ordered by an alphanumeric sorting, so that ones beginning with numbers are considered before

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 09:59:02PM +0800, Rural Hunter wrote: 于 2012/9/24 20:55, Bruce Momjian 写道: On Sun, Sep 23, 2012 at 06:46:33PM -0400, Peter Eisentraut wrote: On Sun, 2012-09-23 at 22:20 +0800, Rural Hunter wrote: Ah yes, seems I used a wrong parameter. The --locale='zh_CN.utf8' works.

Re: [HACKERS] Switching timeline over streaming replication

2012-09-24 Thread Amit Kapila
On Tuesday, September 11, 2012 10:53 PM Heikki Linnakangas wrote: I've been working on the often-requested feature to handle timeline changes over streaming replication. At the moment, if you kill the master and promote a standby server, and you have another standby server that you'd like to

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 10:13:45AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I can confirm that pg_upgrade does case-insensitive comparisons of encoding/locale names: Or we could just remove dashes from the name before comparisons. That would merely move the

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Mon, Sep 24, 2012 at 10:13:45AM -0400, Tom Lane wrote: FWIW, what I found out last time I touched this code is that on many systems setlocale doesn't bother to return a canonicalized spelling; it just gives back the string you gave it. It might be

Re: [HACKERS] Doc patch to note which system catalogs have oids

2012-09-24 Thread Karl O. Pinc
On 09/23/2012 10:14:33 PM, Tom Lane wrote: Karl O. Pinc k...@meme.com writes: The attached patch documents the oid column of those system catalogs having an oid. I think this is fundamentally wrong, or at least misleading, because it documents OID as if it were an ordinary column.

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Heikki Linnakangas
On 24.09.2012 17:24, Tom Lane wrote: Heikki Linnakangashlinnakan...@vmware.com writes: This seems pretty much ready to commit. One tiny detail that I'd like to clarify: the docs say: Multiple files within an include directory are ordered by an alphanumeric sorting, so that ones beginning

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Rural Hunter
于 2012/9/24 22:26, Bruce Momjian 写道: On Mon, Sep 24, 2012 at 09:59:02PM +0800, Rural Hunter wrote: 于 2012/9/24 20:55, Bruce Momjian 写道: On Sun, Sep 23, 2012 at 06:46:33PM -0400, Peter Eisentraut wrote: On Sun, 2012-09-23 at 22:20 +0800, Rural Hunter wrote: Ah yes, seems I used a wrong

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Well, if you run that query on template0 in the old and new cluster, you will see something different in the two of them. Could you have used default in one and a non-dash in the other. Did we change the way we canonicalize the locale between 9.1 and

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 11:24:04AM -0400, Peter Eisentraut wrote: On 9/24/12 10:13 AM, Tom Lane wrote: FWIW, what I found out last time I touched this code is that on many systems setlocale doesn't bother to return a canonicalized spelling; it just gives back the string you gave it. It

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 11:22:22AM -0400, Peter Eisentraut wrote: On 9/24/12 11:04 AM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Well, if you run that query on template0 in the old and new cluster, you will see something different in the two of them. Could you have used

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Alvaro Herrera
Excerpts from Daniele Varrazzo's message of dom sep 23 22:02:51 -0300 2012: On Mon, Sep 24, 2012 at 12:23 AM, Michael Paquier michael.paqu...@gmail.com wrote: As proposed by Masahiko, a single organization grouping all the tools (one repository per tool) would be enough. Please note that

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Mon, Sep 24, 2012 at 11:22:22AM -0400, Peter Eisentraut wrote: initdb has changed POSIX to C with glibc at least since 8.3. The code you're quoting is just a refactoring, AFAICT. Frankly, I assumed the values assigned in pg_database for template0

Re: [HACKERS] External Replication

2012-09-24 Thread Dimitri Fontaine
m...@rpzdesign.com m...@rpzdesign.com writes: You may want to consider changing the command TRIGGER into a command FILTER and possibly post processing TRIGGER that is determined to be called INSIDE the FILTER. Or some way to pass information between the FILTER and the post processing trigger.

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Peter Eisentraut
On 9/24/12 11:04 AM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Well, if you run that query on template0 in the old and new cluster, you will see something different in the two of them. Could you have used default in one and a non-dash in the other. Did we change the way we

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Roberto Mello
On Sat, Sep 22, 2012 at 3:25 AM, Satoshi Nagayasu sn...@uptime.jp wrote: To solve this problem, I would like to have some umbrella project. It would be called pg dba utils, or something like this. This umbrella project may contain several third-party tools (pg_reorg, pg_rman, pg_filedump,

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 11:04:32AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Well, if you run that query on template0 in the old and new cluster, you will see something different in the two of them. Could you have used default in one and a non-dash in the other. Did we

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Simon Riggs
On 21 September 2012 08:42, Michael Paquier michael.paqu...@gmail.com wrote: On Fri, Sep 21, 2012 at 1:00 PM, Hitoshi Harada umi.tan...@gmail.com wrote: I'm not familiar with pg_reorg, but I wonder why we need a separate program for this task. I know pg_reorg is ok as an external program

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Peter Eisentraut
On 9/24/12 10:13 AM, Tom Lane wrote: FWIW, what I found out last time I touched this code is that on many systems setlocale doesn't bother to return a canonicalized spelling; it just gives back the string you gave it. It might be worth doing what Peter suggests, just to be consistent with

Re: [HACKERS] External Replication

2012-09-24 Thread m...@rpzdesign.com
Dmitri: Thanks for the response. I am resigned to just patch each major release with my own pile of hook code that I can quickly graft into the code base, currently grafting 9.2.0. My strategy is to let the PG code base float around with all the work of the fine hackers on this list, maybe

[HACKERS] Re: DROP INDEX CONCURRENTLY is not really concurrency safe leaves around undroppable indexes

2012-09-24 Thread Simon Riggs
On 24 September 2012 06:27, Andres Freund and...@2ndquadrant.com wrote: Problem 1: concurrency: Problem 2: undroppable indexes: Thanks for posting. I'll think some more before replying. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 10:45:34PM +0800, Rural Hunter wrote: If your operating system locale/encoding names changed after the initdb of the old cluster, this would not be reflected in template0. No. It's not changed. look at my system settings: LANG=zh_CN.UTF-8 $ cat

Re: [HACKERS] XLogInsert scaling, revisited

2012-09-24 Thread Fujii Masao
On Fri, Sep 21, 2012 at 12:29 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I've been slowly continuing to work that I started last winder to make XLogInsert scale better. I have tried quite a few different approaches since then, and have settled on the attached. This is similar but not

Re: [HACKERS] [PoC] load balancing in libpq

2012-09-24 Thread Satoshi Nagayasu
2012/09/24 1:07, Christopher Browne wrote: We historically have connection pooling as an external thing; with the high degree to which people keep implementing and reimplementing this, I think *something* more than we have ought to be built in. This, with perhaps better implementation, might be

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Satoshi Nagayasu
2012/09/25 0:15, Simon Riggs wrote: On 21 September 2012 08:42, Michael Paquier michael.paqu...@gmail.com wrote: On Fri, Sep 21, 2012 at 1:00 PM, Hitoshi Harada umi.tan...@gmail.com wrote: I'm not familiar with pg_reorg, but I wonder why we need a separate program for this task. I know

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Mon, Sep 24, 2012 at 11:04:32AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Well, if you run that query on template0 in the old and new cluster, you will see something different in the two of them. Could you have used default in one and a non-dash in the other. Did we

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Christopher Browne
On Mon, Sep 24, 2012 at 10:17 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Excerpts from Daniele Varrazzo's message of dom sep 23 22:02:51 -0300 2012: On Mon, Sep 24, 2012 at 12:23 AM, Michael Paquier michael.paqu...@gmail.com wrote: As proposed by Masahiko, a single organization

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Gavin Flower
On 25/09/12 02:41, Heikki Linnakangas wrote: On 24.09.2012 17:24, Tom Lane wrote: Heikki Linnakangashlinnakan...@vmware.com writes: This seems pretty much ready to commit. One tiny detail that I'd like to clarify: the docs say: Multiple files within an include directory are ordered by an

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Noah Misch
On Thu, Sep 20, 2012 at 02:10:58PM -0700, Selena Deckelmann wrote: The only thing I didn't do that Noah suggested was run pgindent on guc-file.l. A cursory search did not reveal source compatible with my operating system for 'indent'. If someone points me to it, I'd happily also comply with

Re: [HACKERS] External Replication

2012-09-24 Thread Alvaro Herrera
Excerpts from m...@rpzdesign.com's message of lun sep 24 14:24:31 -0300 2012: And I have not seen anybody request my hook code but a few have responded that the are working on things in the code base, release date unknown. Well, typically that's not how our development works -- people here

Re: [HACKERS] [PATCH] lock_timeout and common SIGALRM framework

2012-09-24 Thread Boszormenyi Zoltan
Hi, 2012-09-22 20:49 keltezéssel, Tom Lane írta: Boszormenyi Zoltan z...@cybertec.at writes: new version with a lot more cleanup is attached. I looked at this patch, and frankly I'm rather dismayed. It's a mess. I hope you won't find this one a mess. I tried to address all your complaints.

Re: [HACKERS] [PoC] load balancing in libpq

2012-09-24 Thread Simon Riggs
On 23 September 2012 05:50, Satoshi Nagayasu sn...@uptime.jp wrote: I have just written the first PoC code to enable load balancing in the libpq library. This libpq enhancement is intended to allow PostgreSQL users to take advantage of the replication in easier way. With using this patch,

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Josh Berkus
For me, the Postgres user interface should include * REINDEX CONCURRENTLY I don't see why we don't have REINDEX CONCURRENTLY now. When I was writing out the instructions for today's update, I was thinking we already have all the commands for this. -- Josh Berkus PostgreSQL Experts Inc.

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Simon Riggs
On 24 September 2012 17:36, Josh Berkus j...@agliodbs.com wrote: For me, the Postgres user interface should include * REINDEX CONCURRENTLY I don't see why we don't have REINDEX CONCURRENTLY now. Same reason for everything on (anyone's) TODO list. Lack of vision is not holding us back, we

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Josh Berkus
On 9/24/12 3:43 PM, Simon Riggs wrote: On 24 September 2012 17:36, Josh Berkus j...@agliodbs.com wrote: For me, the Postgres user interface should include * REINDEX CONCURRENTLY I don't see why we don't have REINDEX CONCURRENTLY now. Same reason for everything on (anyone's) TODO list.

[HACKERS] Oid registry

2012-09-24 Thread Andrew Dunstan
This rather overdue mail arises out the developer's meeting back in May, where we discussed an item I raised suggesting an Oid registry. The idea came from some difficulties I encountered when I did the backport of the JSON work we did in 9.2 to 9.1, but has wider application. Say someone

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Andres Freund
On Tuesday, September 25, 2012 12:55:35 AM Josh Berkus wrote: On 9/24/12 3:43 PM, Simon Riggs wrote: On 24 September 2012 17:36, Josh Berkus j...@agliodbs.com wrote: For me, the Postgres user interface should include * REINDEX CONCURRENTLY I don't see why we don't have REINDEX

Re: [HACKERS] DROP INDEX CONCURRENTLY is not really concurrency safe leaves around undroppable indexes

2012-09-24 Thread Andres Freund
Hi, On Monday, September 24, 2012 01:27:54 PM Andres Freund wrote: Hi, Problem 1: concurrency: Testcase: Session 1: CREATE TABLE test_drop_concurrently(id serial primary key, data int); INSERT INTO test_drop_concurrently(data) SELECT * FROM generate_series(1, 10); CREATE INDEX

[HACKERS] Patch: incorrect array offset in backend replication tar header

2012-09-24 Thread Brian Weaver
While researching the way streaming replication works I was examining the construction of the tar file header. By comparing documentation on the tar header format from various sources I certain the following patch should be applied to so the group identifier is put into thee header properly.

Re: [HACKERS] PostgreSQL in the French news

2012-09-24 Thread Michael Paquier
On Mon, Sep 24, 2012 at 10:37 PM, Fabien COELHO coe...@cri.ensmp.fr wrote: Dear devs, For your information, PostgreSQL appears explicitely in the list of Free software cited by the French Prime Minister, Jean-Marc Ayrault, in his Circulaire (i.e. a kind of instruction to civil servants)

Re: [HACKERS] DROP INDEX CONCURRENTLY is not really concurrency safe leaves around undroppable indexes

2012-09-24 Thread Andres Freund
On Monday, September 24, 2012 01:37:59 PM Andres Freund wrote: On Monday, September 24, 2012 01:27:54 PM Andres Freund wrote: Problem 2: undroppable indexes: Session 1: CREATE TABLE test_drop_concurrently(id serial primary key, data int); CREATE INDEX test_drop_concurrently_data ON

Re: [HACKERS] Patch: incorrect array offset in backend replication tar header

2012-09-24 Thread Brian Weaver
Actually I found one other issue while continuing my investigation. The insertion of the 'ustar' and version '00' has the '00' version at the wrong offset. The patch is attached. -- Brian On Mon, Sep 24, 2012 at 7:51 PM, Brian Weaver cmdrcluel...@gmail.com wrote: While researching the way

Re: [HACKERS] Patch: incorrect array offset in backend replication tar header

2012-09-24 Thread Brian Weaver
Um I apologize for the third e-mail on the topic. It seems that my C coding is a bit rusty from years of neglect. No sooner had I hit the send button then I realized that trying to embed a null character in a string might not work, especially when it's followed by two consecutive zeros. Here

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Rural Hunter
于 2012/9/24 22:57, Bruce Momjian 写道: On Mon, Sep 24, 2012 at 10:45:34PM +0800, Rural Hunter wrote: If your operating system locale/encoding names changed after the initdb of the old cluster, this would not be reflected in template0. No. It's not changed. look at my system settings:

Re: [HACKERS] Doc patch to note which system catalogs have oids

2012-09-24 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: I think this is fundamentally wrong, or at least misleading, because it documents OID as if it were an ordinary column. Somebody who did select * from pg_class and didn't see any oid in the result would think the docs were wrong. Given that it's

Re: [HACKERS] Oid registry

2012-09-24 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: ... So the proposal is to have an Oid registry, in which authors could in effect reserve an Oid (or a couple of Oids) for a type. We would guarantee that these Oids would be reserved in just the same way Oids for builtins are reserved, and #define

Re: [HACKERS] Oid registry

2012-09-24 Thread Peter Eisentraut
On Mon, 2012-09-24 at 18:59 -0400, Andrew Dunstan wrote: This rather overdue mail arises out the developer's meeting back in May, where we discussed an item I raised suggesting an Oid registry. The idea came from some difficulties I encountered when I did the backport of the JSON work we

[HACKERS] plpgsql gram.y make rule

2012-09-24 Thread Peter Eisentraut
I wanted to refactor the highly redundant flex and bison rules throughout the source into common pattern rules. (Besides saving some redundant code, this could also help some occasionally flaky code in pgxs modules.) The only outlier that breaks this is in plpgsql pl_gram.c: gram.y I would

Re: [HACKERS] Patch: incorrect array offset in backend replication tar header

2012-09-24 Thread Tom Lane
Brian Weaver cmdrcluel...@gmail.com writes: While researching the way streaming replication works I was examining the construction of the tar file header. By comparing documentation on the tar header format from various sources I certain the following patch should be applied to so the group

Re: [HACKERS] plpgsql gram.y make rule

2012-09-24 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: I wanted to refactor the highly redundant flex and bison rules throughout the source into common pattern rules. (Besides saving some redundant code, this could also help some occasionally flaky code in pgxs modules.) The only outlier that breaks this

Re: [HACKERS] Patch: incorrect array offset in backend replication tar header

2012-09-24 Thread Brian Weaver
Tom, I'm still investigating and I have been looking at various sources. I have checked lots of pages on the web and I was just looking at the libarchive source from github. I found an interesting sequence in libarchive that implies that the 'ustar00\0' marks the header as GNU Tar format. Here

Re: [HACKERS] Oid registry

2012-09-24 Thread Andrew Dunstan
On 09/24/2012 09:37 PM, Peter Eisentraut wrote: On Mon, 2012-09-24 at 18:59 -0400, Andrew Dunstan wrote: This rather overdue mail arises out the developer's meeting back in May, where we discussed an item I raised suggesting an Oid registry. The idea came from some difficulties I encountered

Re: [HACKERS] Doc patch to note which system catalogs have oids

2012-09-24 Thread Karl O. Pinc
On 09/24/2012 09:38:53 AM, Karl O. Pinc wrote: On 09/23/2012 10:14:33 PM, Tom Lane wrote: Karl O. Pinc k...@meme.com writes: The attached patch documents the oid column of those system catalogs having an oid. I think this is fundamentally wrong, or at least misleading, because it

Re: [HACKERS] Patch: incorrect array offset in backend replication tar header

2012-09-24 Thread Tom Lane
Brian Weaver cmdrcluel...@gmail.com writes: Here are lines 321 through 329 of 'archive_read_support_format_tar.c' from libarchive 321 /* Recognize POSIX formats. */ 322 if ((memcmp(header-magic, ustar\0, 6) == 0) 323 (memcmp(header-version, 00, 2) == 0)) 324

Re: [HACKERS] pg_reorg in core?

2012-09-24 Thread Michael Paquier
On Tue, Sep 25, 2012 at 8:13 AM, Andres Freund and...@2ndquadrant.comwrote: On Tuesday, September 25, 2012 12:55:35 AM Josh Berkus wrote: On 9/24/12 3:43 PM, Simon Riggs wrote: On 24 September 2012 17:36, Josh Berkus j...@agliodbs.com wrote: For me, the Postgres user interface should

Re: [HACKERS] Oid registry

2012-09-24 Thread Andrew Dunstan
On 09/24/2012 09:24 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: ... So the proposal is to have an Oid registry, in which authors could in effect reserve an Oid (or a couple of Oids) for a type. We would guarantee that these Oids would be reserved in just the same way Oids

Re: [HACKERS] Doc patch to note which system catalogs have oids

2012-09-24 Thread Karl O. Pinc
On 09/24/2012 08:18:00 PM, Stephen Frost wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: It's possible that it's worth expending a boilerplate paragraph in each of those pages to say this catalog has OIDs (or that it doesn't). But this isn't the way. I'm afraid I disagree with this. The

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Bruce Momjian
On Tue, Sep 25, 2012 at 08:41:19AM +0800, Rural Hunter wrote: I think the problem is on the options when I installed pgsql(both 9.1 and 9.2) Select the locale to be used by the new database cluster. Locale [1] [Default locale] [2] C [3] POSIX [4] zh_CN.utf8 [5] zh_HK.utf8 [6]

Re: [HACKERS] Oid registry

2012-09-24 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 09/24/2012 09:24 PM, Tom Lane wrote: Another point to think about is that it's a few years too late to guarantee that any particular OID above 16384 is unused; we can't do that now without possibly breaking pg_upgrade-ability of existing

Re: [HACKERS] Oid registry

2012-09-24 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 09/24/2012 09:37 PM, Peter Eisentraut wrote: Could you fill the rest of us in with some technical details about why this might be necessary and what it aims to achieve? Well, an obvious case is how record_to_json handles fields. If it knows

Re: [HACKERS] Switching timeline over streaming replication

2012-09-24 Thread Amit Kapila
On Monday, September 24, 2012 9:08 PM m...@rpzdesign.com wrote: What a disaster waiting to happen. Maybe the only replication should be master-master replication so there is no need to sequence timelines or anything, all servers are ready masters, no backups or failovers. If you really do

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-09-24 Thread Rural Hunter
于 2012/9/25 11:00, Bruce Momjian 写道: On Tue, Sep 25, 2012 at 08:41:19AM +0800, Rural Hunter wrote: I think the problem is on the options when I installed pgsql(both 9.1 and 9.2) Select the locale to be used by the new database cluster. Locale [1] [Default locale] [2] C [3] POSIX [4]

Re: [HACKERS] Oid registry

2012-09-24 Thread Hitoshi Harada
On Mon, Sep 24, 2012 at 8:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.net writes: On 09/24/2012 09:37 PM, Peter Eisentraut wrote: Could you fill the rest of us in with some technical details about why this might be necessary and what it aims to achieve? Well, an

Re: [HACKERS] Doc patch to note which system catalogs have oids

2012-09-24 Thread Karl O. Pinc
On 09/23/2012 08:57:45 PM, Karl O. Pinc wrote: The attached patch documents the oid column of those system catalogs having an oid. Don't use the first version of this patch (oid_doc.patch) without discarding the last hunk. The last hunk introduces an error by duplicating the documentation of