Re: plan_cache_mode and postgresql.conf.sample

2018-08-21 Thread Michael Paquier
On Wed, Aug 22, 2018 at 06:26:52PM +1200, Thomas Munro wrote: > Thanks, pushed. I removed one tab because it looks like the comments > in that file are supposed to line up with tabstop=8 (unlike our source > files which use 4), and this one didn't. I hope I got that right! This line now spawns a

Re: plan_cache_mode and postgresql.conf.sample

2018-08-21 Thread Thomas Munro
On Wed, Aug 22, 2018 at 5:45 PM, David Rowley wrote: > While testing something that I needed to ensure a generic plan was > being used, during editing postgresql.conf I couldn't quite remember > the exact spelling of the option to do that. I think the valid > options for the setting should be lis

Re: JIT compiling with LLVM v12

2018-08-21 Thread Noah Misch
On Wed, Mar 28, 2018 at 02:27:51PM -0700, Andres Freund wrote: > For now LLVM is enabled by default when compiled --with-llvm. I'm mildly > inclined to leave it like that until shortly before the release, and > then disable it by default (i.e. change the default of jit=off). But I > think we can ma

plan_cache_mode and postgresql.conf.sample

2018-08-21 Thread David Rowley
Hi, While testing something that I needed to ensure a generic plan was being used, during editing postgresql.conf I couldn't quite remember the exact spelling of the option to do that. I think the valid options for the setting should be listed in the sample config file. Patch attached. -- Dav

Re: Improve behavior of concurrent ANALYZE/VACUUM

2018-08-21 Thread Michael Paquier
On Wed, Aug 22, 2018 at 02:17:44AM +, Bossart, Nathan wrote: > I think this is doable by locking the table in SHARE mode. That won't > conflict with the AccessShareLock that expand_vacuum_rel() obtains, > but it will conflict with the ShareUpdateExclusiveLock or > AccessExclusiveLock that vacu

RE: [HACKERS] Cached plans and statement generalization

2018-08-21 Thread Yamaji, Ryo
On Tuesday, August 7, 2018 at 0:36 AM, Konstantin Knizhnik wrote: > I have registered the patch for next commitfest. > For some reasons it doesn't find the latest autoprepare-10.patch and still > refer to autoprepare-6.patch as the latest attachement. I am sorry for the long delay in my response

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Chris Travers
On Wed, Aug 22, 2018 at 3:12 AM Masahiko Sawada wrote: > On Tue, Aug 21, 2018 at 5:36 PM Chris Travers > wrote: > > > > > > > > On Tue, Aug 21, 2018 at 8:42 AM Masahiko Sawada > wrote: > >> > >> On Tue, Aug 21, 2018 at 1:47 AM Chris Travers > wrote: > >> > > >> > > >> > > >> > On Mon, Aug 20,

Re: Improve behavior of concurrent ANALYZE/VACUUM

2018-08-21 Thread Bossart, Nathan
On 8/21/18, 7:44 PM, "Michael Paquier" wrote: > On Tue, Aug 21, 2018 at 04:01:50PM +, Bossart, Nathan wrote: >> I think my biggest concern with this approach is that we'd be >> introducing inconsistent behavior whenever there are concurrent >> changes. If a user never had permissions to VACUU

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Masahiko Sawada
On Tue, Aug 21, 2018 at 5:36 PM Chris Travers wrote: > > > > On Tue, Aug 21, 2018 at 8:42 AM Masahiko Sawada wrote: >> >> On Tue, Aug 21, 2018 at 1:47 AM Chris Travers >> wrote: >> > >> > >> > >> > On Mon, Aug 20, 2018 at 4:41 PM Andres Freund wrote: >> >> >> >> Hi, >> >> >> >> On 2018-08-20 1

Re: Improve behavior of concurrent ANALYZE/VACUUM

2018-08-21 Thread Michael Paquier
On Tue, Aug 21, 2018 at 04:01:50PM +, Bossart, Nathan wrote: > I think my biggest concern with this approach is that we'd be > introducing inconsistent behavior whenever there are concurrent > changes. If a user never had permissions to VACUUM the partitioned > table, the partitions are skippe

Re: Getting NOT NULL constraint from pg_attribute

