Re: [HACKERS] TABLESAMPLE doesn't actually satisfy the SQL spec, does it?

2015-07-14 Thread Simon Riggs
On 12 July 2015 at 18:50, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Sun, Jul 12, 2015 at 12:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: As best I can tell (evidence below), the SQL standard requires that if a single query reads a table with a TABLESAMPLE

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-14 Thread Michael Paquier
On Tue, Jul 14, 2015 at 1:42 AM, Heikki Linnakangas wrote: There was one bug in this patch: the COMMENT statement that was constructed didn't schema-qualify the relation, so if the ALTERed table was not in search_path, the operation would fail with a relation not found error (or add the

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-14 Thread Shulgin, Oleksandr
Yes, but I think the plugin is the right place to do it. What is more, this won't actually prevent you completely from producing non-ECMAScript compliant JSON, since json or jsonb values containing offending numerics won't be caught, AIUI. Ah, that's a good catch indeed. But a fairly simple to

[HACKERS] GSets: Fix bug involving GROUPING and HAVING together

2015-07-14 Thread Jeevan Chalke
Hi, I have observed some fishy behavior related to GROUPING in HAVING clause and when we have only one element in GROUPING SETS. Basically, when we have only one element in GROUING SETS, we are assuming it as a simple GROUP BY with one column. Due to which we are ending up with this error. If

Re: [HACKERS] GSets: Fix bug involving GROUPING and HAVING together

2015-07-14 Thread Andrew Gierth
Jeevan == Jeevan Chalke jeevan.cha...@enterprisedb.com writes: Jeevan Basically, when we have only one element in GROUING SETS, we Jeevan are assuming it as a simple GROUP BY with one column. Due to Jeevan which we are ending up with this error. Jeevan If we have ROLLUP/CUBE or GROUPING

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-14 Thread Heikki Linnakangas
On 07/14/2015 10:29 AM, Michael Paquier wrote: On Tue, Jul 14, 2015 at 1:42 AM, Heikki Linnakangas wrote: I plan to commit the attached patches later today or tomorrow. But how do you feel about back-patching this? It should be possible to backpatch, although at a quick test it seems that there

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-14 Thread Simon Riggs
On 13 July 2015 at 14:39, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: Regarding the fact that those two contrib modules can be part of a -contrib package and could be installed, nuking those two extensions from the tree and preventing the creating

Re: [HACKERS] Improving log capture of TAP tests with IPC::Run

2015-07-14 Thread Robert Haas
On Thu, Jul 9, 2015 at 9:43 AM, Tom Lane t...@sss.pgh.pa.us wrote: Heikki Linnakangas hlinn...@iki.fi writes: Pushed, thanks. Shouldn't we consider back-patching these improvements into 9.5 and 9.4? ISTM the main point is to help debug buildfarm failures, and we won't be getting much benefit

Re: [HACKERS] First Aggregate Funtion?

2015-07-14 Thread sudalai
The above implementation of first aggregate returns the first non-NULL item value. To get *first row item value* for a column use the below implementation. -- create a function that push at most two element on given array -- push the first row value at second index of the array CREATE OR

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-07-14 Thread Robert Haas
On Fri, Jul 10, 2015 at 12:33 PM, Alexander Korotkov a.korot...@postgrespro.ru wrote: I can propose following: 1) Expose more information about current lock to user. For instance, having duration of current wait event, user can determine if backend is getting stuck on particular event without

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Robert Haas
On Fri, Jul 10, 2015 at 7:57 AM, Andres Freund and...@anarazel.de wrote: pg_dump dumps security labels on databases. Which makes sense. The problem is that they're dumped including the database name. Which means that if you dump a database and restore it into a differently named one you'll

Re: [HACKERS] Default Roles (was: Additional role attributes)

2015-07-14 Thread Fujii Masao
On Tue, Jul 14, 2015 at 3:46 AM, Stephen Frost sfr...@snowman.net wrote: Fujii, * Fujii Masao (masao.fu...@gmail.com) wrote: he documents of the functions which the corresponding default roles are added by this patch need to be updated. For example, the description of pg_xlog_replay_pause()

Re: [HACKERS] GSets: Fix bug involving GROUPING and HAVING together

2015-07-14 Thread Jeevan Chalke
On Tue, Jul 14, 2015 at 4:23 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Jeevan == Jeevan Chalke jeevan.cha...@enterprisedb.com writes: Jeevan Basically, when we have only one element in GROUING SETS, we Jeevan are assuming it as a simple GROUP BY with one column. Due to Jeevan

