Re: [HACKERS] Gather Merge

2016-11-03 Thread Michael Paquier
On Fri, Nov 4, 2016 at 12:00 PM, Thomas Munro wrote: > + * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group > + * Portions Copyright (c) 1994, Regents of the University of California > > Shouldn't this say just "(c) 2016, PostgreSQL Global Development > Group"? Are we suppose

Re: [HACKERS] Contents of "backup_label" and "*.backup" in pg_wal location

2016-11-03 Thread Michael Paquier
On Fri, Nov 4, 2016 at 1:18 PM, Venkata B Nagothi wrote: > I see the following contents in the file > "00010044.0060.backup" which was generated in the pg_wal > location during the online backup. When pg_stop_backup() is executed, the > following content is written which includ

[HACKERS] Contents of "backup_label" and "*.backup" in pg_wal location

2016-11-03 Thread Venkata B Nagothi
Hello Hackers, I have a question regarding the contents being written to the backup_label file and the .backup file in the pg_wal location generated when the online backup is done. backup_label file contents are as follows, which do not contain backup stop position (timestamp and STOP WAL locatio

Re: [HACKERS] Push down more full joins in postgres_fdw

2016-11-03 Thread Ashutosh Bapat
On Fri, Nov 4, 2016 at 9:19 AM, Etsuro Fujita wrote: > On 2016/11/03 18:52, Ashutosh Bapat wrote: >>> >>> Here is the updated version, which includes the restructuring you >>> proposed. >>> Other than the above issue and the alias issue we discussed, I addressed >>> all >>> your comments except on

Re: [HACKERS] Push down more full joins in postgres_fdw

2016-11-03 Thread Etsuro Fujita
On 2016/11/03 18:52, Ashutosh Bapat wrote: Here is the updated version, which includes the restructuring you proposed. Other than the above issue and the alias issue we discussed, I addressed all your comments except one on testing; I tried to add test cases where the remote query is deparsed as

Re: [HACKERS] Confusing docs about GetForeignUpperPaths in fdwhandler.sgml

2016-11-03 Thread Etsuro Fujita
On 2016/11/03 23:39, Robert Haas wrote: On Wed, Oct 26, 2016 at 3:18 PM, Tom Lane wrote: A larger issue is that I think the API itself is poorly designed, as I stated awhile ago (<31706.1457547...@sss.pgh.pa.us>) I agree on that point. I plan to rewrite direct modify using upper planner pat

Re: [HACKERS] Gather Merge

2016-11-03 Thread Thomas Munro
On Thu, Oct 27, 2016 at 10:50 PM, Rushabh Lathia wrote: > Please find attached latest patch which fix the review point as well as > additional clean-up. I've signed up to review this patch and I'm planning to do some testing. Here's some initial feedback after a quick read-through: + if (gather

Re: [HACKERS] Logical Replication WIP

2016-11-03 Thread Peter Eisentraut
On 10/24/16 9:22 AM, Petr Jelinek wrote: > I also split out the libpqwalreceiver rewrite to separate patch which > does just the re-architecture and does not really add new functionality. > And I did the re-architecture bit differently based on the review. That looks good to me, and it appears to

[HACKERS] Re: [BUGS] BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.

2016-11-03 Thread Haribabu Kommi
On Thu, Nov 3, 2016 at 5:23 PM, Dilip Kumar wrote: > On Thu, Nov 3, 2016 at 9:57 AM, Haribabu Kommi > wrote: > > Thanks for your suggestion. Yes, I agree that adding a hint is good. > > Updated patch is attached with addition of hint message. > > > > 2016-11-03 14:56:28.685 AEDT [7822] ERROR: c

Re: [HACKERS] Logical Replication WIP

2016-11-03 Thread Peter Eisentraut
On 11/3/16 9:31 AM, Petr Jelinek wrote: > Release does not really change behavior, it has always dropped ephemeral > slot. Well, currently ephemeral is just a temporary state while a slot is being created. It's not really something that can exist independently. You might as well call it RS_NOTREA

Re: [HACKERS] Declarative partitioning - another take

2016-11-03 Thread Robert Haas
Apologies if I've made some of these comments before and/or missed comments you've made on these topics. The size of this patch set is so large that it's hard to keep track of everything. Re-reviewing 0001: + indicate which table columns are used as partition key. For example, s/are used

Re: [HACKERS] C based plugins, clocks, locks, and configuration variables

2016-11-03 Thread Craig Ringer
On 4 Nov. 2016 06:05, "Clifford Hammerschmidt" wrote: > > Hi all, > > Apologies in advance if this isn't the right place to be posting this. > > I've started work on a plugin in C (https://github.com/tanglebones/pg_tuid) for generating generally monotonically ascending UUIDs (aka TUIDs), and after

Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support

2016-11-03 Thread Haribabu Kommi
On Tue, Oct 25, 2016 at 11:40 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 10/25/16 1:38 AM, Haribabu Kommi wrote: > > Here I attached the first version of patch that supports both EUI-48 and > > EUI-64 type > > Mac addresses with a single datatype called macaddr. This is a

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Michael Paquier
On Fri, Nov 4, 2016 at 4:16 AM, Kuntal Ghosh wrote: > On Thu, Nov 3, 2016 at 8:24 PM, Robert Haas wrote: >> On Wed, Nov 2, 2016 at 10:30 AM, Kuntal Ghosh >> wrote: >>> - Another suggestion was to remove wal_consistency from PostgresNode.pm >>> because small buildfarm machines may suffer on it. A

Re: [HACKERS] Making table reloading easier

2016-11-03 Thread Michael Paquier
On Thu, Nov 3, 2016 at 11:37 PM, Corey Huinker wrote: >> ALTER TABLE my_table >> DISABLE INDEX ALL; > > +1 > This very thing came up in a conversation with PeterG early last year. I was > in favor then and I was surprised that the only thing standing in the way > was a lack of ALTER TABLE synt

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-03 Thread Karl O. Pinc
On Mon, 31 Oct 2016 09:26:27 +0100 Gilles Darold wrote: > Le 30/10/2016 à 08:04, Karl O. Pinc a écrit : > > Have you given any thought to my proposal to change > > CURRENT_LOG_FILENAME to LOG_METAINFO_FILE? > Yes, I don't think the information logged in this file are kind of > meta information

Re: [HACKERS] pageinspect: Hash index support

2016-11-03 Thread Tom Lane
Peter Eisentraut writes: > On 11/2/16 1:54 PM, Tom Lane wrote: >> I think the right thing is likely to be to copy the presented bytea >> into a palloc'd (and therefore properly aligned) buffer. And not >> just in this one function. > Does the attached look reasonable? I'd be inclined to wrap it

Re: [HACKERS] add more NLS to bin

2016-11-03 Thread Michael Paquier
On Fri, Nov 4, 2016 at 1:44 AM, Peter Eisentraut wrote: > On 10/31/16 1:58 AM, Michael Paquier wrote: >> In info.c, missing some entries in report_unmatched_relation() when >> reporting unmatching relations? > > Yeah, that will need a bit of a rewrite, so FIXME later? This patch not being complic

Re: [HACKERS] Row level security implementation in Foreign Table in Postgres

2016-11-03 Thread Tom Lane
Robert Haas writes: > On Wed, Nov 2, 2016 at 10:46 PM, Sounak Chakraborty wrote: >> But my doubt is why this feature is not enabled in case of Foreign Table. >> (ALTER FOREIGN TABLE doesn't have a option of enabling Row Level Security). >> Is this is not implemented due to some limitations in th

Re: [HACKERS] Improving RLS planning

2016-11-03 Thread Tom Lane
Dean Rasheed writes: > On 25 October 2016 at 22:58, Tom Lane wrote: >> The alternative I'm now thinking about pursuing is to get rid of the >> conversion of RLS quals to subqueries. Instead, we can label individual >> qual clauses with security precedence markings. > +1 for this approach. It lo

[HACKERS] C based plugins, clocks, locks, and configuration variables

2016-11-03 Thread Clifford Hammerschmidt
Hi all, Apologies in advance if this isn't the right place to be posting this. I've started work on a plugin in C (https://github.com/tanglebones/pg_tuid) for generating generally monotonically ascending UUIDs (aka TUIDs), and after googling around I couldn't find any guidence on a few things. (I

Re: [HACKERS] [PATCH] Generic type subscription

2016-11-03 Thread Artur Zakirov
Hello, Do you have an updated version of the patch? 2016-10-18 20:41 GMT+03:00 Dmitry Dolgov <9erthali...@gmail.com>: > > > > The term "subscription" is confusing me > > Yes, you're right. "container" is too general I think, so I renamed > everything > to "subscripting". > There is another occur

Re: [HACKERS] IPv6 link-local addresses and init data type

2016-11-03 Thread Peter Eisentraut
On 6/7/16 2:43 PM, Peter Eisentraut wrote: > On 6/7/16 1:19 AM, Haribabu Kommi wrote: >> How about the following case, Do we treat them as same or different? >> >> select 'fe80::%eth1'::inet = 'fe80::%ETH1'::inet; >> >> fe80::%2/64 is only treated as the valid address but not other way as >> fe80::

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Kuntal Ghosh
On Thu, Nov 3, 2016 at 8:24 PM, Robert Haas wrote: > On Wed, Nov 2, 2016 at 10:30 AM, Kuntal Ghosh > wrote: >> - Another suggestion was to remove wal_consistency from PostgresNode.pm >> because small buildfarm machines may suffer on it. Although I've no >> experience in this matter, I would like

Re: [HACKERS] split up psql \d Modifiers column

2016-11-03 Thread Peter Eisentraut
On 11/2/16 12:24 PM, Kuntal Ghosh wrote: > On Fri, Oct 28, 2016 at 9:00 AM, Peter Eisentraut > wrote: >> I propose to change the psql \d output a bit, best shown with an example: >> >> \d persons3 >> - Table "public.persons3" >> - Column | Type |Modifiers >> -+-+-

Re: [HACKERS] Microvacuum support for Hash Index

2016-11-03 Thread Jesper Pedersen
Hi, On 11/02/2016 01:38 AM, Ashutosh Sharma wrote: While replaying the delete/vacuum record on standby, it can conflict with some already running queries. Basically the replay can remove some row which can be visible on standby. You need to resolve conflicts similar to what we do in btree dele

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-03 Thread Gilles Darold
Le 03/11/2016 à 16:15, Robert Haas a écrit : > On Wed, Oct 26, 2016 at 11:25 PM, Karl O. Pinc wrote: >> What it comes down to is I don't buy the adequacy of the >> ".csv" suffix test and think that "keeping things simple" now >> is a recipe for future breakage, or at least significant future >> co

Re: [HACKERS] add more NLS to bin

2016-11-03 Thread Peter Eisentraut
On 10/31/16 1:58 AM, Michael Paquier wrote: > 2) For 0002 and pg_test_fsync, I am seeing a missing entry: > printf(NA_FORMAT, "n/a*\n"); ok > 4) 0004 and pg_upgrade... In check.c, three places like that: > if (!db_used) > { > fprintf(script, "Databa

Re: [HACKERS] Applying XLR_INFO_MASK correctly when looking at WAL record information

2016-11-03 Thread Ashutosh Sharma
Hi, > What about the patch attached to make things more consistent? I have reviewed this patch. It does serve the purpose and looks sane to me. I am marking it as ready for committer. With Regards, Ashutosh Sharma EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing lis

Re: [HACKERS] auto_explain vs. parallel query

2016-11-03 Thread Robert Haas
On Thu, Nov 3, 2016 at 12:11 PM, Tomas Vondra wrote: >> Sure, the Gather node creates it. There's generally only one per >> query, though, and that's how most information is communicated from >> leader to workers. > > Ah, right. I haven't realized there's just a single Gather per query. That's no

Re: [HACKERS] Declarative partitioning - another take

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 3:41 AM, Amit Langote wrote: > As for which parts of the system need to know about these implicit > partition constraints to *enforce* them for data integrity, we could say > that it's really just one site - ExecConstraints() called from > ExecInsert()/ExecUpdate(). Well, t

Re: [HACKERS] auto_explain vs. parallel query

2016-11-03 Thread Tomas Vondra
On 11/03/2016 03:59 PM, Robert Haas wrote: On Wed, Nov 2, 2016 at 12:49 PM, Tomas Vondra wrote: On 11/01/2016 08:32 PM, Robert Haas wrote: On Tue, Nov 1, 2016 at 10:58 AM, Tomas Vondra wrote: Damn! You're right of course. Who'd guess I need more coffee this early? Attached is a fix replaci

Re: [HACKERS] Declarative partitioning - another take

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 6:47 AM, Amit Langote wrote: > OK, I changed things so that DROP TABLE a_partition no longer complains > about requiring to detach first. Much like how index_drop() locks the > parent table ('parent' in a different sense, of course) and later > invalidates its relcache, hea

Re: [HACKERS] Declarative partitioning - another take

2016-11-03 Thread Robert Haas
On Tue, Nov 1, 2016 at 2:36 PM, Corey Huinker wrote: > On Tue, Nov 1, 2016 at 2:24 PM, Robert Haas wrote: >> Well, I'm not sure we've exactly reached consensus here, and you're >> making me feel like I just kicked a puppy. > > It was hyperbole. I hope you found it as funny to read as I did to wri

Re: [HACKERS] Complete LOCK TABLE ... IN ACCESS|ROW|SHARE

2016-11-03 Thread Robert Haas
On Thu, Oct 6, 2016 at 2:28 PM, marllius ribeiro wrote: > This was my first test which had help Gerdan. > > I did some tests and found nothing special. The stated resource is > implemented correctly. > He passes all regression tests and enables the use of the new features > specified. Committed

Re: [HACKERS] Declarative partitioning - another take

2016-11-03 Thread Robert Haas
On Thu, Nov 3, 2016 at 7:46 AM, wrote: > El 2016-10-28 07:53, Amit Langote escribió: >> @@ -6267,6 +6416,12 @@ ATAddForeignKeyConstraint(AlteredTableInfo *tab, >> Relation rel, >> * Validity checks (permission checks wait till we have the column >> * numbers) >> */ >> +

Re: [HACKERS] Minor code improvement to postgresGetForeignJoinPaths

2016-11-03 Thread Robert Haas
On Tue, Oct 25, 2016 at 1:59 AM, Tatsuro Yamada wrote: > Hi Ashutosh, >> You are right. Every call except that one is using NIL, so better to >> fix it. The pattern was repeated in the recent aggregate pushdown >> support. Here's patch to fix create_foreignscan_path() call in >> add_foreign_groupi

Re: [HACKERS] commitfest 2016-11 status summary

2016-11-03 Thread Robert Haas
On Tue, Nov 1, 2016 at 3:48 PM, Haribabu Kommi wrote: > There are plenty of patches that are in "ready for committer" state, > committers please have a look at those patches and give some conclusion > on them. Yes, we really need some more committer attention on a lot of these patches. I've been

Re: [HACKERS] pageinspect: Hash index support

2016-11-03 Thread Peter Eisentraut
On 11/2/16 1:54 PM, Tom Lane wrote: > I think the right thing is likely to be to copy the presented bytea > into a palloc'd (and therefore properly aligned) buffer. And not > just in this one function. Does the attached look reasonable? -- Peter Eisentraut http://www.2ndQuadrant.co

Re: [HACKERS] Row level security implementation in Foreign Table in Postgres

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 10:46 PM, Sounak Chakraborty wrote: > Row level security feature implementation in Postgres is through policy and > the row security qualifier is attached as a subquery to the main query before > query planning. The RLS is implemented through ALTER TABLE STATEMENT. > But m

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-11-03 Thread Robert Haas
On Wed, Oct 26, 2016 at 11:25 PM, Karl O. Pinc wrote: > What it comes down to is I don't buy the adequacy of the > ".csv" suffix test and think that "keeping things simple" now > is a recipe for future breakage, or at least significant future > complication and confusion when it come to processing

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-11-03 Thread Robert Haas
On Tue, Nov 1, 2016 at 11:31 PM, Tomas Vondra wrote: > I don't think I've suggested not committing any of the clog patches (or > other patches in general) because shifting the contention somewhere else > might cause regressions. At the end of the last CF I've however stated that > we need to bette

[HACKERS] Re: [COMMITTERS] pgsql: Add make rules to download raw Unicode mapping files

2016-11-03 Thread Peter Eisentraut
On 11/2/16 3:33 AM, Michael Paquier wrote: > On Wed, Nov 2, 2016 at 12:58 AM, Peter Eisentraut wrote: >> Add make rules to download raw Unicode mapping files >> >> This serves as implicit documentation and is handy if someone wants to >> tweak things. The rules are not part of a normal build, lik

Re: [HACKERS] auto_explain vs. parallel query

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 12:49 PM, Tomas Vondra wrote: > On 11/01/2016 08:32 PM, Robert Haas wrote: >> On Tue, Nov 1, 2016 at 10:58 AM, Tomas Vondra >> wrote: >>> >>> Damn! You're right of course. Who'd guess I need more coffee this early? >>> >>> Attached is a fix replacing the flag with an array

[HACKERS] Copying Permissions

2016-11-03 Thread Corey Huinker
Craig's post yesterday about exposing syntax for disabling indexes reminded me of another feature I think we're lacking in areas where we have to do table management. The issue is to create a *something* that has the exact permissions of another *something*. Usually it's creating a table related t

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 10:30 AM, Kuntal Ghosh wrote: > - Another suggestion was to remove wal_consistency from PostgresNode.pm > because small buildfarm machines may suffer on it. Although I've no > experience in this matter, I would like to be certain that nothings breaks > in recovery tests afte

Re: [HACKERS] plan_rows confusion with parallel queries

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 10:44 PM, Tomas Vondra wrote: > Although - it is estimating 1M rows, but only "per worker" estimates are > shown, and because there are 2 workers planned it says 1M/2.4 which is the > 416k. I agree it's a bit unclear, but at least it's consistent with how we > treat loops (i

Re: [HACKERS] plan_rows confusion with parallel queries

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 4:00 PM, Tom Lane wrote: > Tomas Vondra writes: >> while eye-balling some explain plans for parallel queries, I got a bit >> confused by the row count estimates. I wonder whether I'm alone. > > I got confused by that a minute ago, so no you're not alone. The problem > is e

Re: [HACKERS] Confusing docs about GetForeignUpperPaths in fdwhandler.sgml

2016-11-03 Thread Robert Haas
On Wed, Oct 26, 2016 at 3:18 PM, Tom Lane wrote: > Robert Haas writes: >> I'm not interested in committing this patch. I don't believe it is an >> improvement on what we've got today. >> Tom, any chance you could offer an opinion? > > I have no objection to this patch as such, but I think that t

Re: [HACKERS] Making table reloading easier

2016-11-03 Thread Corey Huinker
> > > ALTER TABLE my_table > DISABLE INDEX ALL; > +1 This very thing came up in a conversation with PeterG early last year. I was in favor then and I was surprised that the only thing standing in the way was a lack of ALTER TABLE syntax. Creating temporary data structures to mimic existing met

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Kuntal Ghosh
On Thu, Nov 3, 2016 at 7:47 PM, Kuntal Ghosh wrote: > I've updated the patch for review. > If an inconsistency is found, it'll just log it for now. Once, the patch is finalized, we can change it to FATAL as before. I was making sure that all regression tests should pass with the patch. It seems th

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-11-03 Thread Michael Banck
Hi, this is a first review of this patch. As a feature, I think this functionality is very welcome. Having to schedule a downtime in order to enable SSL or change the SSL certificate is a nuisance and it might make admins think twice, reducing security. The patch applies cleanly (modulo fuzz in

Re: [HACKERS] Stopping logical replication protocol

2016-11-03 Thread Craig Ringer
On 21 October 2016 at 19:38, Vladimir Gordiychuk wrote: > Craig, Andres what do you thinks about previous message? I haven't had a chance to look further to be honest. Since a downstream disconnect works, though it's ugly, it's not something I can justify spending a lot of time on, and I already

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Kuntal Ghosh
I've updated the patch for review. -- Thanks & Regards, Kuntal Ghosh EnterpriseDB: http://www.enterprisedb.com walconsistency_v12.patch Description: application/download -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.post

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-11-03 Thread Robert Haas
On Tue, Nov 1, 2016 at 8:31 PM, Kouhei Kaigai wrote: > By the way, I'm a bit skeptical whether this enhancement is really beneficial > than works for this enhancement, because we can now easily increase the number > of processor cores to run seq-scan with qualifier, especially, when it has > high

Re: [HACKERS] plan_rows confusion with parallel queries

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 2:42 PM, Tomas Vondra wrote: > BTW is it really a good idea to use nloops to track the number of workers > executing a given node? How will that work if once we get parallel nested > loops and index scans? We already have parallel nested loops with inner index scans. -- R

Re: [HACKERS] who calls InitializeTimeouts() ?

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 11:10 PM, Chapman Flack wrote: > It looks like for about 3 years, PL/Java has been calling > InitializeTimeouts before calling RegisterTimeout. Looking over > the callers of InitializeTimeouts in core, though, it appears > that an extension like PL/Java should be able to ass

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-03 Thread Robert Haas
On Wed, Nov 2, 2016 at 1:59 PM, Mithun Cy wrote: > On Tue, Nov 1, 2016 at 9:42 PM, Robert Haas wrote: >> Ah, nuts. Thanks, good catch. Should be fixed in the attached version. > > I repeated the test on new patch, It works fine now, Also did some more > negative tests forcibly failing some inte

Re: [HACKERS] Logical Replication WIP

2016-11-03 Thread Petr Jelinek
On 02/11/16 17:22, Peter Eisentraut wrote: > On 10/24/16 9:22 AM, Petr Jelinek wrote: >> I added one more prerequisite patch (the first one) which adds ephemeral >> slots (or well implements UI on top of the code that was mostly already >> there). The ephemeral slots are different in that they go a

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-03 Thread Brad DeJong
Change "even large" to "even larger" because it is used in a comparison. > ... a reasonable starting value for shared_buffers is 25% > of the memory in your system. There are some workloads where even large > settings > for shared_buffers are effective, ... ... are some workloads where even larg

Re: [HACKERS] Using a latch between a background worker process and a thread

2016-11-03 Thread Abbas Butt
Thanks every body for the detailed advise. Let me try replacing latches by condition variables. I will report the results here. On Wed, Nov 2, 2016 at 11:54 AM, Craig Ringer wrote: > On 2 November 2016 at 02:10, Robert Haas wrote: > > On Tue, Nov 1, 2016 at 12:35 PM, Abbas Butt > wrote: > >> H

Re: [HACKERS] Declarative partitioning - another take

2016-11-03 Thread alvherre
El 2016-10-28 07:53, Amit Langote escribió: @@ -6267,6 +6416,12 @@ ATAddForeignKeyConstraint(AlteredTableInfo *tab, Relation rel, * Validity checks (permission checks wait till we have the column * numbers) */ + if (pkrel->rd_rel->relkind == RELKIND_PARTITIONED_

Re: [HACKERS] Danger of automatic connection reset in psql

2016-11-03 Thread Ashutosh Bapat
On Thu, Oct 20, 2016 at 3:58 PM, Oleksandr Shulgin wrote: > Hi Hackers! > > When using psql interactively one might be tempted to guard potentially > destructive commands such as "UPDATE / DELETE / DROP " by starting > the input line with an explicit "BEGIN; ...". This has the added benefit > tha

[HACKERS] Improve hash-agg performance

2016-11-03 Thread Andres Freund
Hi, There's two things I found while working on faster expression evaluation, slot deforming and batched execution. As those two issues often seemed quite dominant cost-wise it seemed worthwhile to evaluate them independently. 1) We atm do one ExecProject() to compute each aggregate's argument

Re: [HACKERS] delta relations in AFTER triggers

2016-11-03 Thread Kevin Grittner
On Wed, Nov 2, 2016 at 4:09 PM, Adam Brusselback wrote: >> There may be some situations where crawling the indexes a row at a >> time will perform better than this by enough to want to retain that >> option. > > If an index existed, wouldn't it still be able to use that in the set-based > implemen

Re: [HACKERS] Hash Indexes

2016-11-03 Thread Amit Kapila
On Wed, Nov 2, 2016 at 6:39 AM, Robert Haas wrote: > On Mon, Oct 24, 2016 at 10:30 AM, Amit Kapila wrote: >> [ new patches ] > > I looked over parts of this today, mostly the hashinsert.c changes. > > +/* > + * Copy bucket mapping info now; The comment in _hash_expandtable where > +

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Michael Paquier
On Thu, Nov 3, 2016 at 6:48 PM, Kuntal Ghosh wrote: > So, whenever we are required to use bimg_info flag, we should make > sure that has_image > is set. OK, we are taking past each other here. There are two possible patterns: - has_image is set, not apply, meaning that the image block is used for

Re: [HACKERS] Push down more full joins in postgres_fdw

2016-11-03 Thread Ashutosh Bapat
> Here is the updated version, which includes the restructuring you proposed. > Other than the above issue and the alias issue we discussed, I addressed all > your comments except one on testing; I tried to add test cases where the > remote query is deparsed as nested subqueries, but I couldn't bec

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-03 Thread amul sul
Hi Takayuki-san, IMHO, I think we could remove third paragraph completely and generalised starting of second paragraph, somewhat looks likes as follow: -If you have a dedicated database server with 1GB or more of RAM, a -reasonable starting value for shared_buffers is 25%

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Kuntal Ghosh
On Thu, Nov 3, 2016 at 2:52 PM, Michael Paquier wrote: > On Thu, Nov 3, 2016 at 6:15 PM, Kuntal Ghosh > wrote: >> Actually, I just verified that bimg_info is not even valid if >> has_image is not set. >> In DecodeXLogRecord, we initialize bimg_info only when has_image flag >> is set. So, keeping

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Michael Paquier
On Thu, Nov 3, 2016 at 6:15 PM, Kuntal Ghosh wrote: > Actually, I just verified that bimg_info is not even valid if > has_image is not set. > In DecodeXLogRecord, we initialize bimg_info only when has_image flag > is set. So, keeping them > separate doesn't look a good approach to me. If we keep t

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Michael Paquier
On Thu, Nov 3, 2016 at 5:56 PM, Kuntal Ghosh wrote: > I'm not getting why we should introduce a new redo action and return > from the function beforehand. Per my last email, same conclusion from here :) Sorry if I am picky and noisy on many points, I am trying to think about the value of each cha

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Kuntal Ghosh
On Thu, Nov 3, 2016 at 2:27 PM, Michael Paquier wrote: > On Thu, Nov 3, 2016 at 4:04 PM, Michael Paquier > wrote: >> Wouldn't the definition of a new redo action make sense then? Say >> SKIPPED. None of the existing actions match the non-apply case. > > I just took 5 minutes to look at the code a

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Michael Paquier
On Thu, Nov 3, 2016 at 4:04 PM, Michael Paquier wrote: > Wouldn't the definition of a new redo action make sense then? Say > SKIPPED. None of the existing actions match the non-apply case. I just took 5 minutes to look at the code and reason about it, and something like what your patch is doing w

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Kuntal Ghosh
On Thu, Nov 3, 2016 at 12:34 PM, Michael Paquier wrote: > On Thu, Nov 3, 2016 at 3:24 PM, Kuntal Ghosh > wrote: >> On Thu, Nov 3, 2016 at 2:35 AM, Michael Paquier >>> -/* If it's a full-page image, restore it. */ >>> -if (XLogRecHasBlockImage(record, block_id)) >>> +/* If full-page i

Re: [HACKERS] Substantial bloat in postgres_fdw regression test runtime

2016-11-03 Thread Jeevan Chalke
On Wed, Nov 2, 2016 at 10:09 PM, Tom Lane wrote: > In 9.6, "make installcheck" in contrib/postgres_fdw takes a shade > under 3 seconds on my machine. In HEAD, it's taking 10 seconds. > I am not happy, especially not since there's no parallelization > of the contrib regression tests. That's a di

Re: [HACKERS] Exclude pg_largeobject form pg_dump

2016-11-03 Thread amul sul
Kindly ignore this, i've added this note to original thread. Sorry for noise. Regards, Amul -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Add radiustimeout parameter for RADIUS HBA

2016-11-03 Thread Haribabu Kommi
On Mon, Oct 24, 2016 at 2:03 PM, Samuel D. Leslie wrote: > Hello everyone, > > I’d like to submit the attached patch for feedback from the PostgreSQL > community and potential future inclusion in the codebase. The patch adds a > new parameter to the RADIUS authentication method named “radiustimeo

Re: [HACKERS] Exclude pg_largeobject form pg_dump

2016-11-03 Thread amul sul
Hi Guillaume, With your v2 patch, -B options working as expected but --no-blobs options is still unrecognized, this happens is because of you have forgot to add entry for 'no-blobs' in long_options[] array. Apart from this concern patch looks good to me. Thanks Regards, Amul -- Sent via pgsql

Re: [HACKERS] WAL consistency check facility

2016-11-03 Thread Michael Paquier
On Thu, Nov 3, 2016 at 3:24 PM, Kuntal Ghosh wrote: > On Thu, Nov 3, 2016 at 2:35 AM, Michael Paquier > wrote: >>> - Another suggestion was to remove wal_consistency from PostgresNode.pm >>> because small buildfarm machines may suffer on it. Although I've no >>> experience in this matter, I would