2018-08-21 Thread Wu Ivy
Thanks for the response. Really appreciate it! Regards, Ivy 2018-08-20 10:40 GMT-07:00 David G. Johnston : > On Monday, August 20, 2018, Wu Ivy wrote: >> >> Thanks for the quick respond. >> Why are SELECT query never marked nullable? For nullable columns, when I >> call SPI_getvalue(), the resu

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
On 2018-08-21 17:58:00 -0400, Andrew Dunstan wrote: > > > On 08/21/2018 04:49 PM, Andres Freund wrote: > > On 2018-08-21 11:09:15 -0700, Joshua D. Drake wrote: > > > On 08/21/2018 11:06 AM, Andrew Dunstan wrote: > > > > > > > > > > > > XP at least is essentially a dead platform for us. My anima

Re: patch to allow disable of WAL recycling

2018-08-21 Thread Jerry Jelinek
Tomas, Thanks for doing all of this testing. Your testing and results are much more detailed than anything I did. Please let me know if there is any follow-up that I should attempt. Thanks again, Jerry On Thu, Aug 16, 2018 at 3:43 PM, Tomas Vondra wrote: > On 07/22/2018 10:50 PM, Tomas Vondra

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andrew Dunstan
On 08/21/2018 04:49 PM, Andres Freund wrote: On 2018-08-21 11:09:15 -0700, Joshua D. Drake wrote: On 08/21/2018 11:06 AM, Andrew Dunstan wrote: XP at least is essentially a dead platform for us. My animals are not able to build anything after release 10. I wouldn't think XP should even be

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
On 2018-08-21 11:09:15 -0700, Joshua D. Drake wrote: > On 08/21/2018 11:06 AM, Andrew Dunstan wrote: > > > > > > > > XP at least is essentially a dead platform for us. My animals are not > > able to build anything after release 10. > > I wouldn't think XP should even be on our list anymore. Mic

Re: [HACKERS] proposal: schema variables

2018-08-21 Thread Pavel Stehule
Hi Fabien Dne út 21. 8. 2018 19:56 uživatel Fabien COELHO napsal: > > Hello Pavel, > > AFAICR, I had an objection on such new objects when you first proposed > something similar in October 2016. > > Namely, if session variables are not transactional, they cannot be used to > implement security r

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
On 2018-08-21 14:06:18 -0400, Andrew Dunstan wrote: > > > On 08/21/2018 01:31 PM, Andres Freund wrote: > > Hi, > > > > On 2018-08-21 13:29:20 -0400, Tom Lane wrote: > > > Peter Eisentraut writes: > > > > So, does anyone with Windows build experience want to comment on this? > > > > The proposal

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Joshua D. Drake
On 08/21/2018 11:06 AM, Andrew Dunstan wrote: XP at least is essentially a dead platform for us. My animals are not able to build anything after release 10. I wouldn't think XP should even be on our list anymore. Microsoft hasn't supported it in 4 years. JD -- Command Prompt, Inc. || ht

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andrew Dunstan
On 08/21/2018 01:31 PM, Andres Freund wrote: Hi, On 2018-08-21 13:29:20 -0400, Tom Lane wrote: Peter Eisentraut writes: So, does anyone with Windows build experience want to comment on this? The proposal is to desupport anything older than (probably) MSVC 2013, or alternatively anything th

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Chapman Flack
On 08/21/2018 01:46 PM, Tom Lane wrote: > Andres Freund writes: >> On 2018-08-21 13:29:20 -0400, Tom Lane wrote: >>> We've got a buildfarm handy that could answer the question. >>> Let's just stick a test function in there for a day and see >>> which animals fail. > >> I think we pretty much know

Re: [HACKERS] proposal: schema variables

