Re: [HACKERS] [help] Is it possible to support remote COPY operation on PG?

2012-10-23 Thread Dann Corbit
You can use the libpq API: http://www.postgresql.org/docs/9.2/interactive/libpq-copy.html The Postgresql JDBC driver exposes COPY, IIRC. From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Xiong He Sent: Tuesday, October 23, 2012 11:55 PM To: Postgr

[HACKERS] [help] Is it possible to support remote COPY operation on PG?

2012-10-23 Thread Xiong He
Is it possible to copy some table data from remote client to the PG database server directly without upload the data file to the server side in advance? --- Thanks&Regards, Xiong He

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

2012-10-23 Thread Amit kapila
On Wednesday, October 24, 2012 12:15 AM Alvaro Herrera wrote: Amit kapila wrote: > Rebased version of patch based on latest code. > Uhm, how can this patch change a caller of PageAddItem() by adding one > more argument, yet not touch bufpage.c at all? Are you sure this > compiles? It compiles,

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

2012-10-23 Thread Amit kapila
Wednesday, October 24, 2012 5:51 AM Noah Misch wrote: >Hi Amit, Noah, Thank you for taking the performance data. >On Tue, Oct 16, 2012 at 09:22:39AM +, Amit kapila wrote: > On Saturday, October 06, 2012 7:34 PM Amit Kapila wrote: >> > Please find the readings of LZ patch along with Xlog-Scal

[HACKERS] About the translation of po files into zh_CN (Simplified Chinese) in PG 9.2 release (branch)

2012-10-23 Thread Xiong He
Hi, I've taken the surplus translation tasks of the incomplete items in http://babel.postgresql.org/ on PG branch 9.2. and about 16 patches are submitted into: http://pgfoundry.org/tracker/?atid=320&group_id=164&func=browse Almost all are finished. Could someone take a look the submitted t

Re: [HACKERS] [PATCH] Support for Array ELEMENT Foreign Keys

2012-10-23 Thread Tom Lane
Now that it seems like we've got consensus on syntax, let's talk about some implementation issues. Ordinarily, the query executed during an insert or update on the referencing table looks like, for example, SELECT 1 FROM ONLY "public"."pk" x WHERE "f1" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x

[HACKERS] proposed community service: make coverage

2012-10-23 Thread Alvaro Herrera
Hi, During the course of some discussion, I proposed the possibility of us exposing a continuously updated copy of the "make coverage" target, after running some standard test suite (possibly some of the "check-world" targets). This would give everyone some visibility into the code that's being r

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

2012-10-23 Thread Noah Misch
Hi Amit, On Tue, Oct 16, 2012 at 09:22:39AM +, Amit kapila wrote: > On Saturday, October 06, 2012 7:34 PM Amit Kapila wrote: > > Please find the readings of LZ patch along with Xlog-Scale patch. > > The comparison is between for Update operations > > base code + Xlog Scale Patch > > base code

Re: [HACKERS] [WIP] pg_ping utility

2012-10-23 Thread Phil Sorber
On Tue, Oct 23, 2012 at 6:22 PM, Christopher Browne wrote: > On Tue, Oct 23, 2012 at 6:12 PM, Peter Eisentraut wrote: >> On 10/22/12 11:47 AM, Phil Sorber wrote: >> Also, it seems that about 75% of the patch is connection options processing. >> How about >> we get rid of all that and just have

Re: [HACKERS] [WIP] pg_ping utility

2012-10-23 Thread Phil Sorber
On Tue, Oct 23, 2012 at 6:12 PM, Peter Eisentraut wrote: > Quick review ... > > Code: > > *** install: all installdirs > *** 54,59 > --- 55,61 > $(INSTALL_PROGRAM) clusterdb$(X) '$(DESTDIR)$(bindir)'/clusterdb$(X) > $(INSTALL_PROGRAM) vacuumdb$(X) '$(DESTDI

Re: [HACKERS] [WIP] pg_ping utility

