Re: [HACKERS] Improve the performance of the standby server when dropping tables on the primary server

2017-07-31 Thread Simon Riggs
On 1 August 2017 at 05:45, Tokuda, Takashi wrote: > Hi, > > The attached patch changes data structure storing unowned SMgrRelation objects > from list structure to hash structure. > The reason why I change it is that list structure very slowly removes a node. > And list structure takes longer time

Re: [HACKERS] Update description of \d[S+] in \?

2017-07-31 Thread Amit Langote
On 2017/08/01 11:44, David G. Johnston wrote: > On Mon, Jul 31, 2017 at 7:06 PM, Robert Haas wrote: > >> On Thu, Jul 13, 2017 at 8:40 PM, Amit Langote >> wrote: >>> On 2017/07/13 19:57, Ashutosh Bapat wrote: On Thu, Jul 13, 2017 at 12:01 PM, Amit Langote wrote: > The description o

[HACKERS] A little improvementof ApplyLauncherMain loop code

2017-07-31 Thread Yugo Nagata
Hi, When reading the logical replication code, I found that the following part could be improved a bit. In the foreach, LWLockAcquire and logicalrep_worker_find are called for each loop, but they are needed only when sub->enabled is true. 846 /* Start the missing workers for enabled

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-07-31 Thread Simon Riggs
On 1 August 2017 at 07:16, Amit Langote wrote: > In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints > declared NOT VALID valid if created with table." In retrospect, > constraints on foreign tables should have been excluded from consideration > in that commit, because the thinki

[HACKERS] foreign table creation and NOT VALID check constraints

2017-07-31 Thread Amit Langote
In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints declared NOT VALID valid if created with table." In retrospect, constraints on foreign tables should have been excluded from consideration in that commit, because the thinking behind the aforementioned commit (that the constraint

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-07-31 Thread Victor Wagner
On Mon, 31 Jul 2017 19:42:30 -0400 Peter Eisentraut wrote: > On 7/25/17 15:20, Victor Wagner wrote: > > It turns out, that PostgreSQL enumerates collations for all ICU > > locales and passes it into uloc_toLanguageTag function with strict > > argument of this function set to TRUE. But for some lo

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-07-31 Thread Shay Rojansky
Hi Tom and Heikki. As Tom says, session caching and session tickets seem to be two separate things. However, I think you may be reading more into the session ticket feature than there is - AFAICT there is no expectation or mechanism for restoring *application* state of any kind - the mechanism is

Re: [HACKERS] Freeze on Cygwin w/ concurrency

2017-07-31 Thread Noah Misch
On Mon, Mar 20, 2017 at 11:47:03PM -0400, Noah Misch wrote: > "pgbench -i -s 50; pgbench -S -j2 -c16 -T900 -P5" freezes consistently on > Cygwin 2.2.1 and Cygwin 2.6.0. (I suspect most other versions are affected.) > I've pinged[1] the Cygwin bug thread with some additional detail. The problem wa

Re: [HACKERS] segfault in HEAD when too many nested functions call

2017-07-31 Thread Noah Misch
On Fri, Jul 28, 2017 at 02:42:06PM -0400, Robert Haas wrote: > On Fri, Jul 28, 2017 at 12:29 PM, Noah Misch wrote: > > Your colleagues achieve compliance despite uncertainty; for inspiration, I > > recommend examining Alvaro's status updates as examples of this. The policy > > currently governs y

[HACKERS] Improve the performance of the standby server when dropping tables on the primary server

2017-07-31 Thread Tokuda, Takashi
Hi, The attached patch changes data structure storing unowned SMgrRelation objects from list structure to hash structure. The reason why I change it is that list structure very slowly removes a node. And list structure takes longer time to remove a node than hash structure. The problem was repor

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread Amit Langote
On 2017/08/01 12:45, Etsuro Fujita wrote: > On 2017/08/01 10:18, Amit Langote wrote: >> Good points; fixed in the updated patch. > > I should have mentioned this in an earlier mail, but one thing I noticed > is this: > > -the remote server. > +the remote server. That becomes especially i

Re: [HACKERS] Update comments in nodeModifyTable.c

2017-07-31 Thread Etsuro Fujita
On 2017/08/01 1:03, Robert Haas wrote: On Fri, Jul 28, 2017 at 8:12 AM, Etsuro Fujita wrote: On 2017/07/26 22:39, Robert Haas wrote: So the first part of the change weakens the assertion that a 'ctid' or 'wholerow' attribute will always be present by saying that an FDW may instead have other a

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-07-31 Thread Amit Langote
On 2017/08/01 10:52, Robert Haas wrote: > On Mon, Apr 3, 2017 at 6:28 AM, Amit Langote > wrote: >> Since nowhere has the user asked to ensure unique(b) across partitions by >> defining the same on parent, this seems just fine. But one question to >> ask may be whether that will *always* be the ca

[HACKERS] Re: [BUGS] BUG #14758: Segfault with logical replication on a function index

2017-07-31 Thread Noah Misch
On Mon, Jul 31, 2017 at 09:40:34AM +0900, Masahiko Sawada wrote: > On Sat, Jul 29, 2017 at 4:35 AM, Scott Milliken wrote: > > Thank you Masahiko! I've tested and confirmed that this patch fixes the > > problem. > > > > Thank you for the testing. This issue should be added to the open item > since

Re: [HACKERS] Subscription code improvements

2017-07-31 Thread Noah Misch
On Fri, Jul 07, 2017 at 10:19:19PM +0200, Petr Jelinek wrote: > I have done some review of subscription handling (well self-review) and > here is the result of that (It's slightly improved version from another > thread [1]). > Only the 0002, 0004 and 0005 are actual bug fixes, but I'd still like t

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread Etsuro Fujita
On 2017/08/01 10:18, Amit Langote wrote: Good points; fixed in the updated patch. I should have mentioned this in an earlier mail, but one thing I noticed is this: -the remote server. +the remote server. That becomes especially important if the table is +being used in a partitio

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-07-31 Thread Amit Langote
Thanks for taking a look at this. On 2017/08/01 6:26, Robert Haas wrote: > On Wed, Jul 26, 2017 at 9:50 PM, Amit Langote > wrote: >> At least patch 0001 does address a bug. Not sure if we can say that 0002 >> addresses a bug; it implements a feature that might be a >> nice-to-have-in-PG-10. > >

Re: [HACKERS] Update description of \d[S+] in \?

2017-07-31 Thread David G. Johnston
On Mon, Jul 31, 2017 at 7:06 PM, Robert Haas wrote: > On Thu, Jul 13, 2017 at 8:40 PM, Amit Langote > wrote: > > On 2017/07/13 19:57, Ashutosh Bapat wrote: > >> On Thu, Jul 13, 2017 at 12:01 PM, Amit Langote > >> wrote: > >>> The description of \d[S+] currently does not mention that it will lis

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Tom Lane
Peter Eisentraut writes: > On 7/31/17 16:54, Tom Lane wrote: >> Maybe "which" isn't the best tool for the job, not sure. > Yeah, "which" is not portable. This would need a bit more work and > portability testing. Fair enough. This late in beta is probably not the time to be adding new portabil

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Robert Haas
On Mon, Jul 31, 2017 at 6:10 AM, Pavel Stehule wrote: > you can support XML, JSON output format like EXPLAIN does. > > https://www.postgresql.org/docs/current/static/sql-explain.html +1 for that approach. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Update description of \d[S+] in \?

2017-07-31 Thread Robert Haas
On Thu, Jul 13, 2017 at 8:40 PM, Amit Langote wrote: > On 2017/07/13 19:57, Ashutosh Bapat wrote: >> On Thu, Jul 13, 2017 at 12:01 PM, Amit Langote >> wrote: >>> The description of \d[S+] currently does not mention that it will list >>> materialized views and foreign tables. Attached fixes that.

Re: [HACKERS] Parallel Hash take II

2017-07-31 Thread Robert Haas
On Mon, Jul 31, 2017 at 9:11 PM, Andres Freund wrote: > - Echoing concerns from other threads (Robert: ping): I'm doubtful that > it makes sense to size the number of parallel workers solely based on > the parallel scan node's size. I don't think it's this patch's job to > change that, but

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-07-31 Thread Robert Haas
On Mon, Apr 3, 2017 at 6:28 AM, Amit Langote wrote: > Since nowhere has the user asked to ensure unique(b) across partitions by > defining the same on parent, this seems just fine. But one question to > ask may be whether that will *always* be the case? That is, will we take > ON CONFLICT DO NOT

Re: [HACKERS] Constraint exclusion for partitioned tables

2017-07-31 Thread Robert Haas
On Thu, Apr 6, 2017 at 6:47 AM, Ashutosh Bapat wrote: > I am guessing that for normal inheritance, a constraint on parent > doesn't necessarily imply the same constraint on the child (Amit > Langote gives me an example of NOT NULL constraint). CHECK constraints that apply to the parent would appl

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread Amit Langote
On 2017/08/01 10:10, David G. Johnston wrote: > On Mon, Jul 31, 2017 at 5:42 PM, Amit Langote > wrote: > >> >> On a second thought though, I think we should list the foreign table >> partitions' limitations in only one place, that is, the CREATE FOREIGN >> TABLE reference page. Listing them under

[HACKERS] Re: [BUGS] BUG #14758: Segfault with logical replication on a function index

2017-07-31 Thread Andres Freund
On 2017-07-31 09:40:34 +0900, Masahiko Sawada wrote: > Moved to -hackers. > > On Sat, Jul 29, 2017 at 4:35 AM, Scott Milliken wrote: > > Thank you Masahiko! I've tested and confirmed that this patch fixes the > > problem. > > > > Thank you for the testing. This issue should be added to the open

Re: [HACKERS] Parallel Hash take II

2017-07-31 Thread Andres Freund
From: Thomas Munro Date: Wed 26 Jul 2017 19:58:20 NZST Subject: [PATCH] Add support for parallel-aware hash joins. Hi, WRT the main patch: - Echoing concerns from other threads (Robert: ping): I'm doubtful that it makes sense to size the number of parallel workers solely based on the parall

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread David G. Johnston
On Mon, Jul 31, 2017 at 5:42 PM, Amit Langote wrote: > > On a second thought though, I think we should list the foreign table > partitions' limitations in only one place, that is, the CREATE FOREIGN > TABLE reference page. Listing them under 5.10.2.3. seems a bit off to me, > because other limit

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Peter Eisentraut
On 7/31/17 16:54, Tom Lane wrote: > Maybe "which" isn't the best tool for the job, not sure. Yeah, "which" is not portable. This would need a bit more work and portability testing. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Tra

Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y

2017-07-31 Thread Peter Eisentraut
On 7/26/17 11:29, Tom Lane wrote: > You'll notice that that statement fails in the regression tests: > > ALTER USER ALL SET application_name to 'SLAP'; > ERROR: syntax error at or near "ALL" > > The one that works is > > ALTER ROLE ALL SET application_name to 'SLAP'; > > and the reason is that

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread Amit Langote
On 2017/08/01 6:41, David G. Johnston wrote: > On Tue, Jul 25, 2017 at 11:29 PM, Amit Langote < > langote_amit...@lab.ntt.co.jp> wrote: > >>> I'm curious what the other limitations are... >> >> When I first wrote that documentation line (I am assuming you're asking >> about "although these have so

Re: [HACKERS] Fix a typo in pg_upgrade/info.c

2017-07-31 Thread Masahiko Sawada
On Tue, Aug 1, 2017 at 6:23 AM, Peter Eisentraut wrote: > On 7/13/17 03:22, Masahiko Sawada wrote: >> Hi, >> >> Attached patch for $subject. >> >> s/reporing/reporting/g > > fixed Thank you! Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Tom Lane
I wrote: > If we need to fix things so that AC_PATH_PROG will honor a non-path > input value, then let's do that. But let's not make the build system > shakier/less reproducible than it is already. > I suggest that we could inject logic like this: > if VARIABLE-is-set-and-value-isn't-already-a

Re: [HACKERS] 10 beta docs: different replication solutions

2017-07-31 Thread Steve Singer
On Mon, 31 Jul 2017, Merlin Moncure wrote: On Sun, Jul 30, 2017 at 8:34 PM, Steve Singer wrote: We don't seem to describe logical replication on https://www.postgresql.org/docs/10/static/different-replication-solutions.html The attached patch adds a section. This is a good catch. Two qui

Re: [HACKERS] Parallel Hash take II

2017-07-31 Thread Thomas Munro
On Tue, Aug 1, 2017 at 9:28 AM, Andres Freund wrote: > On 2017-07-26 20:12:56 +1200, Thomas Munro wrote: >> 2. Simplified costing. There is now just one control knob >> "parallel_synchronization_cost", which I charge for each time the >> participants will wait for each other at a barrier, to be

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-07-31 Thread Peter Eisentraut
On 7/25/17 15:20, Victor Wagner wrote: > It turns out, that PostgreSQL enumerates collations for all ICU locales > and passes it into uloc_toLanguageTag function with strict argument of > this function set to TRUE. But for some locales > (es*@collation=tradtiional, si*@collation=dictionary) only ca

[HACKERS] Re: [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-07-31 Thread Chapman Flack
On 07/31/17 16:30, Peter Eisentraut wrote: > I would think about specifying an operator somewhere in the syntax, like > you have with LISTEN SIMILAR TO. It would even be nice if a > non-built-in operator could be used for matching names. Hmm ... as I was reading through the email thread, I saw a

Re: [HACKERS] Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

2017-07-31 Thread Tatsuo Ishii
> Thanks for the patch. Looks good to me. I will commit/push into all > supported branches if there's no objection. Done. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Tom Lane
I wrote: > Done. I have also reconfigured buildfarm member prairiedog to use > a non-MULTIPLICITY build of Perl 5.8.3, with the oldest Test::More > and IPC::Run versions I could lay my hands on. Although I'd gotten > through a manual "make check-world" with this configuration in HEAD > before tou

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-31 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > >> AFAICT, pg_dump has no notion that it needs to be careful about the order > >> in which permissions are granted. I did > > > I'm afraid that's correct, though I believe that's alw

Re: LP_DEAD hinting and not holding on to a buffer pin on leaf page (Was: [HACKERS] [WIP] Zipfian distribution in pgbench)

2017-07-31 Thread Peter Geoghegan
Robert Haas wrote: On Mon, Jul 31, 2017 at 1:54 PM, Peter Geoghegan wrote: That is hard to justify. I don't think that failing to set LP_DEAD hints is the cost that must be paid to realize a benefit elsewhere, though. I don't see much problem with having both benefits consistently. It's actual

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread David G. Johnston
On Tue, Jul 25, 2017 at 11:29 PM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote: > > I'm curious what the other limitations are... > > When I first wrote that documentation line (I am assuming you're asking > about "although these have some limitations that normal tables do not"), I > was th

Re: [HACKERS] building libpq.a static library

2017-07-31 Thread Tom Lane
Peter Eisentraut writes: > On 7/12/17 11:11, Tom Lane wrote: >> FWIW, we used to have support for building static libpq, but >> we got rid of it a long time ago. I couldn't find the exact >> spot in some desultory trawling of the commit history. > We still build and install static libraries. Hm

Re: [HACKERS] Parallel Hash take II

2017-07-31 Thread Andres Freund
Hi, On 2017-07-26 20:12:56 +1200, Thomas Munro wrote: > Here is a new version of my parallel-aware hash join patchset. Yay! Working on reviewing this. Will send separate emails for individual patch reviews. > 2. Simplified costing. There is now just one control knob > "parallel_synchronizati

Re: [HACKERS] building libpq.a static library

2017-07-31 Thread Peter Eisentraut
On 7/12/17 11:11, Tom Lane wrote: > FWIW, we used to have support for building static libpq, but > we got rid of it a long time ago. I couldn't find the exact > spot in some desultory trawling of the commit history. We still build and install static libraries. -- Peter Eisentraut h

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-07-31 Thread Tom Lane
Heikki Linnakangas writes: > I agree with Tom that we don't really want abbreviated SSL handshakes, > or other similar optimizations, to take place. PostgreSQL connections > are quite long-lived, so we have little to gain. But it makes the attack > surface larger. There have been vulnerabilitie

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-07-31 Thread Robert Haas
On Wed, Jul 26, 2017 at 9:50 PM, Amit Langote wrote: > At least patch 0001 does address a bug. Not sure if we can say that 0002 > addresses a bug; it implements a feature that might be a > nice-to-have-in-PG-10. I think 0001 is actually several fixes that should be separated: - Cosmetic fixes,

Re: [HACKERS] Fix a typo in pg_upgrade/info.c

2017-07-31 Thread Peter Eisentraut
On 7/13/17 03:22, Masahiko Sawada wrote: > Hi, > > Attached patch for $subject. > > s/reporing/reporting/g fixed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-h

Re: [HACKERS] Another comment typo in execMain.c

2017-07-31 Thread Peter Eisentraut
On 7/6/17 03:23, Etsuro Fujita wrote: > Here is a comment in ExecFindPartition() in execMain.c: > > /* > * First check the root table's partition constraint, if any. No > point in > * routing the tuple it if it doesn't belong in the root table itself. > */ > > I think tha

