Re: [HACKERS] FDW system columns

2012-02-28 Thread Shigeru Hanada
(2012/02/28 23:37), Kohei KaiGai wrote: > 2012年2月28日12:00 Shigeru Hanada: >> We have three options: >> >> a) remove all system columns (posted patch) >> b) remove system columns other than tableoid >> c) leave all system columns as is (current 9.2dev) >> >> Incidentally, views, which is very simila

Re: [HACKERS] a typo in json.h

2012-02-28 Thread Alvaro Herrera
Excerpts from Haifeng Liu's message of mar feb 28 23:31:26 -0300 2012: > Seems there is a trivial typo in json.h Thanks, fixed. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers maili

Re: [HACKERS] pg_upgrade --logfile option documentation

2012-02-28 Thread Bruce Momjian
On Tue, Feb 28, 2012 at 02:15:30PM -0500, Bruce Momjian wrote: > On Tue, Feb 28, 2012 at 01:24:45PM -0500, Robert Haas wrote: > > > Running this script will delete the old cluster's data files: > > >    /usr/local/pgdev/pg_upgrade/delete_old_cluster.sh > > > > I think you should rename the old con

[HACKERS] a typo in json.h

2012-02-28 Thread Haifeng Liu
Seems there is a trivial typo in json.h diff --git a/src/include/utils/json.h b/src/include/utils/json.h index 415787b..fa0d4fc 100644 --- a/src/include/utils/json.h +++ b/src/include/utils/json.h @@ -26,4 +26,4 @@ extern Datum row_to_json(PG_FUNCTION_ARGS); extern Datum row_to_json_pretty(PG_FUN

[HACKERS] Re: [pgsql-cluster-hackers] 3rd Cluster Hackers Summit, May 15th in Ottawa

2012-02-28 Thread Michael Paquier
Hi Josh, > Second, please RSVP! At this point I've heard from a total of 3 people. > I need to know who/how many are coming so that I can book the space, > and lunch. > > Sorry for my late reply. I will join the cluster meeting as a member of Postgres-XC. Regards, -- Michael Paquier http://mic

Re: [HACKERS] [pgsql-cluster-hackers] 3rd Cluster Hackers Summit, May 15th in Ottawa

2012-02-28 Thread Koichi Suzuki
Hi, This is Koichi. I'm joining the summit. I've heard at least two or more people will join from NTT.I'm expecting a couple of people from EDB too. Regards; -- Koichi Suzuki 2012/2/29 Josh Berkus : > All, > > First, I've added a wiki page: > > http://wiki.postgresql.org/wiki/P

Re: [HACKERS] 3rd Cluster Hackers Summit, May 15th in Ottawa

2012-02-28 Thread Josh Berkus
All, First, I've added a wiki page: http://wiki.postgresql.org/wiki/PgCon2012CanadaClusterSummit Second, please RSVP! At this point I've heard from a total of 3 people. I need to know who/how many are coming so that I can book the space, and lunch. -- Josh Berkus PostgreSQL Experts Inc. http

Re: [HACKERS] Should we add crc32 in libpgport?

2012-02-28 Thread Tom Lane
Daniel Farina writes: > Thinking unnecessary. Motion is progress. Here is a patch that uses > this exact plan: pgport for the tables, broken out into a header file > that is included in the building of libpgport. I have confirmed by > objdump -t that multiple copies of the table are not include

[HACKERS] Parameterized-path cost comparisons need some work

2012-02-28 Thread Tom Lane
I was experimenting today with a test case sent to me by somebody at Red Hat. The details aren't too important, except that it involves an inner join on the inside of a left join (where it cannot commute with the left join). I can reproduce the behavior with a standard regression test table, if I

Re: [HACKERS] NULL's support in SP-GiST

2012-02-28 Thread Jaime Casanova
On Thu, Feb 2, 2012 at 4:26 PM, Oleg Bartunov wrote: > Hi there, > > attached patch introduces NULLs indexing for SP-GiST. With this patch > Sp-GiST supports IS NULL, IS NOT NULL clauses, as well as full index scan. > I was looking at this. It passes all regression tests, and seems to work fine.

Re: [HACKERS] review: CHECK FUNCTION statement

2012-02-28 Thread Pavel Stehule
2012/2/28 Alvaro Herrera : > > > In gram.y we have a new check_option_list nonterminal.  This is mostly > identical to explain_option_list, except that the option args do not > take a NumericOnly (only opt_boolean_or_string and empty).  I wonder if > it's really worthwhile having a bunch of separat

Re: [HACKERS] strange plan - PostgreSQL 9.2

2012-02-28 Thread Pavel Stehule
2012/2/28 Tom Lane : > Pavel Stehule writes: >> Why there are a SubPlan 2? > > http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=bd3daddaf232d95b0c9ba6f99b0170a0147dd8af > >                        regards, tom lane Thank you - I can verify so it works well, but a EXPLAIN result is

Re: [HACKERS] strange plan - PostgreSQL 9.2

2012-02-28 Thread Tom Lane
Pavel Stehule writes: > Why there are a SubPlan 2? http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=bd3daddaf232d95b0c9ba6f99b0170a0147dd8af regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] review: CHECK FUNCTION statement