Re: [HACKERS] RLS fails to work with UPDATE ... WHERE CURRENT OF

2015-07-14 Thread Robert Haas
On Thu, Jul 9, 2015 at 5:47 PM, Joe Conway m...@joeconway.com wrote: On 06/08/2015 02:08 AM, Dean Rasheed wrote: Actually I think it is fixable just by allowing the CURRENT OF expression to be pushed down into the subquery through the security barrier view. The planner is then guaranteed to

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread David G. Johnston
On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown t...@linux.com wrote: The use-case I have in mind is for finding out how close to the 32-bit integer limit sequences have reached. At the moment, this isn't possible without creating a custom function to go fetch the last_value from the specified

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-07-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I really think we should do the simple thing first. If we make this complicated and add lots of bells and whistles, it is going to be much harder to get anything committed, because there will be more things for somebody to object to. If we start with

[HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Thom Brown
Hi all, When using currval() to find the current value of all sequences, it chokes on those that aren't initialised. This is expected and documented as behaving in this manner. However, I think it would be useful to also support retrieving the current value of a sequence, regardless of whether

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-14 Thread Simon Riggs
On 14 July 2015 at 15:32, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 13 July 2015 at 14:39, Tom Lane t...@sss.pgh.pa.us wrote: TBH, I think the right thing to do at this point is to revert the entire patch and send it back for ground-up rework. I think

Re: [HACKERS] Freeze avoidance of very large table.

2015-07-14 Thread Simon Riggs
On 10 July 2015 at 15:11, Sawada Masahiko sawada.m...@gmail.com wrote: Oops, I had forgotten to add new file heapfuncs.c. Latest patch is attached. I think we've established the approach is desirable and defined the way forwards for this, so this is looking good. Some of my requests haven't

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Robert Haas
On Fri, Jul 10, 2015 at 8:55 AM, Heikki Linnakangas hlinn...@iki.fi wrote: If somebody still needs it, I'll rebase and adjust the patch towards the latest custom-scan interface. However, I cannot be motivated for the feature nobody wants. Robert, can you weigh in on this? Do we currently have

Re: [HACKERS] WIP: Enhanced ALTER OPERATOR

2015-07-14 Thread Uriy Zhuravlev
On Tuesday 14 July 2015 18:22:26 you wrote: I think you had copy-pasted from one of the generic ALTER variants, like AlterOwnerStmt, which was overly generic for ALTER OPERATOR. You right. Thanks, committed after some editing. Thanks you. And it BIG editing. ;) After that, can you view

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread David G. Johnston
On Tue, Jul 14, 2015 at 11:05 AM, Thom Brown t...@linux.com wrote: On 14 July 2015 at 16:02, David G. Johnston david.g.johns...@gmail.com wrote: On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown t...@linux.com wrote: The use-case I have in mind is for finding out how close to the 32-bit integer

Re: [HACKERS] WIP: Enhanced ALTER OPERATOR

2015-07-14 Thread Heikki Linnakangas
On 07/13/2015 03:43 PM, Uriy Zhuravlev wrote: Hello hackers. Attached is a new version of patch: * port syntax from NULL to truth NONE * fix documentation (thanks Heikki) * rebase to master Thanks, committed after some editing. I put all the logic into AlterOperator function, in

Re: [HACKERS] Minor issue with BRIN regression tests

2015-07-14 Thread Robert Haas
On Fri, Jul 10, 2015 at 2:56 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jun 2, 2015 at 3:11 PM, Peter Geoghegan p...@heroku.com wrote: Here is another patch, this time removing a useless ON CONFLICT DO UPDATE test. Can someone commit this, please? Removing that test doesn't seem

Re: [HACKERS] multivariate statistics / patch v7

2015-07-14 Thread Tomas Vondra
Hi, On 07/13/2015 10:51 AM, Kyotaro HORIGUCHI wrote: Ok, I understood the diferrence between what I thought and what you say. The code is actually concious of OR clause but is looks somewhat confused. I'm not sure which part is confused by the OR clauses, but it's certainly possible.

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-14 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 13 July 2015 at 14:39, Tom Lane t...@sss.pgh.pa.us wrote: TBH, I think the right thing to do at this point is to revert the entire patch and send it back for ground-up rework. I think the high-level design is wrong in many ways and I have about

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Thom Brown
On 14 July 2015 at 16:02, David G. Johnston david.g.johns...@gmail.com wrote: On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown t...@linux.com wrote: The use-case I have in mind is for finding out how close to the 32-bit integer limit sequences have reached. At the moment, this isn't possible