Re: [HACKERS] POC: Sharing record typmods between backends

2017-07-31 Thread Andres Freund
Hi, diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index 9fd7b4e019b..97c0125a4ba 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -337,17 +337,75 @@ DecrTupleDescRefCount(TupleDesc tupdesc) { Assert(tup

Re: [HACKERS] Inconsistencies in from_char_parse_int_len()

2017-07-31 Thread Tom Lane
Douglas Doole writes: > I was playing with TO_TIMESTAMP() and I noticed a weird result: > postgres=# select to_timestamp('20170-07-24 21:59:57.12345678', '-mm-dd > hh24:mi:ss.us'); > to_timestamp > > 20170-07-24 22:00:09.345678+00 > (1 row) FWIW, we

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Tom Lane
Peter Eisentraut writes: > On 7/31/17 15:38, Tom Lane wrote: >> Really? That seems pretty broken, independently of how many variables >> are affected. But the ones you'd be most likely to do that with are >> using AC_PATH_PROG already, I think. Having lesser-used program variables >> behave inc

Re: [HACKERS] PG 10 release notes

2017-07-31 Thread Thomas Munro
On Tue, Apr 25, 2017 at 1:31 PM, Bruce Momjian wrote: > I have committed the first draft of the Postgres 10 release notes. They > are current as of two days ago, and I will keep them current. Please > give me any feedback you have. Hi Bruce, "Add AFTER trigger transition tables to record chang

[HACKERS] Inconsistencies in from_char_parse_int_len()

2017-07-31 Thread Douglas Doole
I was playing with TO_TIMESTAMP() and I noticed a weird result: postgres=# select to_timestamp('20170-07-24 21:59:57.12345678', '-mm-dd hh24:mi:ss.us'); to_timestamp 20170-07-24 22:00:09.345678+00 (1 row) Even though the "us" token is supposed to be

Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-07-31 Thread Peter Eisentraut
On 7/31/17 16:13, Markus Sintonen wrote: > This patch has no know backward compatibility issues with the existing > /LISTEN///UNLISTEN/ features. This is because patch extends the existing > syntax by accepting quoted strings which define the patterns as opposed > to the existing SQL literals. I d

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Peter Eisentraut
On 7/31/17 15:38, Tom Lane wrote: > Peter Eisentraut writes: >> One major PITA with the AC_PATH_* checks is that you can only override >> them with environment variables that are full paths; otherwise the >> environment variables are ignored. For example, currently, running > >> ./configure PYTH

[HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-07-31 Thread Markus Sintonen
Hi This patch adds an ability to use patterns in *LISTEN* commands. Patch uses '*SIMILAR TO*' patterns for matching *NOTIFY* channel names ( https://www.postgresql.org/docs/9.0/static/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP ). This patch is related to old discussion in https://www.post

Re: [HACKERS] PostgreSQL - Weak DH group

2017-07-31 Thread Heikki Linnakangas
On 07/31/2017 02:27 PM, Heikki Linnakangas wrote: Rebased patch attached, with proposed release notes included. Barring new objections or arguments, I'll commit this (only) to v10 later today. Ok, committed for v10. Thanks Nicolas and Damien, and everyone else involved! - Heikki -- Sent vi

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Peter Eisentraut
On 7/31/17 15:17, Peter Eisentraut wrote: > On 7/31/17 14:55, Tom Lane wrote: >>> We use the "PATH" variants when we need a fully qualified name. For >>> example, at some point or another, we needed to substitute a fully >>> qualified perl binary name into the headers of scripts. >> >>> If there i

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Tom Lane
Peter Eisentraut writes: > One major PITA with the AC_PATH_* checks is that you can only override > them with environment variables that are full paths; otherwise the > environment variables are ignored. For example, currently, running > ./configure PYTHON=python3 > will result in the PYTHON se

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Peter Eisentraut
On 7/31/17 14:55, Tom Lane wrote: >> We use the "PATH" variants when we need a fully qualified name. For >> example, at some point or another, we needed to substitute a fully >> qualified perl binary name into the headers of scripts. > >> If there is no such requirement, then we should use the no

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-31 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: > > * Noah Misch (n...@leadboat.com) wrote: > >> This PostgreSQL 10 open item is past due for your status update. Kindly > >> send > >> a status update within 24 hours, and include a date for yo

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-31 Thread Robert Haas
On Thu, Jul 27, 2017 at 10:27 AM, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: >> This PostgreSQL 10 open item is past due for your status update. Kindly send >> a status update within 24 hours, and include a date for your subsequent >> status >> update. Refer to the policy on

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Tom Lane
Peter Eisentraut writes: > On 7/30/17 12:50, Tom Lane wrote: >> The reason it does that seems to be that we use AC_CHECK_PROGS >> rather than AC_PATH_PROGS for locating "prove". I can see no >> particular consistency to the decisions made in configure.in >> about which to use: > We use the "PATH

Re: LP_DEAD hinting and not holding on to a buffer pin on leaf page (Was: [HACKERS] [WIP] Zipfian distribution in pgbench)

2017-07-31 Thread Robert Haas
On Mon, Jul 31, 2017 at 1:54 PM, Peter Geoghegan wrote: > That is hard to justify. I don't think that failing to set LP_DEAD hints > is the cost that must be paid to realize a benefit elsewhere, though. I > don't see much problem with having both benefits consistently. It's > actually very unlikel

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Peter Eisentraut
On 7/30/17 12:50, Tom Lane wrote: > Noah Misch writes: >> On Sun, Jul 30, 2017 at 12:05:10PM -0400, Tom Lane wrote: >>> Well, OK, but I'd still like to tweak configure so that it records >>> an absolute path for prove rather than just setting PROVE=prove. >>> That way you'd at least be able to tel

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-07-31 Thread Robert Haas
On Mon, Jul 31, 2017 at 1:27 PM, Alvaro Herrera wrote: > Postgres-XL seems to manage this problem by using a transaction manager > node, which is in charge of assigning snapshots. I don't know how that > works, but perhaps adding that concept here could be useful too. One > critical point to tha

Re: LP_DEAD hinting and not holding on to a buffer pin on leaf page (Was: [HACKERS] [WIP] Zipfian distribution in pgbench)

2017-07-31 Thread Peter Geoghegan
Robert Haas wrote: On Thu, Jul 27, 2017 at 10:05 PM, Peter Geoghegan wrote: I really don't know if that would be worthwhile. It would certainly fix the regression shown in my test case, but that might not go far enough. I strongly suspect that there are more complicated workloads where LP_DEAD

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-07-31 Thread Tom Lane
Noah Misch writes: > On Sun, Jul 30, 2017 at 01:21:28AM -0400, Tom Lane wrote: >> Anyway, pending some news about compatibility of the MSVC scripts, >> I think we ought to adjust our docs to state that 5.8.3 is the >> minimum supported Perl version. > Works for me. Done. I have also reconfigure

Re: LP_DEAD hinting and not holding on to a buffer pin on leaf page (Was: [HACKERS] [WIP] Zipfian distribution in pgbench)

2017-07-31 Thread Robert Haas
On Thu, Jul 27, 2017 at 10:05 PM, Peter Geoghegan wrote: > I really don't know if that would be worthwhile. It would certainly fix > the regression shown in my test case, but that might not go far enough. > I strongly suspect that there are more complicated workloads where > LP_DEAD cleanup from S

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-07-31 Thread Alvaro Herrera
Robert Haas wrote: > An alternative approach is to have some kind of other identifier, > let's call it a distributed transaction ID (DXID) which is mapped by > each node onto a local XID. Postgres-XL seems to manage this problem by using a transaction manager node, which is in charge of assigning

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-31 Thread Mark Rofail
On Mon, Jul 31, 2017 at 5:18 PM, Alvaro Herrera wrote: > Tom Lane wrote: > > Alvaro Herrera writes: > > > ... However, when you create an index, you can > > > indicate which operator class to use, and it may not be the default > one. > > > If a different one is chosen at index creation time, th

Re: [HACKERS] Increase Vacuum ring buffer.

2017-07-31 Thread Sokolov Yura
On 2017-07-27 11:53, Sokolov Yura wrote: On 2017-07-26 20:28, Sokolov Yura wrote: On 2017-07-26 19:46, Claudio Freire wrote: On Wed, Jul 26, 2017 at 1:39 PM, Sokolov Yura wrote: On 2017-07-24 12:41, Sokolov Yura wrote: test_master_1/pretty.log ... time activity tps latency stddev

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-07-31 Thread Robert Haas
On Fri, Jul 28, 2017 at 10:14 AM, Michael Paquier wrote: > On Fri, Jul 28, 2017 at 7:28 AM, Masahiko Sawada > wrote: >> That also requires to share the same XID space with all remote nodes. > > You are putting your finger on the main bottleneck with global > consistency that XC and XL has becaus

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-31 Thread Christoph Berg
Re: Tom Lane 2017-07-31 <30582.1501508...@sss.pgh.pa.us> > Christoph Berg writes: > >>> The only interesting line in log/postmaster.log is a log_line_prefix-less > >>> Util.c: loadable library and perl binaries are mismatched (got handshake > >>> key 0xd500080, needed 0xd600080) > > Can we see t

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-07-31 Thread Robert Haas
On Thu, Jul 27, 2017 at 8:25 AM, Ashutosh Bapat wrote: > The remote transaction can be committed/aborted only after the fate of > the local transaction is decided. If we commit remote transaction and > abort local transaction, that's not good. AtEOXact* functions are > called immediately after tha

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-07-31 Thread Robert Haas
On Fri, Jul 28, 2017 at 10:35 AM, Andreas Joseph Krogh wrote: > I'm reading https://www.postgresql.org/docs/10/static/pgupgrade.html to try > to understand how to upgrade standby-servers using pg_upgrade with pg10. > > The text in step 10 sais: > "You will not be running pg_upgrade on the standby

[HACKERS] [GOSC' 17][Performance report] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-07-31 Thread Mengxing Liu
Hi, all. I wrote a performance report to conclude what I've done so far. https://docs.google.com/document/d/16A6rfJnQSTkd0SHK-2XzDiLj7aZ5nC189jGPcfVdhMQ/edit?usp=sharing Three patch are attached. I used the benchmark below to test the performance. https://github.com/liumx10/pg-bench It requires

Re: [HACKERS] Update comments in nodeModifyTable.c

2017-07-31 Thread Robert Haas
On Fri, Jul 28, 2017 at 8:12 AM, Etsuro Fujita wrote: > On 2017/07/26 22:39, Robert Haas wrote: >> So the first part of the change weakens the assertion that a 'ctid' or >> 'wholerow' attribute will always be present by saying that an FDW may >> instead have other attributes sufficient to identify

Re: [HACKERS] Persistent wait event sets and socket changes

2017-07-31 Thread Andres Freund
Hi Craig, On 2017-07-31 14:08:58 +0800, Craig Ringer wrote: > Hi all > > I've been looking into the wait event set interface added in 9.6 with an > eye to using it in an extension that maintains a set of non-blocking libpq > connections to other PostgreSQL instances. > > In the process I've been

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-31 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > ... However, when you create an index, you can > > indicate which operator class to use, and it may not be the default one. > > If a different one is chosen at index creation time, then a query using > > COUNT(distinct) will do the wrong thing, because

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-31 Thread Tom Lane
Christoph Berg writes: >>> The only interesting line in log/postmaster.log is a log_line_prefix-less >>> Util.c: loadable library and perl binaries are mismatched (got handshake >>> key 0xd500080, needed 0xd600080) Can we see the Perl-related output from configure, particularly the new lines abo

Re: [HACKERS] 10 beta docs: different replication solutions

2017-07-31 Thread Merlin Moncure
On Sun, Jul 30, 2017 at 8:34 PM, Steve Singer wrote: > > We don't seem to describe logical replication on > > https://www.postgresql.org/docs/10/static/different-replication-solutions.html > > The attached patch adds a section. This is a good catch. Two quick observations: 1) Super pedantic poi

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-07-31 Thread Peter Moser
On 06.04.2017 01:24, Andres Freund wrote: Unfortunately I don't think this patch has received sufficient design and implementation to consider merging it into v10. As code freeze is in two days, I think we'll have to move this to the next commitfest. We rebased our patch on top of commit 393d

Re: [HACKERS] Default Partition for Range

2017-07-31 Thread Beena Emerson
On Wed, Jul 26, 2017 at 7:05 PM, Jeevan Ladhe wrote: > Hi Beena, > > I have posted the rebased patches[1] for default list partition. > Your patch also needs a rebase. > > [1] > https://www.postgresql.org/message-id/CAOgcT0OVwDu%2BbeChWb5R5s6rfKLCiWcZT5617hqu7T3GdA1hAw%40mail.gmail.com > Thanks f

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-07-31 Thread Ashutosh Bapat
On Mon, Jul 31, 2017 at 8:32 AM, Robert Haas wrote: > On Fri, Jul 14, 2017 at 3:02 AM, Ashutosh Bapat > wrote: >> Here's revised patch set with only 0004 revised. That patch deals with >> creating multi-level inheritance hierarchy from multi-level partition >> hierarchy. The original logic of rec

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-07-31 Thread Heikki Linnakangas
On 07/31/2017 02:24 AM, Shay Rojansky wrote: Just to continue the above, I can confirm that adding a simple call to SSL_CTX_set_session_id_context() to be_tls_init() with some arbitrary const value fixes the error for me. Attached is a patch (ideally a test should be done for this, but that's bey

[HACKERS] Minor comment update in partition.c

2017-07-31 Thread Beena Emerson
The commit d363d42bb9a4399a0207bd3b371c966e22e06bd3 changed RangeDatumContent *content to PartitionRangeDatumKind *kind but a comment on function partition_rbound_cmp was left unedited and it still mentions content1 instead of kind1. PFA the patch to fix this. -- Beena Emerson EnterpriseDB: htt

Re: [HACKERS] PostgreSQL - Weak DH group

2017-07-31 Thread Heikki Linnakangas
On 07/13/2017 11:07 PM, Heikki Linnakangas wrote: On 07/13/2017 10:13 PM, Robert Haas wrote: On Thu, Jul 13, 2017 at 1:30 PM, Tom Lane wrote: Heikki Linnakangas writes: I don't think this can be backpatched. It changes the default DH parameters from 1024 bits to 2048 bits. That's a good thin

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Pavel Stehule
2017-07-31 11:09 GMT+02:00 Remi Colinet : > > > 2017-07-26 15:27 GMT+02:00 Robert Haas : > >> On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet >> wrote: >> > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), >> value, >> > unit FROM pg_progress(0,0); >> > pid | ppid | bid |

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-07-31 Thread Amit Langote
Thanks a lot Amit for looking at this and providing some useful pointers. On 2017/07/28 20:46, Amit Khandekar wrote: > On 28 July 2017 at 11:17, Amit Langote wrote: >> On 2017/07/26 16:58, Amit Langote wrote: >>> Rajkumar Raghuwanshi reported [1] on the "UPDATE partition key" thread >>> that whol

Re: [HACKERS] asynchronous execution

2017-07-31 Thread Kyotaro HORIGUCHI
At Fri, 28 Jul 2017 17:31:05 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170728.173105.238045591.horiguchi.kyot...@lab.ntt.co.jp> > Thank you for the comment. > > At Wed, 26 Jul 2017 17:16:43 -0400, Robert Haas wrote > in > > regression all the same. Every type of intermediat

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Remi Colinet
2017-07-26 16:24 GMT+02:00 Pavel Stehule : > > > 2017-07-26 15:27 GMT+02:00 Robert Haas : > >> On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet >> wrote: >> > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), >> value, >> > unit FROM pg_progress(0,0); >> > pid | ppid | bid |

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-07-31 Thread Remi Colinet
2017-07-26 15:27 GMT+02:00 Robert Haas : > On Wed, Jun 21, 2017 at 10:01 AM, Remi Colinet > wrote: > > test=# SELECT pid, ppid, bid, concat(repeat(' ', 3 * indent),name), > value, > > unit FROM pg_progress(0,0); > > pid | ppid | bid | concat | value | unit > > ---+--

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-31 Thread Christoph Berg
Re: Ashutosh Sharma 2017-07-31 > > The only interesting line in log/postmaster.log is a log_line_prefix-less > > Util.c: loadable library and perl binaries are mismatched (got handshake > > key 0xd500080, needed 0xd600080) > > ... which is unchanged from the beta2 output. > > > I am not able t