Re: [HACKERS] pg_restore -t should match views, matviews, and foreign tables

2015-04-09 Thread Craig Ringer
On 8 April 2015 at 05:05, David G. Johnston david.g.johns...@gmail.com wrote: On Tue, Apr 7, 2015 at 1:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 3/31/15 11:01 PM, Craig Ringer wrote: this patch adds support for views, foreign tables, and

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Michael Paquier
On Thu, Apr 9, 2015 at 5:12 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Apr 9, 2015 at 4:30 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Mon, Apr 6, 2015 at 11:02 AM, Petr Jelinek p...@2ndquadrant.com wrote: On 06/04/15 14:30, Petr Jelinek wrote: On 06/04/15 11:02, Simon

Re: [HACKERS] Row security violation error is misleading

2015-04-09 Thread Craig Ringer
On 9 April 2015 at 01:30, Dean Rasheed dean.a.rash...@gmail.com wrote: That doesn't match what the code currently does: * Also, allow extensions to add their own policies. * * Note that, as with the internal policies, if multiple policies are * returned then they will

[HACKERS] Revisiting Re: BUG #8532: postgres fails to start with timezone-data =2013e

2015-04-09 Thread Ian Stakenvicius
Hey all -- so I know that Gentoo Linux is likely the only platform this bug occurs under, but i got annoyed enough with it that I decided to write a patch to fix this issue once and for all (or at least, help keep it from happening). That thread in question actually dealt with crashing on startup

Re: [HACKERS] libpq's multi-threaded SSL callback handling is busted

2015-04-09 Thread Jan Urbański
Peter Eisentraut writes: On 2/12/15 7:28 AM, Jan Urbański wrote: +#if OPENSSL_VERSION_NUMBER 0x1000 +/* OpenSSL 1.0.0 deprecates the CRYPTO_set_id_callback function and provides a + * default implementation, so there's no need for our own. */ I have some additional concerns about

Re: [HACKERS] SSL information view

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 3:20 PM, Andres Freund and...@anarazel.de wrote: Hi, On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: + row + entrystructnamepg_stat_ssl/indextermprimarypg_stat_ssl/primary/indexterm/entry + entryOne row per connection (regular and replication),

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Apr 9, 2015 2:20 AM, Robert Haas robertmh...@gmail.com wrote: +1. Is that at +1 for naming it moved, or for not having it? :-) I can definitely go with moved. Buy I would like to keep it - the reason for having it in the first place is to make

Re: [HACKERS] Row security violation error is misleading

2015-04-09 Thread Dean Rasheed
On 8 April 2015 at 16:27, Stephen Frost sfr...@snowman.net wrote: * Dean Rasheed (dean.a.rash...@gmail.com) wrote: I actually re-used the sql status code 42501 - ERRCODE_INSUFFICIENT_PRIVILEGE for a RLS check failure because of the parallel with permissions checks, but I quite like Craig's

[HACKERS] raw output from copy

2015-04-09 Thread Pavel Stehule
Hi This thread was finished without real work. I have a real use case - export XML doc in non utf8 encoding. http://www.postgresql.org/message-id/16174.1319228...@sss.pgh.pa.us I propose to implement new format option RAW like Tom proposed. It requires only one row, one column result - and

Re: [HACKERS] libpq's multi-threaded SSL callback handling is busted

2015-04-09 Thread Peter Eisentraut
On 2/12/15 7:28 AM, Jan Urbański wrote: +#if OPENSSL_VERSION_NUMBER 0x1000 +/* OpenSSL 1.0.0 deprecates the CRYPTO_set_id_callback function and provides a + * default implementation, so there's no need for our own. */ I have some additional concerns about this. It is true that OpenSSL

Re: [HACKERS] Row security violation error is misleading

2015-04-09 Thread Craig Ringer
On 8 April 2015 at 19:52, Dean Rasheed dean.a.rash...@gmail.com wrote: 2). In prepend_row_security_policies(), I think it is better to have any table RLS policies applied before any hook policies, so that a hook cannot be used to bypass built-in RLS. A hook really has to be able to ensure

Re: [HACKERS] SSL information view

2015-04-09 Thread Andres Freund
On 2015-04-09 15:56:00 +0200, Magnus Hagander wrote: On Thu, Apr 9, 2015 at 3:20 PM, Andres Freund and...@anarazel.de wrote: Hi, On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: + row + entrystructnamepg_stat_ssl/indextermprimarypg_stat_ssl/primary/indexterm/entry

[HACKERS] FPW compression leaks information