2012-02-28 Thread Alvaro Herrera
In gram.y we have a new check_option_list nonterminal. This is mostly identical to explain_option_list, except that the option args do not take a NumericOnly (only opt_boolean_or_string and empty). I wonder if it's really worthwhile having a bunch of separate productions for this; how about we

Re: [HACKERS] review: CHECK FUNCTION statement

2012-02-28 Thread Pavel Stehule
2012/2/28 Alvaro Herrera : > > Excerpts from Pavel Stehule's message of mar feb 28 16:30:58 -0300 2012: > >> I refreshed patch for current git repository. > > Thanks, I'll have a look. > > Oh, another thing -- you shouldn't patch the 1.0 version of the plpgsql > extension.  Rather I think you shoul

Re: [HACKERS] review: CHECK FUNCTION statement

2012-02-28 Thread Alvaro Herrera
Excerpts from Pavel Stehule's message of mar feb 28 16:30:58 -0300 2012: > I refreshed patch for current git repository. Thanks, I'll have a look. Oh, another thing -- you shouldn't patch the 1.0 version of the plpgsql extension. Rather I think you should produce a 1.1 version. -- Álvaro Her

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-28 Thread David E. Wheeler
On Feb 28, 2012, at 8:20 AM, Robert Haas wrote: > I liked the shorter name, myself, but I'm not going to make a big deal about > it. pg_ is used quite a bit. what about pg_fdw? David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: htt

Re: [HACKERS] review: CHECK FUNCTION statement

2012-02-28 Thread Pavel Stehule
Hello Dne 28. února 2012 17:48 Alvaro Herrera napsal(a): > > > I have a few comments about this patch: > > I didn't like the fact that the checker calling infrastructure uses > SPI instead of just a FunctionCallN to call the checker function.  I > think this should be easily avoidable. > It is n

Re: [HACKERS] CLOG contention, part 2

2012-02-28 Thread Simon Riggs
On Tue, Feb 28, 2012 at 6:11 PM, Robert Haas wrote: > On Mon, Feb 27, 2012 at 4:03 AM, Simon Riggs wrote: >> So please use a scale factor that the hardware can cope with. > > OK.  I tested this out on Nate Boley's 32-core AMD machine, using > scale factor 100 and scale factor 300. I initialized i

Re: [HACKERS] pg_upgrade --logfile option documentation

2012-02-28 Thread Bruce Momjian
On Tue, Feb 28, 2012 at 03:48:03PM -0300, Alvaro Herrera wrote: > > Excerpts from Robert Haas's message of mar feb 28 15:24:45 -0300 2012: > > > I think you should rename the old control file just before the step > > that says "linking user relation files". That's the point after which > > it be

Re: [HACKERS] pg_upgrade --logfile option documentation

2012-02-28 Thread Bruce Momjian
On Tue, Feb 28, 2012 at 01:24:45PM -0500, Robert Haas wrote: > > Running this script will delete the old cluster's data files: > >    /usr/local/pgdev/pg_upgrade/delete_old_cluster.sh > > I think you should rename the old control file just before the step > that says "linking user relation files".

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-28 Thread Peter Eisentraut
On tis, 2012-02-28 at 11:20 -0500, Robert Haas wrote: > > [ snicker ] But still, Peter has a point: pgsql is not a name for > the > > product, it's at best an abbreviation. We aren't calling the other > > thing orcl_fdw or ora_fdw. > > > > I think either postgres_fdw or postgresql_fdw would be fi