2012-10-23 Thread Christopher Browne
On Tue, Oct 23, 2012 at 6:12 PM, Peter Eisentraut wrote: > On 10/22/12 11:47 AM, Phil Sorber wrote: > Also, it seems that about 75% of the patch is connection options processing. > How about > we get rid of all that and just have them specify a connection string? It > would be a break > with t

Re: [HACKERS] [WIP] pg_ping utility

2012-10-23 Thread Peter Eisentraut
On 10/22/12 11:47 AM, Phil Sorber wrote: > On Sun, Oct 21, 2012 at 6:20 PM, Tom Lane wrote: >> Phil Sorber writes: >>> Here is the new patch. I renamed the utility from pg_ping to pingdb to >>> go along with the naming convention of src/bin/scripts. >> >> Uh, no, that's not a step forward. Leavi

Re: [HACKERS] Very minor feature suggestion

2012-10-23 Thread Murphy, Kevin
On Oct 21, 2012, at 6:02 PM, Peter Eisentraut wrote: > On Thu, 2012-10-18 at 16:31 +, Murphy, Kevin wrote: >> It might be nice for psql to have a 'htmlcaption' boolean pset option that >> would wrap the provided title/caption, if any, in a caption tag in the HTML >> report output, when using

Re: [HACKERS] Extend argument of OAT_POST_CREATE

2012-10-23 Thread Alvaro Herrera
Kohei KaiGai escribió: > 2012/10/10 Alvaro Herrera : > > I admit the new RELKIND_INDEX cases in various places make for strange > > flow. Not sure how it can be improved though. > > > The idea is not so complicated. This code considers index is an > property of a certain table like as individual

Re: [HACKERS] ToDo: KNN Search should to support DISTINCT clasuse?

2012-10-23 Thread Ants Aasma
On Tue, Oct 23, 2012 at 7:25 PM, Robert Haas wrote: > through the end of the input. However, when the HashAgg node is only > implementing DISTINCT (ON), you can emit each new row as soon as you > see it, and just make the hash table entry to be certain you don't > emit it again. I think someone

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

2012-10-23 Thread Alvaro Herrera
Amit kapila wrote: > Rebased version of patch based on latest code. Uhm, how can this patch change a caller of PageAddItem() by adding one more argument, yet not touch bufpage.c at all? Are you sure this compiles? The email subject has a WIP tag; is that still the patch status? If so, I assume

Re: [HACKERS] [PATCH] Support for Array ELEMENT Foreign Keys

2012-10-23 Thread Peter Eisentraut
On 10/22/12 4:22 PM, Tom Lane wrote: > Robert Haas writes: >> Well, I think if that's the best we can do, you original proposal of >> ditching the column constraint syntax altogether might be for the >> best. I wasn't too excited about that before, but I think having two >> different syntaxes is

Re: [HACKERS] Successor of MD5 authentication, let's use SCRAM

2012-10-23 Thread Peter Eisentraut
On 10/22/12 1:25 PM, Stephen Frost wrote: > * Peter Eisentraut (pete...@gmx.net) wrote: >> On 10/12/12 3:44 PM, Stephen Frost wrote: >>> In general, I think it's good to build on existing implementations where >>> possible. Perhaps we could even consider using something which already >>> exists fo