Re: [HACKERS] pg_upgrade + Extensions

2015-07-14 Thread Smitha Pamujula
On Mon, Jul 13, 2015 at 11:56 AM, Andrew Dunstan and...@dunslane.net wrote: On 07/13/2015 01:12 PM, Smitha Pamujula wrote: Yes. I have checked that the extension didn't exist in any of the databases. I used \dx to see if there was json_build was listed and i didnt see any. Is that

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Tom Lane
Thom Brown t...@linux.com writes: On 14 July 2015 at 17:17, Robert Haas robertmh...@gmail.com wrote: Since it's trivial to define this function if you need it, I'm not sure there's a reason to include it in core. It's not always possible to create functions on a system when access is

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Adam Brightwell
All, I won't have time to do anything about this anytime soon, but I think we should fix that at some point. Shall I put this on the todo? Or do we want to create an 'open items' page that's not major version specific? I think adding it to the TODO would be great. I'd be willing to

Re: [HACKERS] WIP: Enhanced ALTER OPERATOR

2015-07-14 Thread Jeff Janes
On Tue, Jul 14, 2015 at 8:22 AM, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/13/2015 03:43 PM, Uriy Zhuravlev wrote: Hello hackers. Attached is a new version of patch: * port syntax from NULL to truth NONE * fix documentation (thanks Heikki) * rebase to master Thanks, committed

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread Thom Brown
On 14 July 2015 at 17:17, Robert Haas robertmh...@gmail.com wrote: On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown t...@linux.com wrote: When using currval() to find the current value of all sequences, it chokes on those that aren't initialised. This is expected and documented as behaving in

Re: [HACKERS] WIP: Enhanced ALTER OPERATOR

2015-07-14 Thread Heikki Linnakangas
On 07/14/2015 07:28 PM, Jeff Janes wrote: I'm getting some compiler warnings now: operatorcmds.c: In function 'AlterOperator': operatorcmds.c:504: warning: 'address.objectSubId' may be used uninitialized in this function operatorcmds.c:365: note: 'address.objectSubId' was declared here

Re: [HACKERS] git push hook to check for outdated timestamps

2015-07-14 Thread Peter Eisentraut
On 7/14/15 3:44 AM, Alvaro Herrera wrote: Peter Eisentraut wrote: On 6/25/15 8:08 PM, Robert Haas wrote: Because I don't want to have to do git log --format=fuller to see when the thing was committed, basically. Then I suggest to you the following configuration settings: [format]

Re: [HACKERS] git push hook to check for outdated timestamps

2015-07-14 Thread Alvaro Herrera
Peter Eisentraut wrote: On 7/14/15 3:44 AM, Alvaro Herrera wrote: I have been using a slightly tweaked version of this and I have found that the %w(80,4,4)%B thingy results in mangled formatting; I have since refined this to ... %n%n%w(0,4,4)%s%n%+b You might find that that works

Re: [HACKERS] Could be improved point of UPSERT

2015-07-14 Thread Peter Geoghegan
On Sun, Jul 12, 2015 at 4:09 AM, Yourfriend doudou...@gmail.com wrote: Suggestion: When a conflict was found for UPSERT, don't access the sequence, so users can have a reasonable list of ID. This is not technically feasible. What if the arbiter index is a serial PK? The same thing can happen

Re: [HACKERS] Minor issue with BRIN regression tests

2015-07-14 Thread Robert Haas
On Tue, Jul 14, 2015 at 1:39 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jul 14, 2015 at 10:28 AM, Robert Haas robertmh...@gmail.com wrote: And what, in your opinion, is the issue? The test does not match the comment above it. It looks like someone (possibly me) pasted one too many

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Robert Haas
On Tue, Jul 14, 2015 at 3:07 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: We don't have anything that currently tests the Custom Scan interface in the tree. The question is how important that is, and whether it's worth having what's basically a toy implementation just to demonstrate

Re: [HACKERS] pg_trgm version 1.2