2015-04-09 Thread Heikki Linnakangas
Now that we have compression of full-page images in WAL, it can be used to leak sensitive information you're not supposed to see. Somewhat similar to the recent BREACH and CRIME attacks on SSL, if you can insert into a table, the compression ratio gives you a hint of how similar the existing

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread Andrew Dunstan
On 04/09/2015 09:09 AM, Magnus Hagander wrote: Moved is really only applicable, I think, for cases where we punt a patch to the next CF for lack of time. Well, that's basically what returned with feedback is now, so I guess that one should just be renamed in that case. And we add

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread Andres Freund
On 2015-04-09 15:09:55 +0200, Magnus Hagander wrote: If we just link the email thread, that would mean we loose all those precious annotations we just added support for. Is that really what you meant? We also loose all history of a patch, and can't see that a previous version existed in a

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-04-09 Thread Peter Geoghegan
On Wed, Mar 18, 2015 at 2:59 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: Yes, I read that, and I agree with the intention to not leak data according to both the INSERT and UPDATE policies, however... You're seeing a failure that applies to the target tuple of the UPDATE (the tuple that

Re: [HACKERS] Shouldn't CREATE TABLE LIKE copy the relhasoids property?

2015-04-09 Thread Bruce Momjian
On Wed, Jan 14, 2015 at 07:29:24PM -0500, Tom Lane wrote: dst1 doesn't get an OID column: regression=# create table src1 (f1 int) with oids; CREATE TABLE regression=# create table dst1 (like src1); CREATE TABLE regression=# \d+ src1 Table public.src1 Column |

Re: [HACKERS] SSL information view

2015-04-09 Thread Andres Freund
Hi, On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: + row + entrystructnamepg_stat_ssl/indextermprimarypg_stat_ssl/primary/indexterm/entry + entryOne row per connection (regular and replication), showing information about +SSL used on this connection. +

Re: [HACKERS] pg_restore -t should match views, matviews, and foreign tables

2015-04-09 Thread Craig Ringer
On 8 April 2015 at 04:33, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 3/31/15 11:01 PM, Craig Ringer wrote: this patch adds support for views, foreign tables, and materialised views to the pg_restore -t flag. I think this is a good change. Any

Re: [HACKERS] psql showing owner in \dT

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 3:27 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Magnus Hagander wrote: After running into the need twice now - is there a particular reason why we don't have psql showing the owner of a type, at least in \dT+? Can't think of anything ... If not, how about

Re: [HACKERS] FPW compression leaks information

2015-04-09 Thread Stephen Frost
* Heikki Linnakangas (hlinn...@iki.fi) wrote: On 04/09/2015 06:28 PM, Stephen Frost wrote: * Heikki Linnakangas (hlinn...@iki.fi) wrote: What should we do about this? Make it configurable on a per-table basis? Disable FPW compression on system tables? Disable FPW on tables you don't have

Re: [HACKERS] Shouldn't CREATE TABLE LIKE copy the relhasoids property?

2015-04-09 Thread Alvaro Herrera
Bruce Momjian wrote: Should this be listed in the release notes as a backward-incompatibility? Isn't this a backpatchable bug fix? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-hackers

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread Alvaro Herrera
Magnus Hagander wrote: On Thu, Apr 9, 2015 at 2:20 PM, Tom Lane t...@sss.pgh.pa.us wrote: The right workflow here, IMO, is that a patch should be marked returned or rejected, full stop; and then when/if the author submits a new version for a future CF, there should be a way *at that time*

[HACKERS] psql showing owner in \dT

2015-04-09 Thread Magnus Hagander
After running into the need twice now - is there a particular reason why we don't have psql showing the owner of a type, at least in \dT+? If not, how about attached trivial patch? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ ***

[HACKERS] Possible gaps/garbage in the output of XLOG reader

2015-04-09 Thread Antonin Houska
While playing with xlogreader, I was lucky enough to see one of the many record validations to fail. After having some fun with gdb, I found out that in some cases the reader does not enforce enough data to be in state-readBuf before copying into state-readRecordBuf starts. This should not happen

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Peter Eisentraut
On 4/9/15 5:02 AM, Michael Paquier wrote: Just to be clear, the example above being misleading... Doing table sampling using SYSTEM at physical level makes sense. In this case I think that we should properly error out when trying to use this method on something not present at physical level.

Re: [HACKERS] SSL information view

