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

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 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 we can't leak the c

[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 concer

Re: [HACKERS] psql showing owner in \dT

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 3:27 PM, Alvaro Herrera 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 attached triv

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 Thu, Apr 9, 2015 at 5:46 PM, Andres Freund wrote: > On 2015-04-09 15:56:00 +0200, Magnus Hagander wrote: > > On Thu, Apr 9, 2015 at 3:20 PM, Andres Freund > wrote: > > > > > Hi, > > > > > > On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: > > > > + > > > > + > > > > pg_stat_sslpg_st

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 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.

[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

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 Open

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-09 Thread Sawada Masahiko
On Thu, Apr 9, 2015 at 1:14 PM, Fujii Masao wrote: > On Wed, Apr 8, 2015 at 10:53 PM, Sawada Masahiko > wrote: >> On Wed, Apr 8, 2015 at 1:09 PM, Fujii Masao wrote: >>> On Wed, Apr 8, 2015 at 1:57 AM, Sawada Masahiko >>> wrote: On Wed, Apr 8, 2015 at 1:11 AM, Fabrízio de Royes Mello

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'

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? REVOKE

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 wrote: > > > Hi, > > > > On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: > > > + > > > + > > > > pg_stat_sslpg_stat_ssl > > > + One row per connection (regular and replication),

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 ma

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 pg_current_xlog_insert

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" > C

[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 da

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 wrote: > On Thu, Apr 9, 2015 at 2:20 PM, Tom Lane > wrote: > >> Magnus Hagander > > writes: >> > On Apr 9, 2015 2:20 AM, "Robert Haas" > > wrote: >> >> +1. >> >> > Is that at +1 for naming it moved, or for not having it? :-) >> >> > I can definitely go

Re: [HACKERS] SSL information view

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 3:20 PM, Andres Freund wrote: > Hi, > > On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: > > + > > + > > pg_stat_sslpg_stat_ssl > > + One row per connection (regular and replication), showing > information about > > +SSL used on this connection. >

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 a

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 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* > > to re-li

Re: [HACKERS] Row security violation error is misleading

2015-04-09 Thread Craig Ringer
On 9 April 2015 at 14:56, Dean Rasheed wrote: > On 8 April 2015 at 16:27, Stephen Frost 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 pe

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 wrote: > On Tue, Apr 7, 2015 at 1:33 PM, Tom Lane wrote: > >> Peter Eisentraut 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. >> >>

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? -- Álv

Re: [HACKERS] SSL information view

2015-04-09 Thread Andres Freund
Hi, On 2015-04-09 13:31:55 +0200, Magnus Hagander wrote: > + > + > pg_stat_sslpg_stat_ssl > + One row per connection (regular and replication), showing > information about > +SSL used on this connection. > +See for details. > + > + > + I kinda wo

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 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 policies, if multiple p

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 p

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 wrote: > Peter Eisentraut 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 concerns? > > Are we happy wi

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 wrote: > Magnus Hagander writes: > > On Apr 9, 2015 2:20 AM, "Robert Haas" 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

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 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 usef

[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/ *** a/src/bin/psql/describe

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 のメール: > * 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] "rejected" vs "returned with feedback" in new CF app

2015-04-09 Thread Tom Lane
Magnus Hagander writes: > On Apr 9, 2015 2:20 AM, "Robert Haas" 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 the history of the patch follow >

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; > + } > + els

Re: [HACKERS] SSL information view

2015-04-09 Thread Magnus Hagander
On Wed, Dec 17, 2014 at 9:19 PM, Heikki Linnakangas 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 *) >> + S

Re: [HACKERS] Parallel Seq Scan

2015-04-09 Thread David Rowley
On 9 April 2015 at 00:12, Amit Kapila wrote: > On Wed, Apr 8, 2015 at 3:30 PM, David Rowley wrote: > > > > On 8 April 2015 at 15:46, Amit Kapila wrote: > >> > >> I think there is always a chance that resources (like parallel-workers) > >> won't be available at run-time even if we decide about t

[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 Simon Riggs
On 9 April 2015 at 04:52, Simon Riggs 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 work correctly. T

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 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 the other reg* types. And I

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Michael Paquier
On Thu, Apr 9, 2015 at 5:52 PM, Simon Riggs wrote: > On 9 April 2015 at 04:12, Michael Paquier 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

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Michael Paquier
On Thu, Apr 9, 2015 at 5:12 PM, Michael Paquier wrote: > On Thu, Apr 9, 2015 at 4:30 AM, Jeff Janes wrote: >> On Mon, Apr 6, 2015 at 11:02 AM, Petr Jelinek 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 de

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Simon Riggs
On 9 April 2015 at 04:12, Michael Paquier 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) select > query_select

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 the

Re: [HACKERS] TABLESAMPLE patch

2015-04-09 Thread Michael Paquier
On Thu, Apr 9, 2015 at 4:30 AM, Jeff Janes wrote: > On Mon, Apr 6, 2015 at 11:02 AM, Petr Jelinek 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 send v12 in the

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" wrote: > > On Apr 9, 2015, at 1:08 AM, Andres Freund 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 moved, or for not having it? :

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 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 wildcard and system_o

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 wrote in <24663.1427828...@sss.pgh.pa.us> > Kyotaro HORIGUCHI writes: > > If I'm not missing anyting, putting stereotyped information about > > GUC contexts like following would be usable. > > >> share_buffers (inte