2015-07-14 Thread Jeff Janes
On Tue, Jul 7, 2015 at 6:33 AM, Alexander Korotkov a.korot...@postgrespro.ru wrote: See Tom Lane's comment about downgrade scripts. I think just remove it is a right solution. The new patch removes the downgrade path and the ability to install the old version. (If anyone wants an easy

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-07-14 Thread Jim Nasby
On 7/7/15 7:07 AM, Andres Freund wrote: On 2015-07-03 18:03:58 -0400, Tom Lane wrote: I have just looked through this thread, and TBH I think we should reject this patch altogether --- not RWF, but no we don't want this. The use-case remains hypothetical: no performance numbers showing a

Re: [HACKERS] Implementation of global temporary tables?

2015-07-14 Thread Jim Nasby
On 7/9/15 12:45 AM, Pavel Stehule wrote: 2015-07-09 7:32 GMT+02:00 Zhaomo Yang zhy...@cs.ucsd.edu mailto:zhy...@cs.ucsd.edu: I am not sure, if it is not useless work. I don't understand why an implementation taking approach 2.a would be useless. As I said, its performance will

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Both you and Andres have articulated the concern that CustomScan isn't actually useful, but I still don't really understand why not. I'm curious, for example, whether CustomScan would have been sufficient to build TABLESAMPLE, and if not, why not.

Re: [HACKERS] RLS fails to work with UPDATE ... WHERE CURRENT OF

2015-07-14 Thread Dean Rasheed
On 14 July 2015 at 13:59, Robert Haas robertmh...@gmail.com wrote: On Thu, Jul 9, 2015 at 5:47 PM, Joe Conway m...@joeconway.com wrote: On 06/08/2015 02:08 AM, Dean Rasheed wrote: Actually I think it is fixable just by allowing the CURRENT OF expression to be pushed down into the subquery

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Robert Haas
On Tue, Jul 14, 2015 at 4:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think this ties into my core unhappiness with the customscan stuff, which is that I don't believe it's *possible* to do anything of very great interest with it. I think anything really useful will require core code

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Alvaro Herrera
Robert Haas wrote: We don't have anything that currently tests the Custom Scan interface in the tree. The question is how important that is, and whether it's worth having what's basically a toy implementation just to demonstrate that the feature can work. If so, I think ctidscan is as good

Re: [HACKERS] Memory Accounting v11

2015-07-14 Thread Robert Haas
On Sat, Jul 11, 2015 at 2:28 AM, Jeff Davis pg...@j-davis.com wrote: After talking with a few people at PGCon, small noisy differences in CPU timings can appear for almost any tweak to the code, and aren't necessarily cause for major concern. I agree with that in general, but the concern is a

Re: [HACKERS] Minor issue with BRIN regression tests

2015-07-14 Thread Peter Geoghegan
On Tue, Jul 14, 2015 at 12:45 PM, Robert Haas robertmh...@gmail.com wrote: OK, now I understand. Thanks. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jul 14, 2015 at 3:07 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: As a general principle, I think it's a good idea to have a module that's mostly just a skeleton that guides people into writing something real to use whatever API is being

Re: [HACKERS] optimizing vacuum truncation scans

2015-07-14 Thread Haribabu Kommi
On Mon, Jul 13, 2015 at 5:16 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Mon, Jul 13, 2015 at 12:06 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Thu, Jul 9, 2015 at 5:36 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: I will do some performance tests and send you the

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Kouhei Kaigai
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Wednesday, July 15, 2015 5:47 AM To: Robert Haas Cc: Alvaro Herrera; hlinnaka; Kaigai Kouhei(海外 浩平); Michael Paquier; Jim Nasby; Kohei KaiGai; PgHacker; Simon Riggs Subject: Re: ctidscan as an example of custom-scan

Re: ctidscan as an example of custom-scan (Re: [HACKERS] [v9.5] Custom Plan API)

2015-07-14 Thread Kouhei Kaigai
Or, taking the example of a GpuScan node, it's essentially impossible to persuade the planner to delegate any expensive function calculations, aggregates, etc to such a node; much less teach it that that way is cheaper than doing such things the usual way. So yeah, KaiGai-san may have a

Re: [HACKERS] Memory Accounting v11