2015-04-09 Thread Magnus Hagander
On Wed, Dec 17, 2014 at 9:19 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 11/19/2014 02:36 PM, Magnus Hagander wrote: + /* Create or attach to the shared SSL status buffers */ + size = mul_size(NAMEDATALEN, MaxBackends); + BackendSslVersionBuffer = (char *) +

Re: [HACKERS] FPW compression leaks information

2015-04-09 Thread Heikki Linnakangas
On 04/09/2015 06:28 PM, Stephen Frost wrote: * Heikki Linnakangas (hlinn...@iki.fi) wrote: What should we do about this? Make it configurable on a per-table basis? Disable FPW compression on system tables? Disable FPW on tables you don't have SELECT access to? Add a warning to the docs?

Re: [HACKERS] Making src/test/ssl more robust

2015-04-09 Thread Michael Paquier
On Wed, Apr 8, 2015 at 9:57 PM, Michael Paquier michael.paqu...@gmail.com wrote: I noticed two things while looking at the SSL test suite: 1) When running the tests, some logs are generated in client-log, but this log file has no entry in .gitignore... A patch is attached. 2) cp is used with a

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Petr Jelinek
On 09/04/15 11:37, Simon Riggs wrote: On 9 April 2015 at 04:52, Simon Riggs si...@2ndquadrant.com wrote: TABLESAMPLE BERNOULLI could work in this case, or any other non-block based sampling mechanism. Whether it does work yet is another matter. This query should be part of the test suite and

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Michael Paquier
On Thu, Apr 9, 2015 at 5:52 PM, Simon Riggs si...@2ndquadrant.com wrote: On 9 April 2015 at 04:12, Michael Paquier michael.paqu...@gmail.com wrote: Also, I am wondering if the sampling logic based on block analysis is actually correct, for example for now this fails and I think that we should

Re: [HACKERS] Making src/test/ssl more robust

2015-04-09 Thread Heikki Linnakangas
On 04/09/2015 10:06 AM, Michael Paquier wrote: On Wed, Apr 8, 2015 at 9:57 PM, Michael Paquier michael.paqu...@gmail.com wrote: I noticed two things while looking at the SSL test suite: 1) When running the tests, some logs are generated in client-log, but this log file has no entry in

Re: [HACKERS] How about to have relnamespace and relrole?

2015-04-09 Thread Kyotaro HORIGUCHI
Hello, sorry for the absence. I changed the regnamespace's behavior as the same as the other reg* types. And I attached a patch as separate one that fixes regroleout to do the same as the other reg* types, because I have 0001-Add-regrole_v6.patch : fix regnamespace to behave as the same as

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Simon Riggs
On 9 April 2015 at 04:52, Simon Riggs si...@2ndquadrant.com wrote: TABLESAMPLE BERNOULLI could work in this case, or any other non-block based sampling mechanism. Whether it does work yet is another matter. This query should be part of the test suite and should generate a useful message or

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-09 Thread Sawada Masahiko
On Thu, Apr 9, 2015 at 1:14 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Apr 8, 2015 at 10:53 PM, Sawada Masahiko sawada.m...@gmail.com wrote: On Wed, Apr 8, 2015 at 1:09 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Apr 8, 2015 at 1:57 AM, Sawada Masahiko sawada.m...@gmail.com

Re: [HACKERS] Row security violation error is misleading

2015-04-09 Thread Stephen Frost
* Craig Ringer (cr...@2ndquadrant.com) wrote: On 9 April 2015 at 01:30, Dean Rasheed dean.a.rash...@gmail.com wrote: That doesn't match what the code currently does: Ah, right. * Also, allow extensions to add their own policies. * * Note that, as with the internal

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-04-09 Thread Kouhei Kaigai
2015/04/09 10:48、Kouhei Kaigai kai...@ak.jp.nec.com のメール: * merge_fpinfo() It seems to me fpinfo-rows should be joinrel-rows, and fpinfo-width also should be joinrel-width. No need to have special intelligence here, isn't it? Oops. They are vestige of my struggle which disabled

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Michael Paquier
On Thu, Apr 9, 2015 at 4:30 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Mon, Apr 6, 2015 at 11:02 AM, Petr Jelinek p...@2ndquadrant.com wrote: On 06/04/15 14:30, Petr Jelinek wrote: On 06/04/15 11:02, Simon Riggs wrote: Are we ready for a final detailed review and commit? I plan to

Re: [HACKERS] Row security violation error is misleading