Re: [HACKERS] [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility

2012-10-23 Thread Robert Haas
On Wed, Oct 17, 2012 at 4:25 PM, Josh Berkus wrote: >> It is not meant to be a full implementation of application level queuing >> system though but just the capture, persisting and distribution parts >> >> Using this as an "application level queue" needs a set of interface >> functions to extract

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-23 Thread Noah Misch
On Tue, Oct 23, 2012 at 11:18:48AM -0300, Alvaro Herrera wrote: > Please see downthread -- there is some commentary from Noah ([1] and > others) about the patch itself. As far I understand, some changes are > still needed, and I don't know if the last version submitted is the > version that should

Re: [HACKERS] "pg_ctl promote" exit status

2012-10-23 Thread Robert Haas
On Tue, Oct 23, 2012 at 6:39 AM, Dhruv Ahuja wrote: > The "pg_ctl promote" command returns an exit code of 1 when the server > is not in standby mode, and the same exit code of 1 when the server > isn't started at all. The only difference at the time being is the > string output at the time, which

Re: [HACKERS] Successor of MD5 authentication, let's use SCRAM

2012-10-23 Thread Robert Haas
On Mon, Oct 22, 2012 at 6:54 PM, Greg Stark wrote: > I think we can provide a much better warning however. I think we want > something like 'WARNING: Server identity signed by unknown and > untrusted authority "Snakeoil CA"' > > We could go even further: > INFO: Server identity "ACME Debian Machin

Re: [HACKERS] ToDo: KNN Search should to support DISTINCT clasuse?

2012-10-23 Thread Robert Haas
On Mon, Oct 22, 2012 at 7:09 PM, Greg Stark wrote: > On Mon, Oct 22, 2012 at 4:57 PM, Tom Lane wrote: >> Don't hold your breath. There are two ways the system could implement >> the DISTINCT clause: either sort and uniq, or hashaggregate. >> hashaggregate will destroy any input ordering, so ther

Re: [HACKERS] too much pgbench init output

2012-10-23 Thread Robert Haas
On Tue, Oct 23, 2012 at 12:02 PM, Alvaro Herrera wrote: > Tomas Vondra wrote: > >> I've been thinking about this a bit more, and do propose to use an >> option that determines "logging step" i.e. number of items (either >> directly or as a percentage) between log lines. >> >> The attached patch de

Re: [HACKERS] New statistics for WAL buffer dirty writes

2012-10-23 Thread Alvaro Herrera
Satoshi Nagayasu escribió: > With this patch, walwriter process and each backend process > would sum up dirty writes, and send it to the stat collector. > So, the value could be saved in the stat file, and could be > kept on restarting. > > The statistics could be retreive with using > pg_stat_ge

Re: [HACKERS] too much pgbench init output

2012-10-23 Thread Alvaro Herrera
Tomas Vondra wrote: > I've been thinking about this a bit more, and do propose to use an > option that determines "logging step" i.e. number of items (either > directly or as a percentage) between log lines. > > The attached patch defines a new option "--logging-step" that accepts > either intege

Re: [HACKERS] FDW for PostgreSQL

2012-10-23 Thread Alvaro Herrera
Shigeru HANADA escribió: > Please examine attached v2 patch (note that is should be applied onto > latest dblink_fdw_validator patch). Tom committed parts of the dblink_fdw_validator patch, but not the removal, so it seems this patch needs to be rebased on top of that somehow. I am not able to s

Re: [HACKERS] Re: proposal and patch : support INSERT INTO...RETURNING with partitioned table using rule

2012-10-23 Thread Alvaro Herrera
johnlumby escribió: > On 09/20/12 16:34, Tom Lane wrote: > >It seems to me that instead of lobbying to throw another kluge on top > >of that pile, you'd be better off looking for alternative solutions. > >Have you tried implementing this as an INSTEAD OF trigger, and not using > >rules at all? Th

Re: [HACKERS] [PATCH] Make pg_basebackup configure and start standby [Review]

2012-10-23 Thread Magnus Hagander
On Oct 23, 2012 4:52 PM, "Alvaro Herrera" wrote: > > Boszormenyi Zoltan escribió: > > > >>Also, the check for conflict between -R and -x/-X is now removed. > > > > The documentation for option -R has changed to reflect this and > > there is no different error code 2 now: it would make the behaviou

Re: [HACKERS] Switching timeline over streaming replication

2012-10-23 Thread Alvaro Herrera
Heikki Linnakangas wrote: > Attached is a new version of the patch. I committed the refactoring > of XLogPageRead() already, as that was a readability improvement > even without this patch. All the reported issues should be fixed > now, although I will continue testing this tomorrow. I added vario

Re: [HACKERS] [PATCH] Make pg_basebackup configure and start standby [Review]

2012-10-23 Thread Alvaro Herrera
Boszormenyi Zoltan escribió: > >>Also, the check for conflict between -R and -x/-X is now removed. > > The documentation for option -R has changed to reflect this and > there is no different error code 2 now: it would make the behaviour > inconsistent between -Fp and -Ft. > > >>>The PQconninfo p

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-23 Thread Tom Lane
Alvaro Herrera writes: > Regarding Tom's objection to the fundamental issue of providing lwlocks > data, I agree that maybe it's the wrong layer to be measuring to provide > data to DBAs, but not providing any data is worse, because then even PG > developers cannot know what are the real bottlenec

Re: [HACKERS] pg_stat_lwlocks view - lwlocks statistics, round 2

2012-10-23 Thread Alvaro Herrera
Robert Haas escribió: > On Fri, Oct 19, 2012 at 11:52 AM, Satoshi Nagayasu wrote: > > I agree with that such performance instrument needs to be > > improved if it has critical performance issue against > > production environment. So, I'm still looking for a better > > implementation to decrease pe

[HACKERS] install zic binary

2012-10-23 Thread Euler Taveira
Hi, Every year we have a ton of questions about updating the time zone data in Brazil (our politics decided to do it at 90min at the second half). Problem is that there is not sufficient time to release a new minor version with an updated time zone data. It is not a problem for *nix because zic bi

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-23 Thread Alvaro Herrera
Oleg Bartunov escribió: > Yes, it's a bug and it needs to be applied ! Oleg, This patch has been waiting a long time for some review and commit. Since it fixes existing bugs, it should be backpatched; or at least some people believe it needs to be. Please see downthread -- there is some commenta

Re: [HACKERS] [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility

2012-10-23 Thread Tom Lane
[ hadn't been following this thread, sorry ] Hannu Krosing writes: > My RFC was for a proposal to skip writing the unneeded info in local > tables and put it _only_ in WAL. This concept seems fundamentally broken. What will happen if the master crashes immediately after emitting the WAL record?

Re: [HACKERS] Visual Studio 2012 RC

2012-10-23 Thread Alvaro Herrera
Noah Misch wrote: > On Mon, Oct 15, 2012 at 09:17:09PM +0200, Brar Piening wrote: > > Noah Misch wrote: > >> The only matter still requiring attention is a fix for IsoLocaleName(). > >> > > Yep - I'll work on this and on some denoisifying of the build log files. > > Great. Just to be clear, I c

Re: [HACKERS] [PATCH] Prefetch index pages for B-Tree index scans

2012-10-23 Thread Claudio Freire
On Tue, Oct 23, 2012 at 9:44 AM, John Lumby wrote: >> From: Claudio Freire >> I hope I'm not talking to myself. > > Indeed not. I also looked into prefetching for pure index scans for > b-trees (and extension to use async io). > http://archives.postgresql.org/message-id/BLU0-SMTP31709961D846CC

Re: [HACKERS] [PATCH] Prefetch index pages for B-Tree index scans

2012-10-23 Thread John Lumby
> From: Claudio Freire > I hope I'm not talking to myself. Indeed not. I also looked into prefetching for pure index scans for b-trees (and extension to use async io). http://archives.postgresql.org/message-id/BLU0-SMTP31709961D846CCF4F5EB4C2A3930%40phx.gbl I am not where I have a proper se

Re: [HACKERS] [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility

2012-10-23 Thread Hannu Krosing
On 10/23/2012 01:31 AM, Greg Stark wrote: On Wed, Oct 17, 2012 at 7:48 PM, Christopher Browne wrote: Well, replication is arguably a relevant case. For Slony, the origin/master node never cares about logged changes - that data is only processed on replicas. Now, that's certainly a little weas

[HACKERS] "pg_ctl promote" exit status

2012-10-23 Thread Dhruv Ahuja
Hello The "pg_ctl promote" command returns an exit code of 1 when the server is not in standby mode, and the same exit code of 1 when the server isn't started at all. The only difference at the time being is the string output at the time, which FYI are... pg_ctl: cannot promote server; server is

[HACKERS] Failing SSL connection due to weird interaction with openssl

2012-10-23 Thread Lars Kanis
While investigating a ruby-pg issue [1], we noticed that a libpq SSL connection can fail, if the running application uses OpenSSL for other work, too. Root cause is the thread local error queue of OpenSSL, that is used to transmit textual error messages to the application after a failed crypto