2018-08-21 Thread Fabien COELHO
Hello Pavel, AFAICR, I had an objection on such new objects when you first proposed something similar in October 2016. Namely, if session variables are not transactional, they cannot be used to implement security related auditing features which were advertised as the motivating use case: a

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
Hi, On 2018-08-21 13:46:10 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-08-21 13:29:20 -0400, Tom Lane wrote: > >> We've got a buildfarm handy that could answer the question. > >> Let's just stick a test function in there for a day and see > >> which animals fail. > > > I think we

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Tom Lane
Andres Freund writes: > On 2018-08-21 13:29:20 -0400, Tom Lane wrote: >> We've got a buildfarm handy that could answer the question. >> Let's just stick a test function in there for a day and see >> which animals fail. > I think we pretty much know the answer already, anything before 2013 > will

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Andres Freund
Hi, On 2018-08-21 13:29:20 -0400, Tom Lane wrote: > Peter Eisentraut writes: > > So, does anyone with Windows build experience want to comment on this? > > The proposal is to desupport anything older than (probably) MSVC 2013, > > or alternatively anything that cannot compile the attached test fi

Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Tom Lane
Peter Eisentraut writes: > So, does anyone with Windows build experience want to comment on this? > The proposal is to desupport anything older than (probably) MSVC 2013, > or alternatively anything that cannot compile the attached test file. We've got a buildfarm handy that could answer the ques

Re: [PATCH] Add regress test for pg_read_all_stats role

2018-08-21 Thread Alexandra Ryzhevich
> > - There is no need for the initial DROP ROLE commands as those already > get dropped at the end of the tests. > Removed. - There is already rolenames.sql which has a tiny coverage for default > roles, why not just using it? > Moved changes to rolenames.sql. > +-- should fail because regress_

Re: Improve behavior of concurrent ANALYZE/VACUUM

2018-08-21 Thread Bossart, Nathan
On 8/20/18, 8:29 PM, "Michael Paquier" wrote: >> In short, my vote would be to maintain the current behavior for now >> and to bring up any logging improvements separately. > > On the other hand, it would be useful for the user to know exactly what > is getting skipped. For example if VACUUM ANAL

Re: Pre-v11 appearances of the word "procedure" in v11 docs

2018-08-21 Thread Peter Eisentraut
On 17/08/2018 21:57, Peter Geoghegan wrote: > On Fri, Aug 17, 2018 at 7:15 AM, Peter Eisentraut > wrote: >> Attached are my proposed patches. > > I take it that you propose all 3 for backpatch to v11? yes -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7

Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)

2018-08-21 Thread Peter Eisentraut
On 16/08/2018 15:00, Andres Freund wrote: >> According to my research (completely untested in practice), you need >> 2010 for mixed code and declarations and 2013 for named initialization >> of structs. >> >> I wonder what raising the msvc requirement would imply for supporting >> older Windows ver

Re: remove ATTRIBUTE_FIXED_PART_SIZE

2018-08-21 Thread Peter Eisentraut
On 20/08/2018 15:14, Tom Lane wrote: > I agree this is all moot as long as there's no pad bytes. What I'm > trying to figure out is if we need to put in place some provisions > to prevent there from being pad bytes at the end of any catalog struct. > According to what Andres is saying, it seems li

Re: ALTER TABLE on system catalogs

2018-08-21 Thread Andres Freund
On 2018-08-21 17:04:41 +0200, Peter Eisentraut wrote: > On 20/08/2018 15:34, Tom Lane wrote: > > Andres Freund writes: > >> On 2018-08-20 14:38:25 +0200, Peter Eisentraut wrote: > >>> Do you have an alternative in mind? > > > >> One is to just not do anything. I'm not sure I'm on board with the g

Re: remove ATTRIBUTE_FIXED_PART_SIZE