2015-04-09 Thread Craig Ringer
On 9 April 2015 at 14:56, Dean Rasheed dean.a.rash...@gmail.com wrote: On 8 April 2015 at 16:27, Stephen Frost sfr...@snowman.net wrote: * Dean Rasheed (dean.a.rash...@gmail.com) wrote: I actually re-used the sql status code 42501 - ERRCODE_INSUFFICIENT_PRIVILEGE for a RLS check failure

Re: [HACKERS] SSL information view

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 5:46 PM, Andres Freund and...@anarazel.de wrote: On 2015-04-09 15:56:00 +0200, Magnus Hagander wrote: On Thu, Apr 9, 2015 at 3:20 PM, Andres Freund and...@anarazel.de wrote: Hi, On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: + row +

Re: [HACKERS] GUC context information in the document.

2015-04-09 Thread Kyotaro HORIGUCHI
Hello, thank you for the comment. At Tue, 31 Mar 2015 15:07:08 -0400, Tom Lane t...@sss.pgh.pa.us wrote in 24663.1427828...@sss.pgh.pa.us Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp writes: If I'm not missing anyting, putting stereotyped information about GUC contexts like following

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread Magnus Hagander
On Apr 9, 2015 2:20 AM, Robert Haas robertmh...@gmail.com wrote: On Apr 9, 2015, at 1:08 AM, Andres Freund and...@anarazel.de wrote: I'm not convinced we really need a version that closes and moves a entry. But if we indeed want it we can just name it moved. +1. Is that at +1 for naming it

Re: [HACKERS] Parallel Seq Scan

2015-04-09 Thread David Rowley
On 9 April 2015 at 00:12, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Apr 8, 2015 at 3:30 PM, David Rowley dgrowle...@gmail.com wrote: On 8 April 2015 at 15:46, Amit Kapila amit.kapil...@gmail.com wrote: I think there is always a chance that resources (like parallel-workers)

Re: [HACKERS] psql showing owner in \dT

2015-04-09 Thread Alvaro Herrera
Magnus Hagander wrote: After running into the need twice now - is there a particular reason why we don't have psql showing the owner of a type, at least in \dT+? Can't think of anything ... If not, how about attached trivial patch? Owner should normally be printed before ACL, no? --

Re: [HACKERS] NOT NULL markings for BKI columns

2015-04-09 Thread Andres Freund
Specifically, this code chunk: + if (defined $attopt) + { + if ($attopt eq 'PG_FORCE_NULL') + { + $row{'forcenull'} = 1; + } + elsif

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 2:20 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Apr 9, 2015 2:20 AM, Robert Haas robertmh...@gmail.com wrote: +1. Is that at +1 for naming it moved, or for not having it? :-) I can definitely go with moved. Buy I would

Re: [HACKERS] FPW compression leaks information

2015-04-09 Thread Stephen Frost
* Heikki Linnakangas (hlinn...@iki.fi) wrote: What should we do about this? Make it configurable on a per-table basis? Disable FPW compression on system tables? Disable FPW on tables you don't have SELECT access to? Add a warning to the docs? REVOKE EXECUTE ON FUNCTION

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread David G. Johnston
On Thursday, April 9, 2015, Magnus Hagander mag...@hagander.net wrote: On Thu, Apr 9, 2015 at 2:20 PM, Tom Lane t...@sss.pgh.pa.us javascript:_e(%7B%7D,'cvml','t...@sss.pgh.pa.us'); wrote: Magnus Hagander mag...@hagander.net javascript:_e(%7B%7D,'cvml','mag...@hagander.net'); writes: On

Re: [HACKERS] How about to have relnamespace and relrole?

2015-04-09 Thread Kyotaro HORIGUCHI
I sent the previous mail unfinished. At Thu, 09 Apr 2015 17:25:10 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote in 20150409.172510.29010318.horiguchi.kyot...@lab.ntt.co.jp Hello, sorry for the absence. I changed the regnamespace's behavior as the same as

Re: [HACKERS] Shouldn't CREATE TABLE LIKE copy the relhasoids property?

2015-04-09 Thread Bruce Momjian
On Thu, Apr 9, 2015 at 12:32:23PM -0300, Alvaro Herrera wrote: Bruce Momjian wrote: Should this be listed in the release notes as a backward-incompatibility? Isn't this a backpatchable bug fix? Uh, I don't think so. I think users are used to the existing behavior and changing it on them

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Simon Riggs
On 9 April 2015 at 04:12, Michael Paquier michael.paqu...@gmail.com wrote: Also, I am wondering if the sampling logic based on block analysis is actually correct, for example for now this fails and I think that we should support it: =# with query_select as (select generate_series(1, 10) as a)