Re: TupleTableSlot abstraction

2018-08-05 Thread Andres Freund
Hi, On 2018-08-06 10:08:24 +0530, Ashutosh Bapat wrote: > I think, I explained why getattr() needs to be a separate callback. > There's a reason why slot_getattr() more code than just calling > slot_getsomeattrs() and return the required one - the cases when the > requested attribute is NULL or

Re: TupleTableSlot abstraction

2018-08-05 Thread Ashutosh Bapat
On Sun, Aug 5, 2018 at 3:49 PM, Andres Freund wrote: > Hi, > > Working on rebasing the pluggable storage patch on the current version > of this. Thanks. Please let me know if you see any issues. > > On 2018-07-26 17:09:08 +0530, Ashutosh Bapat wrote: >> Done. I also noticed that slot_getattr()

Allow postgres_fdw passwordless non-superuser conns with prior superuser permission

2018-08-05 Thread Craig Ringer
Hi all Currently postgres_fdw cannot be used with 'cert' authentication, i.e. client-certificate validation and cert cn => postgres username mapping. You also can't use things like Kerberos, SSPI, etc with a superuser-created FDW and username map. To permit this, I'd like to allow postgres_fdw

Re: REINDEX and shared catalogs

2018-08-05 Thread Bossart, Nathan
On 8/5/18, 4:12 PM, "Michael Paquier" wrote: > Attached is a set of patches I proposed on the original thread, which > skips shared catalogs if the user running REINDEX is not an owner of > it. This is a behavior change, and as I have a hard time believing that > anybody can take advantage of

Re: [report] memory leaks in COPY FROM on partitioned table

2018-08-05 Thread Kohei KaiGai
2018-08-06 1:50 GMT+09:00 Alvaro Herrera : >> Now, it consumed about 60MB rss at the beginning of COPY FROM, and it >> grows up very slowly during the COPY FROM execution, then grew up to >> 250MB before completion. >> We may have another memory blocks which are not released during >> execution,

Re: [report] memory leaks in COPY FROM on partitioned table

2018-08-05 Thread Alvaro Herrera
On 2018-Aug-04, Kohei KaiGai wrote: > I could load the same data (544GB csv, 789GB heap) using COPY FROM > successfully. > When I reported the problem, rss usage of postgresql process increased > about 10MB/s ratio, then OOM killer eliminated after a few hours. OK, I think we can consider this

Re: Should contrib modules install .h files?

2018-08-05 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: Andrew> Here's a patch that fixes (not necessarily in the best way) the Andrew> PGXS builds of all the contrib/*_pl{perl,python} modules. Oh, obviously this patch doesn't fix the windows Install.pm yet, but that'd be easier to do after finalizing the

Re: Should contrib modules install .h files?

2018-08-05 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> This logic could perhaps be best moved into the pgxs makefile >> itself, either unconditionally adding -I options to CPPFLAGS, or >> conditionally adding them based on a WANT_EXTENSION_HEADERS flag of >> some sort set by the module makefile. Tom> I think

REINDEX and shared catalogs

2018-08-05 Thread Michael Paquier
Hi all, This is a continuation of the thread "Canceling authentication due to timeout aka Denial of Service Attack", which is here to focus on the case of REINDEX: https://www.postgresql.org/message-id/20180730003422.GA2878%40paquier.xyz As visibly the set of patches I proposed on this thread is

Re: Should contrib modules install .h files?

2018-08-05 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> The module would reference its own headers using #include "foo.h", >> which would not find extension/module/foo.h, so no problem here. Tom> Check, although we also need to document that you should do it Tom> that way. Also, at least with gcc, the rule

Re: [GSoC]The project summary

2018-08-05 Thread Aleksander Alekseev
Hello Charles, Thanks for keeping us informed. As you probably already discovered the email I used previously doesn't work any longer. Please add afis...@gmail.com to CC instead. I will take a look tomorrow (it's pretty late in my timezone currently). On Sun, Aug 5, 2018 at 9:05 PM, Charles Cui

[GSoC]The project summary

2018-08-05 Thread Charles Cui
Hi mentors and hackers, The final review is coming. Here is the project summary for the thrift plugin work for Postgres database. Please let me know if there are anything missing for the final review. 1. Implement the thrift binary protocol for both simple data structures (e.g., int, double)

Re: pg_upgrade from 9.4 to 10.4

2018-08-05 Thread Bruce Momjian
On Sat, Aug 4, 2018 at 11:26:06PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Aug 3, 2018 at 04:56:32PM -0400, Bruce Momjian wrote: > >> On Fri, Aug 3, 2018 at 01:55:04PM -0400, Tom Lane wrote: > >>> Right now is probably not a good time to fix this, but it seems like > >>>

Re: Should contrib modules install .h files?

2018-08-05 Thread Tom Lane
[ back to this after a detour to ON CONFLICT land ] Andrew Gierth writes: > OK, after considerable experiment I think I can answer these points: the > most "practical" way is to do this (or an equivalent), as you originally > suggested: > PG_CPPFLAGS = -I$(includedir_server)/extension Yeah,

Re: GiST VACUUM