2015-07-14 Thread Tomas Vondra
Hi, On 07/14/2015 10:19 PM, Robert Haas wrote: On Sat, Jul 11, 2015 at 2:28 AM, Jeff Davis pg...@j-davis.com wrote: After talking with a few people at PGCon, small noisy differences in CPU timings can appear for almost any tweak to the code, and aren't necessarily cause for major concern. I

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-14 Thread Noah Misch
On Tue, Jul 14, 2015 at 11:14:55AM +0100, Simon Riggs wrote: On 13 July 2015 at 14:39, Tom Lane t...@sss.pgh.pa.us wrote: TBH, I think the right thing to do at this point is to revert the entire patch and send it back for ground-up rework. I think the high-level design is wrong in many

Re: [HACKERS] assessing parallel-safety

2015-07-14 Thread Amit Kapila
On Fri, Jul 3, 2015 at 5:30 PM, Amit Kapila amit.kapil...@gmail.com wrote: Attached, find the rebased patch which can be used to review/test latest version of parallel_seqscan patch which I am going to post in the parallel seq. scan thread soonish. I went ahead and completed this patch with

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Kouhei Kaigai
That doesn't answer my question. I'm talking about a client and server running on the same system with SELinux MLS policy so that getpeercon will return the context of the client process unless it has explicitly sets the socket create context . So again will postgresql if the sepgsql module

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-07-14 Thread Beena Emerson
On Jul 14, 2015 7:15 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 14, 2015 at 9:00 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Jul 13, 2015 at 10:34 PM, Fujii Masao wrote: On Fri, Jul 10, 2015 at 10:06 PM, Beena Emerson wrote: On Tue, Jul 7, 2015 at 2:19 PM,