2018-08-21 Thread Peter Eisentraut
On 20/08/2018 12:46, Andres Freund wrote: > static VacAttrStats * > examine_attribute(Relation onerel, int attnum, Node *index_expr) > { > ... > /* >* Create the VacAttrStats struct. Note that we only have a copy of the >* fixed fields of the pg_attribute tuple. >*/ >

Re: WaitForOlderSnapshots refactoring

2018-08-21 Thread Peter Eisentraut
On 20/08/2018 14:39, Andres Freund wrote: >> The question is where to put it. This patch just leaves it static in >> indexcmds.c, which doesn't help other uses. A sensible place might be a >> new src/backend/commands/common.c. Or we make it non-static in >> indexcmds.c when the need arises. > Wh

Re: [GSoC] Summery of pg performance farm

2018-08-21 Thread Mark Wong
On Sun, Aug 19, 2018 at 12:20:37PM -0300, Alvaro Herrera wrote: > On 2018-Aug-19, Hongyuan Ma wrote: > > 2. Implementation of the data report related to the list page. Compare each > > metrics whith the previous results. If any of the metrics are a 5% > > improvement( or regression), there is one

ALTER TABLE on system catalogs

2018-08-21 Thread Peter Eisentraut
On 20/08/2018 15:34, Tom Lane wrote: > Andres Freund writes: >> On 2018-08-20 14:38:25 +0200, Peter Eisentraut wrote: >>> Do you have an alternative in mind? > >> One is to just not do anything. I'm not sure I'm on board with the goal >> of changing things to make DDL on system tables more palata

Re: Proposal: SLRU to Buffer Cache

2018-08-21 Thread Andres Freund
Hi, On 2018-08-21 09:53:21 -0400, Shawn Debnath wrote: > > I was wondering what the point of exposing the OIDs to users in a > > catalog would be though. It's not necessary to do that to reserve > > them (and even if it were, pg_database would be the place): the OIDs > > we choose for undo, clog,

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2018-08-21 Thread Alexander Korotkov
On Fri, Aug 17, 2018 at 9:55 PM Tom Lane wrote: > But then you are injecting bad pages into the shared buffer arena. > In any case, depending on that behavior seems like a bad idea, because > it's a pretty questionable kluge in itself. > > Another point is that the truncation code attempts to remo

Re: FETCH FIRST clause PERCENT option

2018-08-21 Thread Andres Freund
On 2018-08-21 15:47:07 +0300, Surafel Temesgen wrote: > On Thu, Aug 16, 2018 at 5:34 PM, Andres Freund wrote: > > > > > Won't that have rather massive issues with multiple evaluations of > > clauses in the query? Besides being really expensive? > > > The plan re-scane after first execution I can

Re: FETCH FIRST clause PERCENT option

2018-08-21 Thread Surafel Temesgen
On Thu, Aug 16, 2018 at 5:34 PM, Andres Freund wrote: > > Won't that have rather massive issues with multiple evaluations of > clauses in the query? Besides being really expensive? > The plan re-scane after first execution I can’t see issue for multiple execution of a clause in this case > > I

Re: Pluggable Storage - Andres's take

2018-08-21 Thread Andres Freund
Hi, On 2018-08-21 16:55:47 +1000, Haribabu Kommi wrote: > On Sun, Aug 5, 2018 at 7:48 PM Andres Freund wrote: > > 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 s

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Chris Travers
On Mon, Aug 20, 2018 at 4:44 PM Tom Lane wrote: > Chris Travers writes: > > I am looking at trying to make two modifications to the PostgreSQL FDW > and > > would like feedback on this before I do. > > > 1. INSERTMETHOD=[insert|copy] option on foreign table. > > > One significant limitation of

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Chris Travers
On Tue, Aug 21, 2018 at 8:42 AM Masahiko Sawada wrote: > On Tue, Aug 21, 2018 at 1:47 AM Chris Travers > wrote: > > > > > > > > On Mon, Aug 20, 2018 at 4:41 PM Andres Freund > wrote: > >> > >> Hi, > >> > >> On 2018-08-20 16:28:01 +0200, Chris Travers wrote: > >> > 2. TWOPHASECOMMIT=[off|on] op

Re: A typo in guc.c

2018-08-21 Thread Kyotaro HORIGUCHI
At Tue, 21 Aug 2018 12:17:57 +0900, Michael Paquier wrote in <20180821031757.gf2...@paquier.xyz> > On Tue, Aug 21, 2018 at 11:58:41AM +0900, Kyotaro HORIGUCHI wrote: > > The "user" should be "use". > > > > As you(who?) know, this applies only 11 and dev. > > Thanks, applied. Thank you. regard

Re: Slotification of partition tuple conversion

2018-08-21 Thread Amit Khandekar
On 21 August 2018 at 08:12, Amit Langote wrote: > Here are some comments on the patch: Thanks for the review. > > +ConvertTupleSlot > > Might be a good idea to call this ConvertSlotTuple? I thought the name 'ConvertTupleSlot' emphasizes the fact that we are operating rather on a slot without ha

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Amit Langote
On 2018/08/20 23:43, Tom Lane wrote: > Chris Travers writes: >> I am looking at trying to make two modifications to the PostgreSQL FDW and >> would like feedback on this before I do. > >> 1. INSERTMETHOD=[insert|copy] option on foreign table. > >> One significant limitation of the PostgreSQL FD