2018-08-05 Thread Andrey Borodin
Hi! > 5 авг. 2018 г., в 16:18, Heikki Linnakangas написал(а): > > On 31/07/18 23:06, Andrey Borodin wrote: >>> On a typical GiST index, what's the ratio of leaf vs. internal >>> pages? Perhaps an array would indeed be better. > > >> Typical GiST has around 200 tuples per internal page. I've

Re: Negotiating the SCRAM channel binding type

2018-08-05 Thread Heikki Linnakangas
On 5 August 2018 19:01:04 EEST, Tom Lane wrote: >Heikki Linnakangas writes: >> Sorry, I see now that there was indeed a test for >> scram_channel_binding='', which meant "no channel binding". That was >> confusing, I assumed '' was the default. > >Ugh, it isn't? There's a general principle in

Re: Negotiating the SCRAM channel binding type

2018-08-05 Thread Tom Lane
Heikki Linnakangas writes: > Sorry, I see now that there was indeed a test for > scram_channel_binding='', which meant "no channel binding". That was > confusing, I assumed '' was the default. Ugh, it isn't? There's a general principle in libpq that setting a parameter to an empty string is

Re: Negotiating the SCRAM channel binding type

2018-08-05 Thread Heikki Linnakangas
On 05/08/18 17:11, I wrote: The only negative test there was, was to check for bogus scram_channel_binding option, "scram_channel_binding=not-exists". Yeah, it would be nice to have some, but this commit didn't really change that situation. Sorry, I see now that there was indeed a test for

Re: Negotiating the SCRAM channel binding type

2018-08-05 Thread Heikki Linnakangas
On 05/08/18 15:45, Michael Paquier wrote: On Sun, Aug 05, 2018 at 03:30:43PM +0300, Heikki Linnakangas wrote: That test just tested that the scram_channel_binding libpq option works, but I removed the option. I know you wanted to keep it as a feature flag, but as discussed earlier, I don't

Re: [PATCH v18] GSSAPI encryption support

2018-08-05 Thread Heikki Linnakangas
Sorry if this sounds facetious, but: What is the point of this patch? What's the advantage of GSSAPI encryption over SSL? I was hoping to find the answer by reading the documentation changes, but all I can see is "how" to set it up, and nothing about "why". - Heikki

Re: Negotiating the SCRAM channel binding type

2018-08-05 Thread Michael Paquier
On Sun, Aug 05, 2018 at 03:30:43PM +0300, Heikki Linnakangas wrote: > That test just tested that the scram_channel_binding libpq option works, but > I removed the option. I know you wanted to keep it as a feature flag, but as > discussed earlier, I don't think that'd be useful. Sorry for the

Re: Negotiating the SCRAM channel binding type

2018-08-05 Thread Heikki Linnakangas
On 05/08/18 15:08, Michael Paquier wrote: On Sun, Aug 05, 2018 at 02:00:04PM +0300, Heikki Linnakangas wrote: I did some further testing with this, compiling with and without HAVE_BE_TLS_GET_CERTIFICATE_HASH and HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH, and fixed a few combinations that did not

Re: Explain buffers wrong counter with parallel plans

2018-08-05 Thread Amit Kapila
On Fri, Aug 3, 2018 at 2:09 PM, Amit Kapila wrote: > On Thu, Aug 2, 2018 at 11:14 PM, Robert Haas wrote: >> On Thu, Aug 2, 2018 at 5:41 AM, Amit Kapila wrote: >>> I have created three patches (a) move InstrStartParallelQuery from its >>> original location so that we perform it just before

Re: GiST VACUUM

2018-08-05 Thread Heikki Linnakangas
On 31/07/18 23:06, Andrey Borodin wrote: On a typical GiST index, what's the ratio of leaf vs. internal pages? Perhaps an array would indeed be better. > Typical GiST has around 200 tuples per internal page. I've switched to List since it's more efficient than bitmap. Hmm. A ListCell is 16

Re: Negotiating the SCRAM channel binding type

2018-08-05 Thread Heikki Linnakangas
Thanks for the review! On 22/07/18 16:54, Michael Paquier wrote: On Fri, Jul 20, 2018 at 08:05:04PM +0300, Heikki Linnakangas wrote: This removes the scram_channel_binding libpq option altogether, since there is now only one supported channel binding type. This can also be used to switch off

Re: TupleTableSlot abstraction

2018-08-05 Thread Andres Freund
Hi, Working on rebasing the pluggable storage patch on the current version of this. On 2018-07-26 17:09:08 +0530, Ashutosh Bapat wrote: > Done. I also noticed that slot_getattr() optimizes the cases when the > requested attributes is NULL or is missing from a tuple. Given that a > custom

Re: Pluggable Storage - Andres's take

2018-08-05 Thread Andres Freund
Hi, I'm currently in the process of rebasing zheap onto the pluggable storage work. The goal, which seems to work surprisingly well, is to find issues that the current pluggable storage patch doesn't yet deal with. I plan to push a tree including a lot of fixes and improvements soon. On

Facility for detecting insecure object naming

2018-08-05 Thread Noah Misch
Commit e09144e documented the rules for writing safe qualified names, but those rules are tedious to apply in practice. Spotting the defects in this function definition (from an unpublished draft intended for https://postgr.es/m/20180710014308.ga805...@rfd.leadboat.com) is, I think, too hard: