Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-17 Thread Pavel Stehule
2014-06-17 7:30 GMT+02:00 xbzhang xbzh...@kingbase.com.cn: Use subtransaction , the tuples that had inserted into heap must be inserted again when some exception is raised, it is too expensive. My solution is : 1. delete the tuple that caused the error tuple; 2. release all the resources

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-17 Thread xbzhang
one resource owner per tuples, when error happens, only release resource owner belong to error tuple.Why some memory structures should be in undefined state?  Can you give some examples?  From: Pavel StehuleDate: 2014-06-17 14:01To: xbzhangCC: Alvaro Herrera; pgsql-hackersSubject: Re:

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-17 Thread Pavel Stehule
2014-06-17 8:46 GMT+02:00 xbzhang xbzh...@kingbase.com.cn: one resource owner per tuples, when error happens, only release resource owner belong to error tuple. Why some memory structures should be in undefined state? Can you give some examples? there can be raised any exception -- any non

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-06-17 Thread Amit Kapila
On Fri, May 23, 2014 at 10:01 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jan 31, 2014 at 3:24 PM, Andres Freund and...@2ndquadrant.com wrote: I've pushed a rebased version of the patchset to http://git.postgresql.org/gitweb/?p=users/andresfreund/postgres.git branch rwlock

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Martijn van Oosterhout
On Sat, Jun 14, 2014 at 03:35:33PM -0400, Tom Lane wrote: The best that I think is reasonable to do in such cases is to pull out a separate copy of the sub-select for each actual NEW reference in a rule query. So the example above would give rise to an expanded rule query along the lines of

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Hannu Krosing
On 06/14/2014 09:35 PM, Tom Lane wrote: As I mentioned awhile ago, I'm thinking about implementing the SQL-standard construct UPDATE foo SET ..., (a,b,...) = (SELECT x,y,...), ... I've run into a rather nasty problem, which is how does this interact with expansion of NEW references in

Re: [HACKERS] pg_dump reporing version of server pg_dump as comments in the output

2014-06-17 Thread Jeevan Chalke
On Tue, Mar 4, 2014 at 11:28 AM, Wang, Jing ji...@fast.au.fujitsu.com wrote: I don't buy your argument. Why isn't verbose option sufficient? Did you read the old thread about this [1]? [1] http://www.postgresql.org/message-id/3677.1253912...@sss.pgh.pa.us AFAICS a lot of people compare

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-06-17 Thread Michael Paquier
On Tue, Jun 17, 2014 at 4:36 AM, Ronan Dunklau ronan.dunk...@dalibo.com wrote: Le lundi 16 juin 2014 16:07:51 Michael Paquier a écrit : On Sat, May 24, 2014 at 5:08 AM, Ronan Dunklau ronan.dunk...@dalibo.com 2) The query I am seeing on this spec offers the possiblitily to query TABLE_NAME LIKE

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-17 Thread Amit Kapila
On Tue, Jun 17, 2014 at 12:16 PM, xbzhang xbzh...@kingbase.com.cn wrote: one resource owner per tuples, when error happens, only release resource owner belong to error tuple. Why some memory structures should be in undefined state? Can you give some examples? There might be some LWlocks which

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-17 Thread xbzhang
LWlocks can record in resource owner per tuples, so they can be released at rigth way, but the memory allocated on memory context is one problem.Are there any others problems? 张晓博   研发二部 北京人大金仓信息技术股份有限公司 地址:北京市海淀区上地西路八号院上地科技大厦4号楼501 邮编:100085 电话:(010) 5885 1118 - 8450 手机:15311394463

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Vik Fearing
On 06/17/2014 09:43 AM, Hannu Krosing wrote: On 06/14/2014 09:35 PM, Tom Lane wrote: As I mentioned awhile ago, I'm thinking about implementing the SQL-standard construct UPDATE foo SET ..., (a,b,...) = (SELECT x,y,...), ... I've run into a rather nasty problem, which is how does

Re: [HACKERS] Window function optimisation, allow pushdowns of items matching PARTITION BY clauses

2014-06-17 Thread David Rowley
On Sun, May 25, 2014 at 2:10 PM, Thomas Mayer thomas.ma...@student.kit.edu wrote: Hello David, sorry for the late response. I will try out your changes from the view of a user in mid-June. However, I can't do a trustworthy code review as I'm not an experienced postgre-hacker (yet). Thanks,

Re: [HACKERS] IMPORT FOREIGN SCHEMA statement

2014-06-17 Thread Michael Paquier
On Tue, Jun 17, 2014 at 5:06 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, Jun 17, 2014 at 4:36 AM, Ronan Dunklau ronan.dunk...@dalibo.com wrote: Now, we should think about what options may be desirable for postgres_fdw. An option to include triggers in what is fetched? I am

Re: [HACKERS] Allowing join removals for more join types

2014-06-17 Thread David Rowley
On Wed, Jun 4, 2014 at 12:50 AM, Noah Misch n...@leadboat.com wrote: As a point of procedure, I recommend separating the semijoin support into its own patch. Your patch is already not small; delaying non-essential parts will make the essential parts more accessible to reviewers. In the

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-06-17 Thread Andres Freund
On 2014-06-17 12:41:26 +0530, Amit Kapila wrote: On Fri, May 23, 2014 at 10:01 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jan 31, 2014 at 3:24 PM, Andres Freund and...@2ndquadrant.com wrote: I've pushed a rebased version of the patchset to

Re: [HACKERS] wrapping in extended mode doesn't work well with default pager

2014-06-17 Thread Pavel Stehule
2014-06-16 23:28 GMT+02:00 Jeff Janes jeff.ja...@gmail.com: On Wed, Jun 11, 2014 at 12:59 PM, Greg Stark st...@mit.edu wrote: I think this whole exercise has mostly just convinced me we should implement an HTTP interface and reimplement psql as a browser app. I certainly hope not. I've

[HACKERS] [REVIEW] psql tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE

2014-06-17 Thread Ian Barwick
Andreas Karlsson (andr...@proxel.se) wrote: Hi, When benchmarking an application I got annoyed at how basic the tab completion for ALTER TABLE ... DISABLE/ENABLE TRIGGER and DROP TRIGGER is. So here is a patch improving the tab completion around triggers. For consistency I have also added the

[HACKERS] [REVIEW] Re: Compression of full-page-writes

2014-06-17 Thread Abhijit Menon-Sen
At 2014-06-13 20:07:29 +0530, rahilasye...@gmail.com wrote: Patch named Support-for-lz4-and-snappy adds support for LZ4 and Snappy in PostgreSQL. I haven't looked at this in any detail yet, but I note that the patch creates src/common/lz4/.travis.yml, which it shouldn't. I have a few

[HACKERS] releaseOk and LWLockWaitForVar

2014-06-17 Thread Andres Freund
Hi Heikki, All, Amit just pointed me to a case where the lwlock scalability patch apparently causes problems and I went on to review it and came across the following problem in 9.4/master: LWLockWaitForVar() doesn't set releaseOk to true when waiting again. Isn't that a bug? What if there's

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-06-17 Thread Amit Kapila
On Tue, Jun 17, 2014 at 3:56 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-17 12:41:26 +0530, Amit Kapila wrote: On Fri, May 23, 2014 at 10:01 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jan 31, 2014 at 3:24 PM, Andres Freund and...@2ndquadrant.com wrote:

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Hannu Krosing
On 06/17/2014 11:22 AM, Vik Fearing wrote: On 06/17/2014 09:43 AM, Hannu Krosing wrote: On 06/14/2014 09:35 PM, Tom Lane wrote: As I mentioned awhile ago, I'm thinking about implementing the SQL-standard construct UPDATE foo SET ..., (a,b,...) = (SELECT x,y,...), ... I've run into a

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Andres Freund
On 2014-06-17 11:22:17 +0200, Vik Fearing wrote: On 06/17/2014 09:43 AM, Hannu Krosing wrote: On 06/14/2014 09:35 PM, Tom Lane wrote: As I mentioned awhile ago, I'm thinking about implementing the SQL-standard construct UPDATE foo SET ..., (a,b,...) = (SELECT x,y,...), ...

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-06-17 Thread Andres Freund
On 2014-06-17 18:01:58 +0530, Amit Kapila wrote: On Tue, Jun 17, 2014 at 3:56 PM, Andres Freund and...@2ndquadrant.com On 2014-06-17 12:41:26 +0530, Amit Kapila wrote: 2. Handling of potentialy_spurious case seems to be pending in LWLock functions like LWLockAcquireCommon().