Re: [HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-14 Thread Simon Riggs
On 15 July 2015 at 05:58, Noah Misch n...@leadboat.com wrote: If it's to stay, it *must* get a line-by-line review from some committer-level person; and I think there are other more important things for us to be doing for 9.5. Honestly, I am very surprised by this. Tom's

Re: [HACKERS] creating extension including dependencies

2015-07-14 Thread Michael Paquier
On Fri, Jul 10, 2015 at 11:28 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@anarazel.de writes: On July 10, 2015 4:16:59 PM GMT+02:00, Tom Lane t...@sss.pgh.pa.us wrote: Would that propagate down through multiple levels of CASCADE? (Although I'm not sure it would be sensible for

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Ted Toth
That doesn't answer my question. I'm talking about a client and server running on the same system with SELinux MLS policy so that getpeercon will return the context of the client process unless it has explicitly sets the socket create context . So again will postgresql if the sepgsql module is

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Kouhei Kaigai
So if I label a table with an SELinux context and the type of my client connection does not have policy to be able to access the table type will an AVC be generated and the access denied? Of course, it depends on the policy of the system. If client connection come from none-SELinux system,

Re: [HACKERS] Could be improved point of UPSERT

2015-07-14 Thread Gianni
On Tuesday 14 July 2015 11:33:34 Peter Geoghegan wrote: On Sun, Jul 12, 2015 at 4:09 AM, Yourfriend doudou...@gmail.com wrote: Suggestion: When a conflict was found for UPSERT, don't access the sequence, so users can have a reasonable list of ID. This is not technically feasible. What if

Re: [HACKERS] Bug in bttext_abbrev_convert()

2015-07-14 Thread Peter Geoghegan
On Mon, Jul 6, 2015 at 12:52 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I suggest CC'ing Peter as a first measure. I already suggested this (or something similar) to him months ago. This would be a worthwhile effort. tuplesort.c only has 46% coverage. There is no coverage for functions

Re: [HACKERS] Forensic recovery deleted pgdump custom format file

2015-07-14 Thread David Guimaraes
Yes Michael, I agree. This is the CloseArchive function at pg_backup_custom.c WriteHead(AH); tpos = ftello(AH-FH); WriteToc(AH); ctx-dataStart = _getFilePos(AH, ctx); WriteDataChunks(AH); This is the WriteHead function at pg_backup_archiver.c: (*AH-WriteBufPtr) (AH, PGDMP, 5); /* Magic code */

Re: [HACKERS] Could be improved point of UPSERT

2015-07-14 Thread Peter Geoghegan
On Tue, Jul 14, 2015 at 11:40 AM, Gianni nasus.maxi...@gmail.com wrote: Could there be a version of UPSERT where an update is tried, and if 0 records are modified, an insert is done? Just wondering, I haven't got am use-case for that. I don't mid gaps in sequences. Perhaps, if you don't

Re: [HACKERS] Minor issue with BRIN regression tests

2015-07-14 Thread Peter Geoghegan
On Tue, Jul 14, 2015 at 9:27 AM, Robert Haas robertmh...@gmail.com wrote: Removing that test doesn't seem important to me. Why does it seem important to you? It's a minor issue, but it's easily fixed. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] Minor issue with BRIN regression tests

2015-07-14 Thread Robert Haas
On Tue, Jul 14, 2015 at 1:26 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jul 14, 2015 at 9:27 AM, Robert Haas robertmh...@gmail.com wrote: Removing that test doesn't seem important to me. Why does it seem important to you? It's a minor issue, but it's easily fixed. And what, in your

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Robert Haas
On Tue, Jul 14, 2015 at 1:22 PM, Ted Toth txt...@gmail.com wrote: I'm sort of new to this so maybe I'm missing something but since the sepgsql SELinux userspace object manager was never integrated into postgresql (AFAIK KaiGais branch was never merged into the mainline) who uses these labels?

Re: [HACKERS] [DESIGN] Incremental checksums

2015-07-14 Thread Jim Nasby
On 7/13/15 4:02 PM, David Christensen wrote: On Jul 13, 2015, at 3:50 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 7/13/15 3:26 PM, David Christensen wrote: * Incremental Checksums PostgreSQL users should have a way up upgrading their cluster to use data checksums without having to do

Re: [HACKERS] Freeze avoidance of very large table.

2015-07-14 Thread Alvaro Herrera
Michael Paquier wrote: On Mon, Jul 13, 2015 at 9:03 PM, Sawada Masahiko sawada.m...@gmail.com wrote: We use script file which are generated by pg_upgrade. I haven't followed this thread closely, but I am sure you recall that vacuumdb has a parallel mode. I think having to vacuum the

Re: [HACKERS] git push hook to check for outdated timestamps

2015-07-14 Thread Alvaro Herrera
Peter Eisentraut wrote: On 6/25/15 8:08 PM, Robert Haas wrote: Because I don't want to have to do git log --format=fuller to see when the thing was committed, basically. Then I suggest to you the following configuration settings: [format] pretty=cmedium [pretty]

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Ted Toth
I'm sort of new to this so maybe I'm missing something but since the sepgsql SELinux userspace object manager was never integrated into postgresql (AFAIK KaiGais branch was never merged into the mainline) who uses these labels? What use are they? Ted On Tue, Jul 14, 2015 at 12:09 PM, Adam

Re: [HACKERS] [PATCH] Add missing \ddp psql command

2015-07-14 Thread Alvaro Herrera
Fujii Masao wrote: Sometimes I type TAB after \ to display all the psql meta commands. Even single-character completion like \s may be useful for that case. Yeah, I agree that's narrow use case, though. I agree that that's useful, so thanks for having pushed it. -- Álvaro Herrera

Re: [HACKERS] Selectivity estimation for intarray with @@

2015-07-14 Thread Jeff Janes
On Tue, May 26, 2015 at 4:58 AM, Uriy Zhuravlev u.zhurav...@postgrespro.ru wrote: Hello. Attached patch based on: http://www.postgresql.org/message-id/capphfdssy+qepdcovxx-b4lp3ybr+qs04m6-arggknfk3fr...@mail.gmail.com and adds selectivity estimation functions to @@ (port from tsquery). Now

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Kohei KaiGai
2015-07-15 2:39 GMT+09:00 Ted Toth txt...@gmail.com: That's exactly what I'm talking about like I said KaiGais branch was never merged into the mainline so I do not believe that it is used at all. It depends on the definition of integrated. The PostgreSQL core offers an infrastructure for

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-14 Thread Ted Toth
So if I label a table with an SELinux context and the type of my client connection does not have policy to be able to access the table type will an AVC be generated and the access denied? Ted On Tue, Jul 14, 2015 at 12:53 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: 2015-07-15 2:39 GMT+09:00 Ted

Re: [HACKERS] Freeze avoidance of very large table.

2015-07-14 Thread Sawada Masahiko
On Wed, Jul 15, 2015 at 12:55 AM, Simon Riggs si...@2ndquadrant.com wrote: On 10 July 2015 at 15:11, Sawada Masahiko sawada.m...@gmail.com wrote: Oops, I had forgotten to add new file heapfuncs.c. Latest patch is attached. I think we've established the approach is desirable and defined the