TupleDescCopy doesn't clear atthasdef, attnotnull, attidentity

2017-11-28 Thread Thomas Munro
Hi hackers, Andrew Gierth complained off-list that TupleDescCopy() doesn't clear atthasdef. Yeah, that's an oversight. The function is new in commit cc5f81366c36 and was written by me to support "flat" (pointer-free) tuple descriptors for use in DSM. Following the example of CreateTupleDescCopy

Re: [HACKERS] A design for amcheck heapam verification

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 2:54 PM, Peter Geoghegan wrote: > My understanding of your earlier remarks, rightly or wrongly, was that > you wanted me to adopt the Bloom filter to actually be usable from SQL > in some kind of general way. As opposed to what I just said -- adding > a stub SQL interface t

Re: [HACKERS] A design for amcheck heapam verification

2017-11-28 Thread Peter Geoghegan
On Tue, Nov 28, 2017 at 9:50 PM, Michael Paquier wrote: >> Would that address your concern? There would be an SQL interface, but >> it would be trivial. > > That's exactly what I think you should do, and mentioned so upthread. > A SQL interface can also show a good example of how developers can us

Re: [HACKERS] A design for amcheck heapam verification

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 2:48 PM, Peter Geoghegan wrote: > I still don't think that regression tests as such make sense. However, > it seems like it might be a good idea to add a test harness for the > Bloom filter code. I actually wrote code like this for myself during > development, that could be

Re: [HACKERS] Function to move the position of a replication slot

2017-11-28 Thread Michael Paquier
On Tue, Sep 5, 2017 at 11:51 AM, Andres Freund wrote: > On 2017-09-05 11:36:47 +0900, Michael Paquier wrote: >> On Thu, Aug 31, 2017 at 9:19 PM, Magnus Hagander wrote: >> > PFA an updated and rebased patch. >> > >> > Rebased. Now named pg_advance_replication_slot. ERROR on logical slots. >> > For

Re: [HACKERS] A design for amcheck heapam verification

2017-11-28 Thread Peter Geoghegan
On Tue, Nov 28, 2017 at 9:38 PM, Michael Paquier wrote: > My apologies for slacking here. I would still welcome some regression > tests to stress the bloom API you are proposing! For now I am moving > this patch to next CF. I still don't think that regression tests as such make sense. However, it

Re: [HACKERS] WIP: Restricting pg_rewind to data/wal dirs

2017-11-28 Thread Michael Paquier
On Wed, Nov 1, 2017 at 5:58 PM, Chris Travers wrote: > I would also like to address a couple of important points here: > > 1. I think default restrictions plus additional paths is the best, safest > way forward. Excluding shell-globs doesn't solve the "I need this > particular config file" very

Re: [HACKERS] A design for amcheck heapam verification

2017-11-28 Thread Michael Paquier
On Sat, Oct 21, 2017 at 9:34 AM, Peter Geoghegan wrote: > I should point out that I shipped virtually the same code yesterday, > as v1.1 of the Github version of amcheck (also known as amcheck_next). > Early adopters will be able to use this new "heapallindexed" > functionality in the next few day

Re: [HACKERS] static assertions in C++

2017-11-28 Thread Michael Paquier
On Fri, Sep 1, 2017 at 8:28 AM, Robert Haas wrote: > On Thu, Aug 31, 2017 at 6:37 PM, Tom Lane wrote: >> Meh. We support ancient versions of C for backwards compatibility >> reasons, but considering that compiling backend code with C++ isn't >> officially supported at all, I'm not sure we need t

Re: [HACKERS] WIP: Covering + unique indexes.