Re: [HACKERS] How to implement the skip errors for copy from ?

2014-06-17 Thread Tom Lane
xbzhang xbzh...@kingbase.com.cn writes: LWlocks can record in resource owner per tuples, so they can be released at rigth way, but the memory allocated on memory context is one problem.Are there any others problems? See AbortSubTransaction(), CleanupSubTransaction(), and the rather large

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-17 11:22:17 +0200, Vik Fearing wrote: On 06/17/2014 09:43 AM, Hannu Krosing wrote: Was'nt there a plan (consensus?) about deprecating rules altogether ? I believe that was just for user access to them, ie CREATE RULE. I don't think

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Andres Freund
On 2014-06-17 09:46:13 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-06-17 11:22:17 +0200, Vik Fearing wrote: On 06/17/2014 09:43 AM, Hannu Krosing wrote: Was'nt there a plan (consensus?) about deprecating rules altogether ? I believe that was just for user

Re: [HACKERS] avoiding tuple copying in btree index builds

2014-06-17 Thread Robert Haas
On Mon, Jun 16, 2014 at 8:10 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On further review, this is definitely the way to go: it's a straight-up win. The isnull array is never more than one element in length, so testing the single element is quite trivial.

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Tom Lane
Martijn van Oosterhout klep...@svana.org writes: Would it not be possible to use WITH here, like: WITH bar AS ( ... subselect ... ) INSERT INTO foolog VALUES (bar.a, bar.b, ...) Don't think it works if the sub-select is correlated. Consider something like UPDATE summary_table s SET (sumx,

Re: [HACKERS] avoiding tuple copying in btree index builds