Re: [HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-28 Thread Daniel Farina
On Sun, Feb 26, 2012 at 7:36 AM, Peter Eisentraut wrote: > On lör, 2012-02-25 at 14:21 +0100, Christoph Berg wrote: >> Well, I'm trying to invoke the extension's "make check" target at >> extension build time. I do have a temporary installation I own >> somehwere in my $HOME, but that is still try

Re: [HACKERS] pg_upgrade --logfile option documentation

2012-02-28 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mar feb 28 15:24:45 -0300 2012: > I think you should rename the old control file just before the step > that says "linking user relation files". That's the point after which > it becomes unsafe to start the old cluster, right? Also, if it's not using link

Re: [HACKERS] WIP: URI connection string support for libpq

2012-02-28 Thread Alexander Shulgin
On 02/24/2012 03:18 PM, Florian Weimer wrote: * Alex Shulgin: It's ugly, but it's standard practice, and seems better than a separate -d parameter (which sort of defeats the purpose of URIs). Hm, do you see anything what's wrong with "?dbname=other" if you don't like a separate -d? It's no

Re: [HACKERS] pg_upgrade --logfile option documentation

2012-02-28 Thread Robert Haas
On Tue, Feb 28, 2012 at 11:21 AM, Bruce Momjian wrote: > On Wed, Feb 22, 2012 at 03:37:29PM -0500, Bruce Momjian wrote: >> On Wed, Feb 22, 2012 at 05:22:29PM -0300, Alvaro Herrera wrote: >> > Not sure about this.  If the upgrades completes successfully and the >> > file is not renamed at the last

Re: [HACKERS] CLOG contention, part 2

2012-02-28 Thread Robert Haas
On Mon, Feb 27, 2012 at 4:03 AM, Simon Riggs wrote: > So please use a scale factor that the hardware can cope with. OK. I tested this out on Nate Boley's 32-core AMD machine, using scale factor 100 and scale factor 300. I initialized it with Simon's patch, which should have the effect of renderi

Re: [HACKERS] Initial 9.2 pgbench write results

2012-02-28 Thread Tom Lane
Jeff Janes writes: > How hard would it be to dummy up a bgwriter which, every time it wakes > up, it forks off a child process to actually do the write, and then > the real one just waits for the child to exit? If it didn't have to > correctly handle signals, SINVAL, and such, it should be just a

Re: [HACKERS] Initial 9.2 pgbench write results

2012-02-28 Thread Robert Haas
On Tue, Feb 28, 2012 at 11:46 AM, Robert Haas wrote: > On Tue, Feb 28, 2012 at 1:15 AM, Ants Aasma wrote: >> My hypothesis for the TPS regression is that it is due to write combining. >> When the workload is mainly bound by I/O, every little bit that can be saved >> helps the bottomline. Larger s

Re: [HACKERS] Initial 9.2 pgbench write results

2012-02-28 Thread karavelov
- Цитат от Robert Haas (robertmh...@gmail.com), на 28.02.2012 в 19:25 - > On Tue, Feb 28, 2012 at 11:36 AM, Jeff Janes wrote: >> How hard would it be to dummy up a bgwriter which, every time it wakes >> up, it forks off a child process to actually do the write, and then >> the real one ju

Re: [HACKERS] Initial 9.2 pgbench write results

2012-02-28 Thread Robert Haas
On Tue, Feb 28, 2012 at 11:36 AM, Jeff Janes wrote: > How hard would it be to dummy up a bgwriter which, every time it wakes > up, it forks off a child process to actually do the write, and then > the real one just waits for the child to exit?  If it didn't have to > correctly handle signals, SINV

[HACKERS] strange plan - PostgreSQL 9.2

2012-02-28 Thread Pavel Stehule
Hello I try to look on one slow query with correlated subquery: create table xx(a int primary key); create table yy(a int); insert into xx select generate_series(1,100); insert into yy select (random()*100)::int from generate_series(1,10); create index on yy(a); Query A select a, (

Re: [HACKERS] review: CHECK FUNCTION statement

2012-02-28 Thread Alvaro Herrera
I have a few comments about this patch: I didn't like the fact that the checker calling infrastructure uses SPI instead of just a FunctionCallN to call the checker function. I think this should be easily avoidable. Second, I see that functioncmds.c gets a lot into trigger internals just to be

Re: [HACKERS] swapcache-style cache?

2012-02-28 Thread karavelov
- Цитат от Andrea Suisani (sick...@opinioni.net), на 28.02.2012 в 09:54 - > On 02/28/2012 04:52 AM, Rob Wultsch wrote: >> On Wed, Feb 22, 2012 at 2:31 PM, james wrote: >>> Has anyone considered managing a system like the DragonFLY swapcache for a >>> DBMS like PostgreSQL? >>> >> >> https

Re: [HACKERS] Initial 9.2 pgbench write results

2012-02-28 Thread Robert Haas
On Tue, Feb 28, 2012 at 1:15 AM, Ants Aasma wrote: > My hypothesis for the TPS regression is that it is due to write combining. > When the workload is mainly bound by I/O, every little bit that can be saved > helps the bottomline. Larger scalefactors don't get the benefit because > there is less w

Re: [HACKERS] Hot Standby Failover Scenario

2012-02-28 Thread Greg Smith
On 02/27/2012 10:05 PM, Lucky Haryadi wrote: 3. When Master A fails to service, the database will failovered to Slave B by triggering with trigger file. As soon as you trigger a standby, it changes it to a new timeline. At that point, the series of WAL files diverges. It's no longer possible

Re: [HACKERS] Initial 9.2 pgbench write results

2012-02-28 Thread Jeff Janes
On Thu, Feb 23, 2012 at 3:17 AM, Greg Smith wrote: > I think an even bigger factor now is that the BGW writes can disturb write > ordering/combining done at the kernel and storage levels.  It's painfully > obvious now how much PostgreSQL relies on that to get good performance.  All > sorts of thi

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-02-28 Thread Kohei KaiGai
2012/2/24 Yeb Havinga : > On 2012-02-24 15:17, Yeb Havinga wrote: >> >> I don't know what's fishy about the mgrid user and root that causes >> c0.c1023 to be absent. > > > more info: > > In shells started in a x environment under Xvnc, id -Z shows the system_u > and c0.c1023 absent. > > In shells s

Re: [HACKERS] pg_upgrade --logfile option documentation

2012-02-28 Thread Bruce Momjian
On Wed, Feb 22, 2012 at 03:37:29PM -0500, Bruce Momjian wrote: > On Wed, Feb 22, 2012 at 05:22:29PM -0300, Alvaro Herrera wrote: > > Not sure about this. If the upgrades completes successfully and the > > file is not renamed at the last minute due to some error, that would be > > a problem as well

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-28 Thread Robert Haas
On Tue, Feb 28, 2012 at 11:02 AM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Feb 24, 2012 at 5:31 PM, Peter Eisentraut wrote: >>> Could we name this "postgresql_fdw" instead?  We already have several >>> ${productname}_fdw out there, and I don't want to get in the business of >>> having to

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-28 Thread Tom Lane
Robert Haas writes: > On Fri, Feb 24, 2012 at 5:31 PM, Peter Eisentraut wrote: >> Could we name this "postgresql_fdw" instead?  We already have several >> ${productname}_fdw out there, and I don't want to get in the business of >> having to guess variant spellings. > If you don't like variant sp

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2012-02-28 Thread Robert Haas
On Fri, Feb 24, 2012 at 5:31 PM, Peter Eisentraut wrote: > Could we name this "postgresql_fdw" instead?  We already have several > ${productname}_fdw out there, and I don't want to get in the business of > having to guess variant spellings. If you don't like variant spellings, having anything to

Re: [HACKERS] Command Triggers, patch v11

2012-02-28 Thread Thom Brown
On 28 February 2012 15:03, Tom Lane wrote: > Thom Brown writes: >> Well the problem is that you can add commands to a trigger en masse, >> but you can only remove them one at a time.  Couldn't we at least >> allow the removal of multiple commands at the same time?  The docs you >> wrote suggest y

Re: [HACKERS] FDW system columns

2012-02-28 Thread Tom Lane
Robert Haas writes: > On Tue, Feb 28, 2012 at 7:00 AM, Shigeru Hanada > wrote: >> We have three options: >> >> a) remove all system columns (posted patch) >> b) remove system columns other than tableoid >> c) leave all system columns as is (current 9.2dev) >> >> Incidentally, views, which is ve