2017-11-28 Thread Andrey Borodin
> 29 нояб. 2017 г., в 8:45, Peter Geoghegan написал(а): > > On Tue, Nov 28, 2017 at 6:16 PM, Michael Paquier > wrote: >> On Sun, Nov 12, 2017 at 8:40 PM, Andrey Borodin wrote: >>> Postgres crashes: >>> TRAP: FailedAssertion("!(((const void*)(&isNull) != ((void*)0)) && >>> (scankey->sk_attno)

Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2017-11-28 Thread Michael Paquier
On Sat, Nov 25, 2017 at 2:32 AM, Pavel Stehule wrote: > fixed regress test The last patch still applies, but did not get any reviews. Horiguchi-san, you are marked as a reviewer of this patch. Could you look at it? For now, I am moving it to next CF. -- Michael

Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove pgbench "progress" test pending solution of its timing is (fwd)

2017-11-28 Thread Michael Paquier
On Sun, Sep 24, 2017 at 11:30 PM, Fabien COELHO wrote: > Attached is an attempt at improving the situation: > > (1) there are added comments to explain the whys, which is to provide > coverage for pgbench time-related features... while still not being > time-sensitive, which is a challenge. > > (2

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-11-28 Thread Michael Paquier
On Wed, Nov 8, 2017 at 8:50 AM, Haribabu Kommi wrote: > Ok. Removed the documentation changes that it cannot be used for normal > scenarios, and also added a Note section explaining the problem of using > the dump with pg_restore command with --clean and --create options. Hari, the documentation

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-11-28 Thread Michael Paquier
On Tue, Nov 28, 2017 at 4:18 AM, Pavel Stehule wrote: > This proposal is first time, when we cannot to detect full semantic from > \xxx command. When user extend query correctly, then it is better than > before, when not it is worse than before. As the discussion is still going on, I am moving th

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-11-28 Thread Michael Paquier
On Tue, Nov 21, 2017 at 7:07 AM, Alexander Korotkov wrote: > On Mon, Nov 20, 2017 at 1:59 PM, Alexander Korotkov > wrote: >> >> On Mon, Nov 20, 2017 at 4:09 AM, Tomas Vondra >> wrote: >>> >>> Seems fine to me, although perhaps it should be split into two parts. >>> One with the cube_coord_llur f

Re: [HACKERS] parallel.c oblivion of worker-startup failures

2017-11-28 Thread Michael Paquier
On Fri, Oct 27, 2017 at 9:54 PM, Amit Kapila wrote: > The patch still applies (with some hunks). I have added it in CF [1] > to avoid losing track. > > [1] - https://commitfest.postgresql.org/15/1341/ This did not get reviews and the patch still applies. I am moving it to next CF. -- Michael

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2017-11-28 Thread Michael Paquier
On Fri, Nov 10, 2017 at 8:36 PM, Etsuro Fujita wrote: > For local constraints on foreign tables, it's the user's responsibility to > ensure that those constraints matches the remote side, so we don't need to > ensure those constraints locally. But I'm not sure if the same thing > applies to WCOs

Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT

2017-11-28 Thread Michael Paquier
On Tue, Sep 19, 2017 at 3:04 PM, Kyotaro HORIGUCHI wrote: >> By the way, I will take a look at your patch when I come back from the >> vacation. Meanwhile, I noticed that it needs another rebase after >> 0a480502b092 [1]. Moved to CF 2018-01. -- Michael

Re: [HACKERS] why not parallel seq scan for slow functions

2017-11-28 Thread Michael Paquier
On Fri, Nov 10, 2017 at 4:42 AM, Robert Haas wrote: > On Thu, Nov 9, 2017 at 3:47 AM, Amit Kapila wrote: >> I think I understood your concern after some offlist discussion and it >> is primarily due to the inheritance related check which can skip the >> generation of gather paths when it shouldn'

Re: [HACKERS] Walsender timeouts and large transactions

2017-11-28 Thread Michael Paquier
On Fri, Nov 17, 2017 at 4:35 PM, Kyotaro HORIGUCHI wrote: > I'm a reviewer of this patch but I think I'm not allowed to mark > this "Ready for Commiter" since the last change is made by me. Yes, it is a better idea to wait for reviews here. -- Michael

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-11-28 Thread Michael Paquier
On Fri, Oct 27, 2017 at 3:13 AM, Michael Paquier wrote: > On Thu, Oct 26, 2017 at 3:05 AM, Kyotaro HORIGUCHI > wrote: >> The largest obstacle to do that is that walreceiver is not >> utterly concerned to record internals. In other words, it doesn't >> know what a record is. Teaching that introduc

Re: [HACKERS] postgres_fdw: Add support for INSERT OVERRIDING clause

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 8:12 AM, Tom Lane wrote: > IIRC, this issue was debated at great length back when we first put > in foreign tables, because early drafts of postgres_fdw did what you > propose here, and we ran into very nasty problems. We eventually decided > that allowing remotely-determi

Re: [HACKERS] Push down more UPDATEs/DELETEs in postgres_fdw

2017-11-28 Thread Michael Paquier
On Mon, Oct 2, 2017 at 9:08 AM, Daniel Gustafsson wrote: > This patch has been marked Ready for Committer in the current commitfest > without being committed or rejected. Moving to the next commitfest, but since > it has bitrotted I’m moving it to Waiting for author. No updates have showed up si

Re: [HACKERS] Pluggable storage

2017-11-28 Thread Michael Paquier
On Tue, Nov 14, 2017 at 5:09 PM, Michael Paquier wrote: > On Tue, Nov 7, 2017 at 6:34 PM, Haribabu Kommi > wrote: >> On Tue, Oct 31, 2017 at 8:59 PM, Haribabu Kommi >> wrote: >>> Additional changes that are done in the patches compared to earlier >>> patches apart from rebase. >> >> Rebased pat

Re: [HACKERS] UPDATE of partition key

2017-11-28 Thread Michael Paquier
On Mon, Nov 27, 2017 at 5:28 PM, Amit Khandekar wrote: > So, in the upcoming patch version, I am intending to include the above > two, and if possible, Robert's idea of re-using is_partition_attr() > for pull_child_partition_columns(). Discussions are still going on, so moved to next CF. -- Mich

Re: new function for tsquery creartion

2017-11-28 Thread Michael Paquier
On Tue, Nov 28, 2017 at 11:57 PM, Aleksander Alekseev wrote: >> I like the idea and I think it's a great patch. However in current shape it >> requires some amount of reworking to meet PostgreSQL standards of code >> quality. > > Also I would like to add that I agree with Thomas Munro: > >> Calli

Re: scan-build plpython stuff

2017-11-28 Thread John Naylor
On 11/28/17, Peter Eisentraut wrote: > On 11/24/17 08:40, John Naylor wrote: >> I built plpython with scan-build using Python 2.7.12 and Clang 3.8. On >> master, I got 13 warnings, and with your patches only one warning >> (report attached). > > Thanks for testing. That one bug is actually a new

Re: [HACKERS] WIP: Covering + unique indexes.

2017-11-28 Thread Peter Geoghegan
On Tue, Nov 28, 2017 at 6:16 PM, Michael Paquier wrote: > On Sun, Nov 12, 2017 at 8:40 PM, Andrey Borodin wrote: >> Postgres crashes: >> TRAP: FailedAssertion("!(((const void*)(&isNull) != ((void*)0)) && >> (scankey->sk_attno) > 0)", File: "nbtsearch.c", Line: 466) >> >> May be I'm doing somethi

Re: [HACKERS] postgres_fdw bug in 9.6

2017-11-28 Thread Ashutosh Bapat
On Tue, Nov 28, 2017 at 11:05 PM, Robert Haas wrote: > On Tue, Nov 28, 2017 at 11:21 AM, Tom Lane wrote: >> In short, we should get rid of all of this expensive and broken logic and >> just make EPQ recheck on a foreign join be a no-op, just as it is for a >> foreign base table. > > I'm not sure

Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

2017-11-28 Thread Michael Paquier
On Tue, Nov 28, 2017 at 10:07 AM, Michael Paquier wrote: > I was just looking at the tsearch code which uses pg_strcmpcase, and > those are defined with makeDefElem() so you should switch to strcmp in > this case as well, no? If I patch the code myself I would get an error > when double-quoting, m

Re: Code cleanup patch submission for extended_stats.c

2017-11-28 Thread Alvaro Herrera
Mark Dilger wrote: > > > On Nov 25, 2017, at 2:05 PM, Tom Lane wrote: > > > > Mark Dilger writes: > >> It looks to me like Alvaro introduced this in the original version of the > >> file which > >> was created in commit 7b504eb282ca2f5104b5c00b4f05a3ef6bb1385b. Grep'ing > >> through the code

Re: PG10.1 autovac killed building extended stats

2017-11-28 Thread Alvaro Herrera
Justin Pryzby wrote: > On Fri, Nov 17, 2017 at 03:43:52PM -0600, Justin Pryzby wrote: > > On Fri, Nov 17, 2017 at 01:36:00PM -0300, Alvaro Herrera wrote: > > > If I recall things correctly, the "continue" should be executed > > > regardless of IsAutoVacuumWorkerProcess() (only the log should be >

Re: [HACKERS] [PATCH] Lockable views

2017-11-28 Thread Michael Paquier
On Fri, Oct 27, 2017 at 2:11 PM, Robert Haas wrote: > On Wed, Oct 11, 2017 at 11:36 AM, Yugo Nagata wrote: >> In the attached patch, only automatically-updatable views that do not have >> INSTEAD OF rules or INSTEAD OF triggers are lockable. It is assumed that >> those views definition have only

Re: [HACKERS] postgres_fdw: support parameterized foreign joins

2017-11-28 Thread Michael Paquier
On Mon, Oct 2, 2017 at 9:06 AM, Daniel Gustafsson wrote: > This patch has been marked Ready for Committer in the current commitfest > without being committed or rejected. Moving to the next commitfest, but since > it has bitrotted I’m moving it to Waiting for author. One month and a half after,

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-11-28 Thread Michael Paquier
On Wed, Nov 15, 2017 at 10:17 AM, Nikita Glukhov wrote: > Attached the new version of the patches where displaying of SQL/JSON > constructor nodes was fixed. I decided not to invent new nodes but to > extend > existing FuncExpr, Aggref, WindowFunc nodes with new formatting fields that > give us a

Re: [PATCH] Atomic pgrename on Windows

2017-11-28 Thread Andres Freund
On 2017-11-29 10:13:32 +0800, Craig Ringer wrote: > On 29 November 2017 at 00:16, Alexander Korotkov > wrote: > > > > > For now, ReplaceFile() function looks like best choice for renaming > > statfiles. But it doesn't look good for critical datafiles whose are also > > renamed using pgrename, be

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-11-28 Thread Michael Paquier
On Sun, Nov 19, 2017 at 3:32 AM, Tom Lane wrote: > Oliver Ford writes: >> Attached is v2 of src, tests and docs. Doc patch is unchanged from v1. > > I took a quick look at this patch. This got a review, and no replies after 10 days to I am marking it as returned with feedback for now. Oliver, if

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2017-11-28 Thread Amit Kapila
On Tue, Nov 28, 2017 at 5:58 PM, amul sul wrote: > On Sat, Nov 25, 2017 at 11:39 AM, Amit Kapila wrote: >> On Thu, Nov 23, 2017 at 5:18 PM, amul sul wrote: >>> On Sat, Nov 11, 2017 at 1:05 AM, Robert Haas wrote: On Wed, Sep 27, 2017 at 7:07 AM, amul sul wrote: > > [...] >> Few comment

Re: [HACKERS] logical decoding of two-phase transactions

2017-11-28 Thread Michael Paquier
On Fri, Nov 24, 2017 at 3:41 PM, Craig Ringer wrote: > It looks amazingly simple from here. Which probably means there's more to it > that I haven't seen yet. I could use advice from someone who knows the > locking subsystem better. The status of this patch is I think not correct. It is marked as

Re: [HACKERS] WIP: Covering + unique indexes.

2017-11-28 Thread Michael Paquier
On Sun, Nov 12, 2017 at 8:40 PM, Andrey Borodin wrote: > Postgres crashes: > TRAP: FailedAssertion("!(((const void*)(&isNull) != ((void*)0)) && > (scankey->sk_attno) > 0)", File: "nbtsearch.c", Line: 466) > > May be I'm doing something wrong or amcheck support will go with different > patch? Us

Re: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering

2017-11-28 Thread Michael Paquier
On Wed, Sep 27, 2017 at 2:59 AM, Julien Rouhaud wrote: > On Tue, Sep 26, 2017 at 2:56 PM, Robert Haas wrote: >> On Sat, Sep 23, 2017 at 6:29 AM, Julien Rouhaud wrote: >>> That's true, but numCols, sortColdIdx etc are also used to display the >>> sort key in an explain. If an append can return s

Re: [PATCH] Atomic pgrename on Windows

2017-11-28 Thread Craig Ringer
On 29 November 2017 at 00:16, Alexander Korotkov wrote: > > For now, ReplaceFile() function looks like best choice for renaming > statfiles. But it doesn't look good for critical datafiles whose are also > renamed using pgrename, because system can crash between rename of > destination file and

Re: [HACKERS] Causal reads take II

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 11:04 AM, Thomas Munro wrote: > On Wed, Nov 29, 2017 at 2:58 PM, Michael Paquier > wrote: >> On Sat, Oct 28, 2017 at 6:24 AM, Thomas Munro >> wrote: >>> I managed to reproduce something like this on one of my home lab >>> machines running a different OS. Not sure why yet

Re: [HACKERS] Re: Is anything preventing us from allowing write to foreign tables from standby?

2017-11-28 Thread Michael Paquier
On Fri, Oct 27, 2017 at 4:44 PM, Robert Haas wrote: > However, as Michael also points out, it's arguably wrong to allow a > nominally read-only transaction to write data regardless of whether it > works. In the case of a standby it could be argued that your > transaction is only read-only because

Re: [HACKERS] Causal reads take II

2017-11-28 Thread Thomas Munro
On Wed, Nov 29, 2017 at 2:58 PM, Michael Paquier wrote: > On Sat, Oct 28, 2017 at 6:24 AM, Thomas Munro > wrote: >> I managed to reproduce something like this on one of my home lab >> machines running a different OS. Not sure why yet and it doesn't >> happen on my primary development box which i

Re: [HACKERS] Statement-level rollback

2017-11-28 Thread Michael Paquier
On Mon, Nov 6, 2017 at 9:36 PM, MauMau wrote: > From: Thomas Munro > With your v2 patch "make docs" fails. Here is a small patch to apply > on top of yours to fix that and some small copy/paste errors, if I > understood correctly. > > Ouch, thanks. I'd like to merge your fix when I submit the ne

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-11-28 Thread Michael Paquier
On Mon, Nov 27, 2017 at 10:47 AM, Andreas Karlsson wrote: > Cool, feel free to ask if you need some assistance. I want this patch. The last patch submitted did not get a review, and it does not apply as well. So I am moving it to next CF with waiting on author as status. Please rebase the patch.

Re: [HACKERS] Causal reads take II

2017-11-28 Thread Michael Paquier
On Sat, Oct 28, 2017 at 6:24 AM, Thomas Munro wrote: > I managed to reproduce something like this on one of my home lab > machines running a different OS. Not sure why yet and it doesn't > happen on my primary development box which is how I hadn't noticed it. > I will investigate and aim to get a

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-11-28 Thread Michael Paquier
On Tue, Oct 3, 2017 at 1:51 AM, Alexander Korotkov wrote: > I think that isolation tests should be improved. It doesn't seems that any > posting tree would be generated by the tests that you've provided, because > all the TIDs could fit the single posting list. Note, that you can get some > insi

Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2017-11-28 Thread Michael Paquier
On Mon, Nov 27, 2017 at 4:47 PM, Alexander Korotkov wrote: > Also, you've long comment lines in predicate-gist.spec. Please, break long > comments into multiple lines. Two days is to short to reply. I am moving this patch to next CF. -- Michael

Re: Jsonb transform for pl/python

2017-11-28 Thread Michael Paquier
On Mon, Nov 20, 2017 at 10:48 PM, Aleksander Alekseev wrote: > Well frankly I very much doubt that this: > [snip] > I'm afraid that tests fail on Python 3: So this still needs more work.. I am marking it as returned with feedback as there has been no updates for more than 1 week. -- Michael

Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patch for hash index

2017-11-28 Thread Michael Paquier
On Mon, Sep 25, 2017 at 10:34 PM, Shubham Barai wrote: > I have attached the rebased version of patch here. The patch does not apply and there has been no reviews as well. In consequence, I am moving it to next CF with "waiting on author" as status. Please provide a rebased patch. -- Michael

Re: [HACKERS] Small improvement to compactify_tuples

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 8:00 AM, Peter Geoghegan wrote: > On Tue, Nov 28, 2017 at 2:41 PM, Andres Freund wrote: >> Maybe it's a stupid question. But would we still want to have this after >> the change? These should be just specializations of the template version >> imo. > > I also wonder why reg

Re: [HACKERS] Range Merge Join v1

2017-11-28 Thread Michael Paquier
On Mon, Sep 18, 2017 at 2:24 AM, Jeff Davis wrote: > Any comments or alternative suggestions welcome. This will probably > take a few days at least, so I put the patch in "waiting on author" > state. This did not receive an update for two months. I am marking it as returned with feedback. -- Mic

Re: [HACKERS] Runtime Partition Pruning

2017-11-28 Thread Michael Paquier
On Wed, Nov 15, 2017 at 3:53 PM, Beena Emerson wrote: > Thank you for your suggestion. I am looking into this and will post a > patch soon. It has been two weeks since this update and no new patch has showed up. I am marking the patch as returned with feedback. If you can produce a new version, o

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2017-11-28 Thread Michael Paquier
On Mon, Oct 2, 2017 at 11:02 PM, Claudio Freire wrote: > Rebased version of the patches attached The status of the patch is misleading: https://commitfest.postgresql.org/15/844/. This was marked as waiting on author but a new version has been published. Let's be careful. The last patches I am aw

Re: [HACKERS] path toward faster partition pruning

2017-11-28 Thread Amit Langote
Hi Jesper. On 2017/11/28 3:30, Jesper Pedersen wrote: > Hi Amit, > > On 11/24/2017 12:00 AM, Amit Langote wrote: >>> On 2017/11/23 3:56, Jesper Pedersen wrote: >>> EXPLAIN (ANALYZE) SELECT t1.a, t1.b, t2.c, t2.d FROM t1 INNER JOIN t2 ON >>> t2.c = t1.b WHERE t2.d = 1; >>> >>> I just wanted to hig

Re: Fix a typo in xact.c

2017-11-28 Thread Masahiko Sawada
On Tue, Nov 28, 2017 at 10:22 PM, Robert Haas wrote: > On Mon, Nov 27, 2017 at 8:29 PM, Masahiko Sawada > wrote: >> Attached patch for $subject. >> >> s/recoreds/record/ > > Committed. > Thank you! Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software

Re: With commit 4e5fe9ad19, range partition missing handling for the NULL partition key

2017-11-28 Thread Amit Langote
On 2017/11/29 4:16, Robert Haas wrote: > On Thu, Nov 23, 2017 at 5:41 AM, Rushabh Lathia > wrote: >>> Good point. Updated patch attached. >> >> Thanks Amit. >> >> Patch looks good to me. > > Committed, except I left out the comment tweak, which seemed irrelevant. Thank you. Regards, Amit

Re: default range partition and constraint exclusion

2017-11-28 Thread Amit Langote
On 2017/11/29 0:52, Robert Haas wrote: > On Mon, Nov 27, 2017 at 4:01 PM, Robert Haas wrote: >> I am out of time for today but will try to look at this some more tomorrow. > > Upon closer study this seems to definitely be a correct fix, so I have > committed it. Apologies for my earlier confusio

Re: [HACKERS] PG10 partitioning - odd behavior/possible bug

2017-11-28 Thread Robert Haas
On Tue, Nov 28, 2017 at 6:42 PM, Joe Conway wrote: > Yeah, Tom already pointed that out a while back: > > https://www.postgresql.org/message-id/20986.1504478066%40sss.pgh.pa.us Ah, sorry, hadn't seen that. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Compan

Re: [HACKERS] PG10 partitioning - odd behavior/possible bug

2017-11-28 Thread Joe Conway
On 11/28/2017 04:40 PM, Robert Haas wrote: > On Sun, Sep 3, 2017 at 5:28 PM, Joe Conway wrote: >> I was playing around with partitioning and found an oddity that is best >> described with the following reasonably minimal test case: > > I can reproduce this without partitioning, just by creating t

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2017-11-28 Thread Michael Paquier
On Mon, Nov 27, 2017 at 2:39 PM, Jing Wang wrote: > A few general comments. > > + FreeSpaceMapVacuum(onerel, 64); > > Just want to know why '64' is used here? It's better to give a description. > > +else > + { > + newslot = fsm_get_avail(page, 0); > + } > > Since there is only one

Re: [HACKERS] postgres_fdw super user checks

2017-11-28 Thread Stephen Frost
Tom, Robert, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > OK, let me try to summarize where we are with this. > > > Currently, postgres_fdw requires a password unless you are logged in > > as a superuser. Jeff proposes to change that so that it requires a > > password i

Re: pgindent run?

2017-11-28 Thread Mark Dilger
> On Nov 28, 2017, at 2:57 PM, Tom Lane wrote: > > Mark Dilger writes: >>> On Nov 28, 2017, at 12:47 PM, Tom Lane wrote: >>> I think that'd be taking it too far, especially given that the dependency >>> on a typedefs list means that the git hook might have a different idea >>> of what's correc

Re: [HACKERS] postgres_fdw: Add support for INSERT OVERRIDING clause

2017-11-28 Thread Tom Lane
Peter Eisentraut writes: > I've been playing with a few test cases and I'm a bit confused by how > some of this is supposed to work. AFAICT, in the SQL standard, foreign > tables can't have column defaults, but in PostgreSQL it's allowed. This > creates some semantic differences, I think. For e

Re: [HACKERS] Small improvement to compactify_tuples

2017-11-28 Thread Peter Geoghegan
On Tue, Nov 28, 2017 at 2:41 PM, Andres Freund wrote: > Maybe it's a stupid question. But would we still want to have this after > the change? These should be just specializations of the template version > imo. I also wonder why regression test output has changed. Wasn't this supposed to be a mec

Re: pgindent run?

2017-11-28 Thread Tom Lane
Mark Dilger writes: >> On Nov 28, 2017, at 12:47 PM, Tom Lane wrote: >> I think that'd be taking it too far, especially given that the dependency >> on a typedefs list means that the git hook might have a different idea >> of what's correctly indented than the committer does. It'd be very hard >

Re: Add PGDLLIMPORT lines to some variables

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 5:00 AM, Brian Cloutier wrote: > Sorry, I'm new to pg-hackers, so I'm not sure what the next step is. > > Do I submit this to commitfest? > > When submitting, do I submit multiple changes, one per branch this should be > packported to? If you want a patch to get reviewed,

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-11-28 Thread Peter Eisentraut
On 11/28/17 17:33, Michael Paquier wrote: > 1) Have a special value in the parameter saslchannelbinding proposed > in patch 0001. For example by specifying "none" then no channel > binding is used. I was thinking if it's empty then don't use channel binding. Right now, empty means the same thing

Re: [HACKERS] Small improvement to compactify_tuples

2017-11-28 Thread Andres Freund
Hi, On 2017-11-28 23:30:53 +0300, Юрий Соколов wrote: > index 1a8ee08c8b..607ed6a781 100644 > --- a/src/port/qsort.c > +++ b/src/port/qsort.c > @@ -8,7 +8,7 @@ > * in favor of a simple check for presorted input. > * Take care to recurse on the smaller partition, to bound stack usage. >

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 6:44 AM, Robert Haas wrote: > On Tue, Nov 21, 2017 at 4:32 AM, Masahiko Sawada > wrote: >> Thank you for comments. Attached updated patch. > > I see that Michael has marked this Ready for Committer, but also that > he didn't update the thread, so perhaps some interested c

Re: pgindent run?

2017-11-28 Thread Mark Dilger
> On Nov 28, 2017, at 12:47 PM, Tom Lane wrote: > > Mark Dilger writes: >> I have no objection, but if the community intends to keep everything >> indented per project standards, why is there no git hook to reject >> improperly indented code at commit time? I've suffered some pain >> trying to

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 7:08 AM, Michael Paquier wrote: > On Wed, Nov 29, 2017 at 2:41 AM, Robert Haas wrote: >> On Tue, Nov 28, 2017 at 11:10 AM, Peter Eisentraut >> wrote: >>> I also wonder whether there should be a mechanism to turn off channel >>> binding from the client. Right now, there i

Re: Updated macOS start scripts

2017-11-28 Thread Mark Dilger
> On Nov 28, 2017, at 1:22 PM, Peter Eisentraut > wrote: > > On 11/28/17 14:07, Mark Dilger wrote: >> Upon further review, I have noticed that `pg_ctl stop` does not work once >> the org.postgresql.postgres service has been started. I was trying to stop, >> reinstall and re-initdb and restart

Re: [HACKERS] postgres_fdw: Add support for INSERT OVERRIDING clause

2017-11-28 Thread Peter Eisentraut
On 11/3/17 07:53, Michael Paquier wrote: > Trying to insert some data using OVERRIDING SYSTEM VALUE on a foreign > table with a remote relation defined with GENERATED ALWAYS would just > fail: > =# insert into id_always_foreign OVERRIDING system VALUE values (8); > ERROR: 428C9: cannot insert into

Re: Skip index cleanup if autovacuum did not do any work

2017-11-28 Thread Peter Geoghegan
On Tue, Nov 28, 2017 at 1:36 PM, Feike Steenbergen wrote: > On a server with a very frequent xid wraparound I can see that the > anti-wraparound vacuum is finished very quickly with the heap, yet it still > scans all the indexes, which causes it to still have to read a lot of data, > which takes a

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-11-28 Thread Michael Paquier
On Wed, Nov 29, 2017 at 2:41 AM, Robert Haas wrote: > On Tue, Nov 28, 2017 at 11:10 AM, Peter Eisentraut > wrote: >> I also wonder whether there should be a mechanism to turn off channel >> binding from the client. Right now, there is no way to test the >> non-PLUS mechanism in an SSL build. > >

Re: Skip index cleanup if autovacuum did not do any work

2017-11-28 Thread Peter Geoghegan
On Tue, Nov 28, 2017 at 1:55 PM, Tom Lane wrote: > It might be okay to put such a short-circuit in at a lower level, > eg within the btree AM. I don't remember at the moment whether > a btree vacuum scan accomplishes anything much if there are no dead > tuples. > > One thing that I think it does

Re: Skip index cleanup if autovacuum did not do any work

2017-11-28 Thread Tom Lane
Feike Steenbergen writes: > On a server with a very frequent xid wraparound I can see that the > anti-wraparound vacuum is finished very quickly with the heap, yet it still > scans all the indexes, which causes it to still have to read a lot of data, > which takes a considerable amount of time. >

Re: Skip index cleanup if autovacuum did not do any work

2017-11-28 Thread Feike Steenbergen
On 28 November 2017 at 22:48, Peter Geoghegan wrote: > There is a patch in the ongoing CF to do this: Ah, thanks, I'll probably review that one then > It's a lot harder to do this correctly than it first appears. I already thought my naive approach would not suffice

Re: Skip index cleanup if autovacuum did not do any work

2017-11-28 Thread Peter Geoghegan
On Tue, Nov 28, 2017 at 1:36 PM, Feike Steenbergen wrote: > On a server with a very frequent xid wraparound I can see that the > anti-wraparound vacuum is finished very quickly with the heap, yet it still > scans all the indexes, which causes it to still have to read a lot of data, > which takes a

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-28 Thread Robert Haas
On Tue, Nov 21, 2017 at 4:32 AM, Masahiko Sawada wrote: > Thank you for comments. Attached updated patch. I see that Michael has marked this Ready for Committer, but also that he didn't update the thread, so perhaps some interested committer (Fujii Masao?) might have missed the fact that Michael

Re: Skip index cleanup if autovacuum did not do any work

2017-11-28 Thread Feike Steenbergen
Sorry, I didn't attach a good patch, this one should be better 0002-skip_cleanup_for_stale_relation.patch Description: Binary data

Re: [HACKERS] PG10 partitioning - odd behavior/possible bug

2017-11-28 Thread Robert Haas
On Sun, Sep 3, 2017 at 5:28 PM, Joe Conway wrote: > I was playing around with partitioning and found an oddity that is best > described with the following reasonably minimal test case: I can reproduce this without partitioning, just by creating two independent tables with the same schema and twea

Re: pgindent run?

2017-11-28 Thread Tom Lane
Thomas Munro writes: > On Wed, Nov 29, 2017 at 9:47 AM, Tom Lane wrote: >> I think that'd be taking it too far, especially given that the dependency >> on a typedefs list means that the git hook might have a different idea >> of what's correctly indented than the committer does. It'd be very har

Skip index cleanup if autovacuum did not do any work

2017-11-28 Thread Feike Steenbergen
On a server with a very frequent xid wraparound I can see that the anti-wraparound vacuum is finished very quickly with the heap, yet it still scans all the indexes, which causes it to still have to read a lot of data, which takes a considerable amount of time. I dove into the code a bit and as fa

Re: [HACKERS] postgres_fdw super user checks

2017-11-28 Thread Tom Lane
Robert Haas writes: > OK, let me try to summarize where we are with this. > Currently, postgres_fdw requires a password unless you are logged in > as a superuser. Jeff proposes to change that so that it requires a > password if you are EITHER logged in as a superuser OR using a > superuser's cre

Re: pgindent run?

2017-11-28 Thread Thomas Munro
On Wed, Nov 29, 2017 at 9:47 AM, Tom Lane wrote: > Mark Dilger writes: >> I have no objection, but if the community intends to keep everything >> indented per project standards, why is there no git hook to reject >> improperly indented code at commit time? I've suffered some pain >> trying to me

Re: Updated macOS start scripts

2017-11-28 Thread Peter Eisentraut
On 11/28/17 14:07, Mark Dilger wrote: > Upon further review, I have noticed that `pg_ctl stop` does not work once > the org.postgresql.postgres service has been started. I was trying to stop, > reinstall and re-initdb and restart postgres and this service was a pita. I > had > to go back to your

Re: [HACKERS] postgres_fdw super user checks

2017-11-28 Thread Robert Haas
On Thu, Oct 12, 2017 at 9:21 PM, Stephen Frost wrote: > Yes, that means that sometimes when superusers run things they get > permission denied errors. That's always been the case, and is correct. OK, let me try to summarize where we are with this. Currently, postgres_fdw requires a password unl

Re: [HACKERS] postgres_fdw super user checks

2017-11-28 Thread Robert Haas
On Thu, Oct 5, 2017 at 1:16 PM, Nico Williams wrote: >> That's an interesting point. I think that you can imagine use cases >> for either method. Obviously, if what you want to do is drill a hole >> through the Internet to another server and then expose it to some of >> your fellow users, having

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-11-28 Thread Robert Haas
On Mon, Aug 7, 2017 at 11:14 AM, Fabrízio de Royes Mello wrote: > I also test against all current supported versions (9.2 ... 9.6) and didn't > find any issue. > > Changed status to "ready for commiter". On a very fast read this patch looks OK to me, but I'm a bit concerned about whether we have

Re: pgindent run?

2017-11-28 Thread Tom Lane
Mark Dilger writes: > I have no objection, but if the community intends to keep everything > indented per project standards, why is there no git hook to reject > improperly indented code at commit time? I've suffered some pain > trying to merge code pre-global-indent-run into a branch > post-glob

Re: Updated macOS start scripts

2017-11-28 Thread Tom Lane
Mark Dilger writes: >> On Nov 28, 2017, at 11:17 AM, Tom Lane wrote: >> Hmm. Maybe we should have the plist file set KeepAlive to false not true? >> This would mean you'd need manual action to restart a failed postmaster, >> but that probably comes with the territory --- I do not see how we'd >>

Re: pgindent run?

2017-11-28 Thread Tom Lane
Andres Freund writes: > On 2017-11-28 14:51:06 -0500, Robert Haas wrote: >> If nobody minds too much, I'd like to update typedefs.list and >> pgindent the whole tree again. > +1. OK by me --- I've several times restrained myself from just doing an ad-hoc reindent on some of these files.

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-11-28 Thread Robert Haas
On Sun, Nov 26, 2017 at 9:33 PM, Masahiko Sawada wrote: > Attached latest patch incorporated all comments so far. Please review it. I think you only need RelExtLockReleaseAllI() where we currently have LockReleaseAll(DEFAULT_LOCKMETHOD, ...) not where we have LockReleaseAll(USER_LOCKMETHOD, ...).

Re: [HACKERS] Small improvement to compactify_tuples

2017-11-28 Thread Юрий Соколов
2017-11-28 11:49 GMT+03:00 Peter Geoghegan : > > On Mon, Nov 27, 2017 at 11:46 PM, Юрий Соколов wrote: > > Attached patched replaces gen_qsort_tuple.pl with qsort_template.h - generic > > qsort template header. > > Some tests do not specify exact order (ie their output depends on order of > > equa

Re: pgindent run?

2017-11-28 Thread Mark Dilger
> On Nov 28, 2017, at 11:51 AM, Robert Haas wrote: > > If nobody minds too much, I'd like to update typedefs.list and > pgindent the whole tree again. We've generally done a pretty good job > with pgindenting patches as they are committed this cycle, but we're > starting to accumulate things he

Re: Add PGDLLIMPORT lines to some variables

2017-11-28 Thread Brian Cloutier
Sorry, I'm new to pg-hackers, so I'm not sure what the next step is. Do I submit this to commitfest? When submitting, do I submit multiple changes, one per branch this should be packported to?

  1   2   >