2014-06-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jun 16, 2014 at 8:10 PM, Tom Lane t...@sss.pgh.pa.us wrote: On a micro-optimization level, it might be worth passing the TID as ItemPointer not ItemPointerData (ie, pass a pointer until we get to the point of actually inserting the TID into the

Re: [HACKERS] Built-in binning functions

2014-06-17 Thread Robert Haas
On Fri, Jun 13, 2014 at 8:22 PM, Petr Jelinek p...@2ndquadrant.com wrote: here is a patch implementing varwidth_bucket (naming is up for discussion) function which does binning with variable bucket width. The use-cases are same as for width_bucket (=data analytics, mainly histograms), the

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-06-17 Thread Robert Haas
On Fri, Jun 13, 2014 at 8:31 PM, Petr Jelinek p...@2ndquadrant.com wrote: attached is a simple patch which makes it possible to change the system identifier of the cluster in pg_control. This is useful for individualization of the instance that is started on top of data directory produced by

Re: [HACKERS] Built-in binning functions

2014-06-17 Thread Petr Jelinek
On 17/06/14 16:15, Robert Haas wrote: On Fri, Jun 13, 2014 at 8:22 PM, Petr Jelinek p...@2ndquadrant.com wrote: here is a patch implementing varwidth_bucket (naming is up for discussion) function which does binning with variable bucket width. The use-cases are same as for width_bucket (=data

[HACKERS] [patch] pg_copy - a command for reliable WAL archiving

2014-06-17 Thread MauMau
Hello, As I proposed before in the thread below, I've implemented a simple command for reliable WAL archiving. I would appreciate it if you could review and test the patch. http://www.postgresql.org/message-id/9C1EB95CA1F34DAB93DF549A51E3E874@maumau Regards MauMau pg_copy.patch

Re: [HACKERS] Quantify small changes to predicate evaluation

2014-06-17 Thread Dennis Butterstein
Hi Marti,thank you for your quick reply.I tried the proposed tweaks and see some differences regarding the measurements. It seems as if the overall query performance dropped a little what I think the disabled turbo boost mode is responsible for (all measurements are single query only). I think

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Robert Haas
On Sat, Jun 14, 2014 at 10:34 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas wrote: On Wed, Sep 25, 2013 at 4:34 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Here's an updated version of this patch, with fixes to all the bugs reported so far. Thanks to Thom Brown,

Re: [HACKERS] UPDATE SET (a,b,c) = (SELECT ...) versus rules

2014-06-17 Thread Merlin Moncure
On Tue, Jun 17, 2014 at 9:02 AM, Tom Lane t...@sss.pgh.pa.us wrote: But come to think of it, WITH is already an interesting precedent: if you look into rewriteHandler.c you'll notice a boatload of corner cases where the rewriter just throws up its hands for various combinations of rules and

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Andres Freund
On 2014-06-17 10:26:11 -0400, Robert Haas wrote: On Sat, Jun 14, 2014 at 10:34 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas wrote: On Wed, Sep 25, 2013 at 4:34 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Here's an updated version of this patch, with fixes to all

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-06-17 Thread Petr Jelinek
On 17/06/14 16:18, Robert Haas wrote: On Fri, Jun 13, 2014 at 8:31 PM, Petr Jelinek p...@2ndquadrant.com wrote: attached is a simple patch which makes it possible to change the system identifier of the cluster in pg_control. This is useful for individualization of the instance that is started

Re: [HACKERS] [patch] pg_copy - a command for reliable WAL archiving

2014-06-17 Thread Abhijit Menon-Sen
At 2014-06-17 23:26:37 +0900, maumau...@gmail.com wrote: Hello, As I proposed before in the thread below, I've implemented a simple command for reliable WAL archiving. I would appreciate it if you could review and test the patch. Please add your patch to the next CF (i.e. 2014-08), so

Re: [HACKERS] [patch] pg_copy - a command for reliable WAL archiving

2014-06-17 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/17/2014 07:26 AM, MauMau wrote: Hello, As I proposed before in the thread below, I've implemented a simple command for reliable WAL archiving. I would appreciate it if you could review and test the patch.

Re: [HACKERS] [patch] pg_copy - a command for reliable WAL archiving

2014-06-17 Thread Abhijit Menon-Sen
At 2014-06-17 08:02:59 -0700, m...@joeconway.com wrote: That first hunk refers to dblink -- I'm guessing it does not belong with this patch. Yes, it's a leftover of the dblink memory leak patch that's in this CF. -- Abhijit -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-06-17 Thread Amit Kapila
On Tue, Jun 17, 2014 at 6:35 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-17 18:01:58 +0530, Amit Kapila wrote: On Tue, Jun 17, 2014 at 3:56 PM, Andres Freund and...@2ndquadrant.com On 2014-06-17 12:41:26 +0530, Amit Kapila wrote: 2. Handling of potentialy_spurious

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-06-17 Thread Andres Freund
On 2014-06-17 20:47:51 +0530, Amit Kapila wrote: On Tue, Jun 17, 2014 at 6:35 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-17 18:01:58 +0530, Amit Kapila wrote: On Tue, Jun 17, 2014 at 3:56 PM, Andres Freund and...@2ndquadrant.com On 2014-06-17 12:41:26 +0530, Amit Kapila

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Greg Stark
On Tue, Jun 17, 2014 at 3:31 PM, Andres Freund and...@2ndquadrant.com wrote: Is there actually a significant usecase behind that wish or just a general demand for being generic? To me it seems fairly unlikely you'd end up with something useful by doing a minmax index over bounding boxes.

Re: [HACKERS] 9.4 release notes

2014-06-17 Thread Bruce Momjian
On Tue, Jun 3, 2014 at 01:21:51AM -0700, Peter Geoghegan wrote: On Sun, May 4, 2014 at 5:46 AM, Bruce Momjian br...@momjian.us wrote: Feedback expected and welcomed. One item currently reads Improve valgrind error reporting. I suggest this be changed to Add support for Valgrind memcheck

Re: [HACKERS] Memory deallocation after calling cast function

2014-06-17 Thread Bruce Momjian
On Tue, Jun 3, 2014 at 03:59:45PM -0400, Tom Lane wrote: Soroosh Sardari soroosh.sard...@gmail.com writes: I have problem with memory deallocation. look at the following queries 1- create table test01(a) as select generate_series(1,1)::int8 ; Do it as, eg, create table

[HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-17 Thread Matheus de Oliveira
Hi Hackers, I was facing a situation were we wanted to set temp_tablespaces to a tablespace on a ephemeral disk (yes, it is AWS ephemeral disk), and I know many users have faced the same situation. Although it seems safe to create a tablespace on ephemeral disks if you use it to store only

Re: [HACKERS] Memory deallocation after calling cast function

2014-06-17 Thread Abhijit Menon-Sen
At 2014-06-17 11:32:37 -0400, br...@momjian.us wrote: SRFs in the SELECT targetlist tend to leak memory; this is not easily fixable, and nobody is likely to try hard considering the feature's on the edge of deprecation anyhow. Uh, what is replacing SRFs? CTEs? I don't think Tom was

Re: [HACKERS] Memory deallocation after calling cast function

2014-06-17 Thread Andres Freund
On 2014-06-17 21:09:25 +0530, Abhijit Menon-Sen wrote: At 2014-06-17 11:32:37 -0400, br...@momjian.us wrote: SRFs in the SELECT targetlist tend to leak memory; this is not easily fixable, and nobody is likely to try hard considering the feature's on the edge of deprecation anyhow.

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Robert Haas
On Tue, Jun 17, 2014 at 10:31 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-17 10:26:11 -0400, Robert Haas wrote: On Sat, Jun 14, 2014 at 10:34 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas wrote: On Wed, Sep 25, 2013 at 4:34 PM, Alvaro Herrera

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Andres Freund
On 2014-06-17 11:48:10 -0400, Robert Haas wrote: On Tue, Jun 17, 2014 at 10:31 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-17 10:26:11 -0400, Robert Haas wrote: On Sat, Jun 14, 2014 at 10:34 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas wrote: On Wed,

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-06-17 Thread Robert Haas
On Tue, Jun 17, 2014 at 10:33 AM, Petr Jelinek p...@2ndquadrant.com wrote: On 17/06/14 16:18, Robert Haas wrote: On Fri, Jun 13, 2014 at 8:31 PM, Petr Jelinek p...@2ndquadrant.com wrote: attached is a simple patch which makes it possible to change the system identifier of the cluster in

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Robert Haas
On Tue, Jun 17, 2014 at 12:04 PM, Andres Freund and...@2ndquadrant.com wrote: Well, I'm not the guy who does things with geometric data, but I don't want to ignore the significant percentage of our users who are. As you must surely know, the GIST implementations for geometric data types store

Re: [HACKERS] pg_control is missing a field for LOBLKSIZE

2014-06-17 Thread Bruce Momjian
On Wed, Jun 4, 2014 at 06:57:31PM -0400, Tom Lane wrote: Stephen Frost sfr...@snowman.net writes: * Tom Lane (t...@sss.pgh.pa.us) wrote: There are at least two places in inv_api.c where we have Assert(pagelen = LOBLKSIZE) that is protecting a subsequent memcpy into a local variable of

Re: [HACKERS] Memory deallocation after calling cast function

2014-06-17 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-06-17 21:09:25 +0530, Abhijit Menon-Sen wrote: At 2014-06-17 11:32:37 -0400, br...@momjian.us wrote: Uh, what is replacing SRFs? CTEs? I don't think Tom was referring to SRFs in general, only putting them directly into the targetlist of a

Re: [HACKERS] PL/pgSQL support to define multi variables once

2014-06-17 Thread Robert Haas
On Fri, Jun 13, 2014 at 11:57 AM, David Johnston david.g.johns...@gmail.com wrote: That's not the reading I want, and it's not the reading you want either, but there is nothing in the existing text that justifies single evaluation. So I think we'd be well advised to sit on our hands until the

Re: [HACKERS] pg_control is missing a field for LOBLKSIZE

2014-06-17 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Uh, I think pg_upgrade needs to check that they match too. Possibly. What do you think it should do when examining a pg_control version that lacks the field? regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [PATCH] Replacement for OSSP-UUID for Linux and BSD

2014-06-17 Thread Noah Misch
On Tue, May 27, 2014 at 07:46:41PM -0400, Tom Lane wrote: Pushed; thanks for working on this! Here's a fix to make the MSVC build process account for the addition of HAVE_UUID_OSSP. (None of the MSVC buildfarm members enable uuid-ossp.) -- Noah Misch EnterpriseDB

Re: [HACKERS] WAL replay bugs

2014-06-17 Thread Robert Haas
On Mon, Jun 2, 2014 at 8:55 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Apr 23, 2014 at 9:43 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: And here is the tool itself. It consists of two parts: 1. Modifications to the backend to write the page images 2. A

Re: [HACKERS] Proposal for CSN based snapshots

2014-06-17 Thread Robert Haas
On Mon, Jun 16, 2014 at 12:58 AM, Craig Ringer cr...@2ndquadrant.com wrote: On 05/30/2014 11:14 PM, Heikki Linnakangas wrote: Yeah. To recap, the failure mode is that if the master crashes and restarts, the transaction becomes visible in the master even though it was never replicated.

Re: [HACKERS] 9.5 CF1

2014-06-17 Thread Robert Haas
On Mon, Jun 16, 2014 at 2:36 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: P.S. If you tag your reviews with [REVIEW] in the Subject, it'll be easier to keep track of them. I and, I believe, various other people hate that style, because at least in Gmail, it breaks the threading. It is

Re: [HACKERS] 9.5 CF1

2014-06-17 Thread Alvaro Herrera
Robert Haas wrote: On Mon, Jun 16, 2014 at 2:36 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: P.S. If you tag your reviews with [REVIEW] in the Subject, it'll be easier to keep track of them. I and, I believe, various other people hate that style, because at least in Gmail, it

Re: [HACKERS] Set new system identifier using pg_resetxlog

2014-06-17 Thread Andres Freund
On 2014-06-17 12:07:04 -0400, Robert Haas wrote: On Tue, Jun 17, 2014 at 10:33 AM, Petr Jelinek p...@2ndquadrant.com wrote: On 17/06/14 16:18, Robert Haas wrote: On Fri, Jun 13, 2014 at 8:31 PM, Petr Jelinek p...@2ndquadrant.com wrote: attached is a simple patch which makes it possible to

Re: [HACKERS] 9.5 CF1

2014-06-17 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Robert Haas wrote: On Mon, Jun 16, 2014 at 2:36 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: P.S. If you tag your reviews with [REVIEW] in the Subject, it'll be easier to keep track of them. I and, I believe, various other people hate

Re: [HACKERS] 9.5 CF1

2014-06-17 Thread Andres Freund
On 2014-06-17 12:47:19 -0400, Alvaro Herrera wrote: Robert Haas wrote: On Mon, Jun 16, 2014 at 2:36 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: P.S. If you tag your reviews with [REVIEW] in the Subject, it'll be easier to keep track of them. I and, I believe, various other

Re: [HACKERS] 9.5 CF1

2014-06-17 Thread Abhijit Menon-Sen
At 2014-06-17 12:47:19 -0400, alvhe...@2ndquadrant.com wrote: P.S. If you tag your reviews with [REVIEW] in the Subject, it'll be easier to keep track of them. I and, I believe, various other people hate that style, because at least in Gmail, it breaks the threading. It is much

Re: [HACKERS] [PATCH] Replacement for OSSP-UUID for Linux and BSD

2014-06-17 Thread Tom Lane
Noah Misch n...@leadboat.com writes: Here's a fix to make the MSVC build process account for the addition of HAVE_UUID_OSSP. (None of the MSVC buildfarm members enable uuid-ossp.) Looks reasonable. I'm unable to test this scenario, but if you have, please commit.

Re: [HACKERS] pg_control is missing a field for LOBLKSIZE

2014-06-17 Thread Bruce Momjian
On Tue, Jun 17, 2014 at 12:28:46PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Uh, I think pg_upgrade needs to check that they match too. Possibly. What do you think it should do when examining a pg_control version that lacks the field? Good question. I have existing

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-17 Thread Robert Haas
On Sat, Jun 14, 2014 at 9:12 PM, Andres Freund and...@2ndquadrant.com wrote: At this year developer's meeting we'd discussed the atomics abstraction which is necessary for some future improvements. We'd concluded that a overview over the hardware capabilities of the supported platforms would

Re: [HACKERS] 9.5 CF1

2014-06-17 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: I find it hard to believe that gmail is incapable of threading messages using In-Reply-To/References header fields, especially given that mail subjects are changed all the time in the normal course of events. But I'll take your word for it and reply to the original

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-17 Thread Andres Freund
On 2014-06-17 13:14:26 -0400, Robert Haas wrote: On Sat, Jun 14, 2014 at 9:12 PM, Andres Freund and...@2ndquadrant.com wrote: At this year developer's meeting we'd discussed the atomics abstraction which is necessary for some future improvements. We'd concluded that a overview over the

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Andres Freund
On 2014-06-17 12:14:00 -0400, Robert Haas wrote: On Tue, Jun 17, 2014 at 12:04 PM, Andres Freund and...@2ndquadrant.com wrote: Well, I'm not the guy who does things with geometric data, but I don't want to ignore the significant percentage of our users who are. As you must surely know,

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Claudio Freire
On Tue, Jun 17, 2014 at 1:04 PM, Andres Freund and...@2ndquadrant.com wrote: For me minmax indexes are helpful because they allow to generate *small* 'coarse' indexes over large volumes of data. From my pov that's possible possible because they don't contain item pointers for every contained

Re: [HACKERS] [REVIEW] Re: Compression of full-page-writes

2014-06-17 Thread Claudio Freire
On Tue, Jun 17, 2014 at 8:47 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: if (compress_backup_block = BACKUP_BLOCK_COMPRESSION_SNAPPY) You mean == right? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-17 Thread Robert Haas
On Thu, Jun 12, 2014 at 6:33 PM, Gregory Smith gregsmithpg...@gmail.com wrote: I'm kind of surprised to see this turn into a hot button all of the sudden though, because my thought on all that so far has been a giant so what? This is what PostgreSQL does. [...] But let's not act like RLS is a

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-17 Thread Robert Haas
On Fri, Jun 13, 2014 at 3:11 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: Yeah, I was thinking something like this could work, but I would go further. Suppose you had separate GRANTable privileges for direct access to individual tables, bypassing RLS, e.g. GRANT DIRECT

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-17 Thread Robert Haas
On Thu, Jun 12, 2014 at 8:13 PM, Stephen Frost sfr...@snowman.net wrote: I'm in full agreement we should clearly communicate the issues around pg_dump in particular, because they can't necessarily be eliminated altogether without some major work that's going to take a while to finish. And if

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-17 Thread Stephen Frost
Robert, On Tuesday, June 17, 2014, Robert Haas robertmh...@gmail.com wrote: After sending that one (1) email, I was promptly told that I'm very disappointed to hear that the mechanical pieces around making RLS easy for users to use ... is receiving such push-back. The push-back, at that

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-17 Thread Robert Haas
On Mon, Jun 16, 2014 at 1:15 AM, Stephen Frost sfr...@snowman.net wrote: I'm not referring to the proposed implementation particularly; or at least not that aspect of it. I don't think trying to run the view quals as the defining user is likely to be very appealing, because I think it's going

Re: [HACKERS] pg_control is missing a field for LOBLKSIZE

2014-06-17 Thread Alvaro Herrera
Bruce Momjian wrote: On Tue, Jun 17, 2014 at 12:28:46PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Uh, I think pg_upgrade needs to check that they match too. Possibly. What do you think it should do when examining a pg_control version that lacks the field? Good

Re: [HACKERS] delta relations in AFTER triggers

2014-06-17 Thread Robert Haas
On Sat, Jun 14, 2014 at 7:56 PM, Kevin Grittner kgri...@ymail.com wrote: I looked at the standard, and initially tried to implement the standard syntax for this; however, it appeared that the reasons given for not using standard syntax for the row variables also apply to the transition

Re: [HACKERS] btreecheck extension

2014-06-17 Thread Robert Haas
On Mon, Jun 16, 2014 at 9:47 PM, Peter Geoghegan p...@heroku.com wrote: As discussed at the developer meeting at pgCon, I think that there is a lot to be said for a tool that checks nbtree index invariants on live systems. Me too. Attached prototype patch adds contrib extension, btreecheck.

Re: [HACKERS] Built-in support for a memory consumption ulimit?

2014-06-17 Thread Robert Haas
On Mon, Jun 16, 2014 at 10:16 PM, Noah Misch n...@leadboat.com wrote: On Sat, Jun 14, 2014 at 10:37:36AM -0400, Tom Lane wrote: After giving somebody advice, for the Nth time, to install a memory-consumption ulimit instead of leaving his database to the tender mercies of the Linux OOM killer,

Re: [HACKERS] Audit of logout

2014-06-17 Thread Robert Haas
On Mon, Jun 16, 2014 at 4:14 PM, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Fujii Masao masao.fu...@gmail.com writes: That's harmful for audit purpose. I think that we should make log_disconnections PGC_SUSET rather than PGC_BACKEND in order to forbid

Re: [HACKERS] Atomics hardware support table supported architectures

2014-06-17 Thread Kevin Grittner
Andres Freund and...@2ndquadrant.com wrote: On 2014-06-17 13:14:26 -0400, Robert Haas wrote: On Sat, Jun 14, 2014 at 9:12 PM, Andres Freund and...@2ndquadrant.com wrote: 3) sparcv8: Last released model 1997. I seem to recall hearing about this in a customer situation relatively recently,

Re: [HACKERS] Built-in support for a memory consumption ulimit?

2014-06-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: We could do better by accounting for memory usage ourselves, inside the memory-context system, but that'd probably impose some overhead we don't have today. Hm. We could minimize the overhead if we just accounted for entire malloc chunks and not

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Robert Haas
On Tue, Jun 17, 2014 at 12:51 AM, Peter Geoghegan p...@heroku.com wrote: On Mon, Jun 16, 2014 at 8:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Not having looked at the patch, but: I think the probability of useless-noise HINTs could be substantially reduced if the code prints a HINT only when

Re: [HACKERS] Built-in support for a memory consumption ulimit?

2014-06-17 Thread Robert Haas
On Tue, Jun 17, 2014 at 4:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: We could do better by accounting for memory usage ourselves, inside the memory-context system, but that'd probably impose some overhead we don't have today. Hm. We could minimize

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jun 17, 2014 at 12:51 AM, Peter Geoghegan p...@heroku.com wrote: I disagree. I happen to think that making some guess is better than no guess at all here, given the fact that there aren't too many possibilities to choose from. Emitting a

Re: [HACKERS] btreecheck extension

2014-06-17 Thread Peter Geoghegan
On Tue, Jun 17, 2014 at 1:16 PM, Robert Haas robertmh...@gmail.com wrote: I don't feel qualified to comment on any of the substantive issues you raise, so instead I'd like to bikeshed the name. I suggest that we create one extension to be a repository for index-checking machinery (and perhaps

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: I wouldn't necessarily hold up git as a model of user interface engineering ;-) ... but still, it might be interesting to take a look at exactly what heuristics they used here.  I'm sure there are other precedents we could look at, too. On my Ubuntu

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Josh Berkus
On 06/17/2014 01:59 PM, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: Emitting a suggestion with a large distance seems like it could be rather irritating. If the user types in SELECT prodct_id FROM orders, and that column does not exist, suggesting product_id, if such a column

Re: [HACKERS] Minmax indexes

2014-06-17 Thread Josh Berkus
On 06/17/2014 09:14 AM, Robert Haas wrote: Well, I don't know: suppose you're loading geospatial data showing the location of every building in some country. It might easily be the case that the data is or can be loaded in an order that provides pretty good spatial locality, leading to tight

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Peter Geoghegan
On Tue, Jun 17, 2014 at 1:59 PM, Tom Lane t...@sss.pgh.pa.us wrote: Yeah, that's my point exactly. There's no very good reason to assume that the intended answer is in fact among the set of column names we can see; and if it *is* there, the Levenshtein distance to it isn't going to be all

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: (2) If there are multiple columns with the same levenschtien distance, which one do you suggest? The current code picks a random one, which I'm OK with. The other option would be to list all of the columns. I objected to that upthread. I don't think

Re: [HACKERS] WAL replay bugs

2014-06-17 Thread Michael Paquier
On Wed, Jun 18, 2014 at 1:40 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jun 2, 2014 at 8:55 AM, Michael Paquier michael.paqu...@gmail.com wrote: I'm not sure if this is reasonably possible, but one thing that would make this tool a whole lot easier to use would be if you could make

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Josh Berkus
On 06/17/2014 02:36 PM, Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: (2) If there are multiple columns with the same levenschtien distance, which one do you suggest? The current code picks a random one, which I'm OK with. The other option would be to list all of the columns. I

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: Maybe that's just a matter of phrasing the message appropriately. A more guarded message, that suggests that foobar is the *best* match is correct at least on its own terms (terms that are self evident). This does pretty effectively communicate to the

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: On 06/17/2014 02:36 PM, Tom Lane wrote: Another issue is whether to print only those having exactly the minimum observed Levenshtein distance, or to print everything less than some cutoff. The former approach seems to me to be placing a great deal of

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-06-17 Thread Josh Berkus
On 06/17/2014 02:53 PM, Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: On 06/17/2014 02:36 PM, Tom Lane wrote: Another issue is whether to print only those having exactly the minimum observed Levenshtein distance, or to print everything less than some cutoff. The former approach seems

  1   2   >