Re: [HACKERS] Command Triggers, patch v11

2012-02-28 Thread Kevin Grittner
Tom Lane wrote: > This seems over-complicated. Triggers on tables do not have > alterable properties, why should command triggers? I vote for > > CREATE COMMAND TRIGGER name ... properties ...; > > DROP COMMAND TRIGGER name; > > full stop. If you want to run the same trigger fu

Re: [HACKERS] Command Triggers, patch v11

2012-02-28 Thread Tom Lane
Thom Brown writes: > Well the problem is that you can add commands to a trigger en masse, > but you can only remove them one at a time. Couldn't we at least > allow the removal of multiple commands at the same time? The docs you > wrote suggest you can do this, but you can't. This seems over-co

Re: [HACKERS] FDW system columns

2012-02-28 Thread Kohei KaiGai
2012年2月28日12:00 Shigeru Hanada : > (2012/02/28 18:08), Thom Brown wrote: >> If that's something that will likely be introduced in future, then >> surely we'd want to keep the tableoid column rather than removing it >> then re-introducing it later? > > As background knowledge, currently (9.1 and 9

Re: [HACKERS] FDW system columns

2012-02-28 Thread Robert Haas
On Tue, Feb 28, 2012 at 7:00 AM, Shigeru Hanada wrote: > We have three options: > > a) remove all system columns (posted patch) > b) remove system columns other than tableoid > c) leave all system columns as is (current 9.2dev) > > Incidentally, views, which is very similar object type to foreign

Re: [HACKERS] Command Triggers, patch v11

2012-02-28 Thread Thom Brown
On 28 February 2012 11:43, Thom Brown wrote: > On 27 February 2012 19:37, Dimitri Fontaine wrote: >> Thom Brown writes: >>> CREATE COMMAND TRIGGER test_cmd_trg >>> BEFORE CREATE SCHEMA, >>>   CREATE OPERATOR, >>>   CREATE COLLATION, >>>   CREATE CAST >>> EXECUTE PROCEDURE my_func(); >>> >>> I co

Re: [HACKERS] FDW system columns

2012-02-28 Thread Shigeru Hanada
(2012/02/28 18:08), Thom Brown wrote: > If that's something that will likely be introduced in future, then > surely we'd want to keep the tableoid column rather than removing it > then re-introducing it later? As background knowledge, currently (9.1 and 9.2dev) foreign tables have all system col

Re: [HACKERS] Command Triggers, patch v11

2012-02-28 Thread Thom Brown
On 27 February 2012 19:37, Dimitri Fontaine wrote: > Thom Brown writes: >> CREATE COMMAND TRIGGER test_cmd_trg >> BEFORE CREATE SCHEMA, >>   CREATE OPERATOR, >>   CREATE COLLATION, >>   CREATE CAST >> EXECUTE PROCEDURE my_func(); >> >> I couldn't drop it completely unless I specified all of those

Re: [HACKERS] Finer Extension dependencies

2012-02-28 Thread Hitoshi Harada
On Fri, Feb 24, 2012 at 2:09 PM, Dimitri Fontaine wrote: > Hitoshi Harada writes: >> I confirmed DROP EXTENSION is fixed now.  In turn, it seems to me >> "requires" doesn't work.  My test ext2.control looks like: > > I'm very sorry about that. It's all about playing with pg_depend and > I've fail

Re: [HACKERS] [PATCH] Documentation: remove confusing paragraph about backslash escaping

2012-02-28 Thread Hannes Frederic Sowa
On 02/28/2012 12:10 AM, Tom Lane wrote: I suggest replacing the first and third cases with something along the lines of Note: if you have standard_conforming_strings turned off, any backslashes you write in literal string constants will need to be doubled. See Section 4.

Re: [HACKERS] FDW system columns

2012-02-28 Thread Thom Brown
2012/2/28 Shigeru Hanada : > (2012/02/27 12:35), Robert Haas wrote: >> On Sat, Feb 25, 2012 at 3:56 PM, Thom Brown  wrote: > If there seems to be a consensus on removing system column from foreign > tables, I'd like to work on this issue.  Attached is a halfway patch, > and ISTM there i

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-02-28 Thread Fujii Masao
On Wed, Feb 8, 2012 at 1:33 AM, Magnus Hagander wrote: > On Tue, Feb 7, 2012 at 17:29, Heikki Linnakangas > wrote: >> On 07.02.2012 16:55, Tom Lane wrote: >>> >>> (The integer vs float TimestampTz issue is a kind of portability >>> problem, but we've already bought into the assumption that sender

Re: [HACKERS] FDW system columns

2012-02-28 Thread Shigeru Hanada
(2012/02/27 12:35), Robert Haas wrote: > On Sat, Feb 25, 2012 at 3:56 PM, Thom Brown wrote: If there seems to be a consensus on removing system column from foreign tables, I'd like to work on this issue. Attached is a halfway patch, and ISTM there is no problem so far. >>> >>> >>>

Re: [HACKERS] pg_basebackup -x stream from the standby gets stuck

2012-02-28 Thread Fujii Masao
On Thu, Feb 23, 2012 at 1:02 AM, Magnus Hagander wrote: > On Tue, Feb 7, 2012 at 12:30, Fujii Masao wrote: >> Hi, >> >> http://www.depesz.com/2012/02/03/waiting-for-9-2-pg_basebackup-from-slave/ >>> =$ time pg_basebackup -D /home/pgdba/slave2/ -F p -x stream -c fast -P -v >>> -h 127.0.0.1 -p 592

Re: [HACKERS] Speed dblink using alternate libpq tuple storage

2012-02-28 Thread Kyotaro HORIGUCHI
This is the new version of the patch. It is not rebased to the HEAD because of a build error. > It's better to restore old two-path error handling. I restorerd "OOM and save result" route. But it seems needed to get back any amount of memory on REAL OOM as the comment in original code says. So I