Re: [HACKERS] Adding support for Default partition in partitioning

2017-06-15 Thread Ashutosh Bapat
On Fri, Jun 16, 2017 at 12:48 AM, Robert Haas wrote: > On Thu, Jun 15, 2017 at 12:54 PM, Ashutosh Bapat > wrote: >> Some more comments on the latest set of patches. >> >> In heap_drop_with_catalog(), we heap_open() the parent table to get

Re: [HACKERS] PATCH: Don't downcase filepath/filename while loading libraries

2017-06-15 Thread QL Zhuo
"That's fourteen years without complains", so maybe not to back-patch is good choice, until someone complains this :) And, the attached new patch fixes the memory leaks. -- This email address (zhuo.devgmail.com) is only for development affairs, e.g. mail list, please mail to zhuohexoasis.com or

[HACKERS] PATCH: Don't downcase filepath/filename while loading libraries

2017-06-15 Thread David G. Johnston
On Thursday, June 15, 2017, Tom Lane wrote: > Michael Paquier writes: > > On Fri, Jun 16, 2017 at 1:01 PM, Tom Lane wrote: > >> (2) My inclination would be not to back-patch. This change could break > >> configurations that

Re: [HACKERS] PATCH: Don't downcase filepath/filename while loading libraries

2017-06-15 Thread Tom Lane
Michael Paquier writes: > On Fri, Jun 16, 2017 at 1:01 PM, Tom Lane wrote: >> (2) My inclination would be not to back-patch. This change could break >> configurations that worked before, and the lack of prior complaints >> says that not many people

Re: [HACKERS] PATCH: Don't downcase filepath/filename while loading libraries

2017-06-15 Thread Michael Paquier
On Fri, Jun 16, 2017 at 1:01 PM, Tom Lane wrote: > (2) My inclination would be not to back-patch. This change could break > configurations that worked before, and the lack of prior complaints > says that not many people are having a problem with it. That's fourteen years

Re: [HACKERS] PATCH: Don't downcase filepath/filename while loading libraries

2017-06-15 Thread Tom Lane
Michael Paquier writes: > On Fri, Jun 16, 2017 at 11:04 AM, QL Zhuo wrote: >> After few digging, I found there's a wrong use of `SplitIdentifierString` in >> function `load_libraries` in /src/backend/utils/init/miscinit.c, and the >> attached patch

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-15 Thread Peter Eisentraut
On 6/13/17 15:49, Peter Eisentraut wrote: > On 6/13/17 02:33, Noah Misch wrote: >>> Steps to reproduce - >>> X cluster -> create 100 tables , publish all tables (create publication pub >>> for all tables); >>> Y Cluster -> create 100 tables ,create subscription(create subscription sub >>>

Re: [HACKERS] Something is rotten in publication drop

2017-06-15 Thread Peter Eisentraut
On 6/15/17 12:23, Tom Lane wrote: > It strikes me that you could rewrite psql's query to just do its own > catalog search and not bother with the function at all. It would have > to know a bit more about the catalog structure than it does now, but not > that much: > > select pub.pubname from

Re: [HACKERS] PATCH: Don't downcase filepath/filename while loading libraries

2017-06-15 Thread Michael Paquier
On Fri, Jun 16, 2017 at 11:04 AM, QL Zhuo wrote: > I just put this line in my postgresql.conf: > > ``` > shared_preload_libraries = '/Path/Contains/UpCaseWords/an_ext.so' > ``` > > Then the server couldn't start. It tried to load the file >

Re: [HACKERS] Decimal64 and Decimal128

2017-06-15 Thread Thomas Munro
On Fri, Jun 16, 2017 at 1:24 PM, Craig Ringer wrote: > On 16 June 2017 at 05:42, Thomas Munro wrote: >> Bumping this ancient thread to say that DECFLOAT appears to have >> landed in the SQL standard. I haven't looked at SQL:2016 myself by I

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Tatsuo Ishii
> Yeah, I guess we will just have to wait to see it since other people are > excited about it. My concern is code complexity and usability > challenges, vs punting the problem to the operating system, though > admittedly there are some cases where that is not possible. Oracle sells this feature

[HACKERS] PATCH: Don't downcase filepath/filename while loading libraries

2017-06-15 Thread QL Zhuo
I just put this line in my postgresql.conf: ``` shared_preload_libraries = '/Path/Contains/UpCaseWords/an_ext.so' ``` Then the server couldn't start. It tried to load the file "/path/contains/upcasewords/an_ext.so" and failed. After few digging, I found there's a wrong use of

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-15 Thread Peter Eisentraut
On 6/15/17 12:22, Petr Jelinek wrote: > On 15/06/17 17:53, Peter Eisentraut wrote: >> On 6/14/17 18:35, Petr Jelinek wrote: >>> Attached fixes it (it was mostly about order of calls). >> So do I understand this right that the actual fix is just moving up the >> logicalrep_worker_stop() call in

Re: [HACKERS] Broken hint bits (freeze)

2017-06-15 Thread Sergey Burladyan
Bruce Momjian writes: > ! against the old primary and standby clusters. Verify that the > ! Latest checkpoint location values match in all clusters. For "Log-Shipping only" standby server this cannot be satisfied, because last WAL from master (with shutdown

Re: [HACKERS] logical replication read-only slave

2017-06-15 Thread Craig Ringer
On 15 June 2017 at 23:12, Maeldron T. wrote: > I could send an explicit command for each session to make it read-only > I could use a read-only role (let’s ignore now I don’t use rules) You can also set the GUC default_transaction_read_only = on. But apps can easily clobber

Re: [HACKERS] Decimal64 and Decimal128

2017-06-15 Thread Craig Ringer
On 16 June 2017 at 05:42, Thomas Munro wrote: > On Fri, Sep 25, 2015 at 5:06 PM, Pavel Stehule > wrote: >> 2015-09-25 0:25 GMT+02:00 Jim Nasby : >>> >>> On 9/24/15 3:35 PM, Peter Geoghegan wrote: I would

Re: [HACKERS] Huge pages support on Windows

2017-06-15 Thread Tsunakawa, Takayuki
Hello, Andrea From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Andrea caldarone > Anyone can point me in the right direction? Thank you for your interest. 1. Download the PostgreSQL 10 source code (which is still in development), which is the

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Bruce Momjian
On Thu, Jun 15, 2017 at 04:56:36PM -0700, Andres Freund wrote: > On 2017-06-15 19:44:43 -0400, Bruce Momjian wrote: > > Understood, but now you are promoting a feature with an admittedly-poor > > API, duplication of an OS feature, and perhaps an invasive change to the > > code. > > *Perhaps* an

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Andres Freund
On 2017-06-15 19:44:43 -0400, Bruce Momjian wrote: > Understood, but now you are promoting a feature with an admittedly-poor > API, duplication of an OS feature, and perhaps an invasive change to the > code. *Perhaps* an invasive change to the code? To me it's pretty evident that this'll be a

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Bruce Momjian
On Thu, Jun 15, 2017 at 07:51:36PM -0400, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Thu, Jun 15, 2017 at 07:27:55PM -0400, Stephen Frost wrote: > > > I expect the same would happen with the shell-command approach suggested > > > up-thread and the prompt-on-stdin approach too, they aren't

Re: [HACKERS] ASOF join

2017-06-15 Thread Thomas Munro
On Fri, Jun 16, 2017 at 4:20 AM, Konstantin Knizhnik wrote: > I wonder if there were some discussion/attempts to add ASOF join to Postgres > (sorry, may be there is better term for it, I am refereeing KDB definition: > http://code.kx.com/wiki/Reference/aj ).

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > On Thu, Jun 15, 2017 at 07:27:55PM -0400, Stephen Frost wrote: > > I expect the same would happen with the shell-command approach suggested > > up-thread and the prompt-on-stdin approach too, they aren't great but I > > expect users would still

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Alvaro Herrera
Bruce Momjian wrote: > On Thu, Jun 15, 2017 at 07:27:55PM -0400, Stephen Frost wrote: > > I expect the same would happen with the shell-command approach suggested > > up-thread and the prompt-on-stdin approach too, they aren't great but I > > expect users would still use the feature. As Robert

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Bruce Momjian
On Thu, Jun 15, 2017 at 07:27:55PM -0400, Stephen Frost wrote: > I expect the same would happen with the shell-command approach suggested > up-thread and the prompt-on-stdin approach too, they aren't great but I > expect users would still use the feature. As Robert and I have > mentioned, there

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > On Thu, Jun 15, 2017 at 06:41:08PM -0400, Stephen Frost wrote: > > > > > One serious difference between in-database-encryption and SSH keys is > > > > > that the use of passwords for SSH is well understood and reasonable to > > > > > use, while I

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Bruce Momjian
On Thu, Jun 15, 2017 at 06:41:08PM -0400, Stephen Frost wrote: > > > > One serious difference between in-database-encryption and SSH keys is > > > > that the use of passwords for SSH is well understood and reasonable to > > > > use, while I think we all admit that use of passwords for database > >

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > On Thu, Jun 15, 2017 at 05:04:17PM -0400, Robert Haas wrote: > > > Also, there is the sense that security requires > > > trust of the root user, while using Postgres doesn't require the root > > > user to also use Postgres. > > > > I don't

Re: [HACKERS] subscription worker signalling wal writer too much

2017-06-15 Thread Jeff Janes
On Wed, Jun 14, 2017 at 4:29 PM, Andres Freund wrote: > On 2017-06-14 16:24:27 -0700, Jeff Janes wrote: > > On Wed, Jun 14, 2017 at 3:20 PM, Andres Freund > wrote: > > > > > On 2017-06-14 15:08:49 -0700, Jeff Janes wrote: > > > > On Wed, Jun 14, 2017 at

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 5:16 PM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Jun 15, 2017 at 5:06 PM, Tom Lane wrote: >>> ... nodeGather cannot deem the query done until it's seen EOF on >>> each tuple queue, which it cannot

Re: [HACKERS] Decimal64 and Decimal128

2017-06-15 Thread Thomas Munro
On Fri, Sep 25, 2015 at 5:06 PM, Pavel Stehule wrote: > 2015-09-25 0:25 GMT+02:00 Jim Nasby : >> >> On 9/24/15 3:35 PM, Peter Geoghegan wrote: >>> >>> I would worry about the implicit casts you've added. They might cause >>> problems. >> >> >>

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-06-15 Thread Kevin Grittner
On Thu, Jun 15, 2017 at 4:18 PM, Alvaro Herrera wrote: > Kevin Grittner wrote: > As far as I understand her proposal, it is exactly the opposite -- if a > transaction fails, it is discarded. And this P.S. note is asking > whether this is a good idea, or would we prefer

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-06-15 Thread Thomas Munro
On Fri, Jun 16, 2017 at 9:18 AM, Alvaro Herrera wrote: > Kevin Grittner wrote: >> On Thu, Jun 15, 2017 at 2:16 PM, Andres Freund wrote: >> > On 2017-06-14 11:48:25 +0300, Marina Polyakova wrote: > >> >> P.S. Does this use case (do not retry

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-06-15 Thread Alvaro Herrera
Kevin Grittner wrote: > On Thu, Jun 15, 2017 at 2:16 PM, Andres Freund wrote: > > On 2017-06-14 11:48:25 +0300, Marina Polyakova wrote: > >> P.S. Does this use case (do not retry transaction with serialization or > >> deadlock failure) is most interesting or failed

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 15, 2017 at 5:06 PM, Tom Lane wrote: >> ... nodeGather cannot deem the query done until it's seen EOF on >> each tuple queue, which it cannot see until each worker has attached >> to and then detached from the

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Bruce Momjian
On Thu, Jun 15, 2017 at 05:04:17PM -0400, Robert Haas wrote: > > Also, there is the sense that security requires > > trust of the root user, while using Postgres doesn't require the root > > user to also use Postgres. > > I don't understand this. It is certainly true that you're running >

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 5:06 PM, Tom Lane wrote: > I wrote: >> Robert Haas writes: >>> I think you're right. So here's a theory: > >>> 1. The ERROR mapping the DSM segment is just a case of the worker the >>> losing a race, and isn't a bug. > >> I

[HACKERS] pg_waldump command line arguments

2017-06-15 Thread Robert Haas
pg_waldump --help claims that you run it like this: Usage: pg_waldump [OPTION]... [STARTSEG [ENDSEG]] And https://www.postgresql.org/docs/10/static/pgwaldump.html agrees. Since square brackets indicate optional arguments, this sort of makes it sound like running pg_waldump with no arguments

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Tom Lane
I wrote: > Robert Haas writes: >> I think you're right. So here's a theory: >> 1. The ERROR mapping the DSM segment is just a case of the worker the >> losing a race, and isn't a bug. > I concur that this is a possibility, Actually, no, it isn't. I tried to reproduce

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 4:29 PM, Bruce Momjian wrote: > I think the big win for having OS features in the database is > selectivity --- the ability to selectively apply a feature to part of > the database. This is what you are doing by putting a password on your > SSH key, and

Re: [HACKERS] Detection of IPC::Run presence in SSL TAP tests

2017-06-15 Thread Tom Lane
Peter Eisentraut writes: > On 6/15/17 15:57, Tom Lane wrote: >> Pushed, thanks. I grabbed the very latest copy of ax_prog_perl_modules >> out of the GNU archives --- it's only cosmetically different, but we >> might as well be au courant. > Um, this patch was

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Bruce Momjian
On Thu, Jun 15, 2017 at 03:09:32PM -0400, Robert Haas wrote: > To be honest, I find the hostility toward this feature a bit baffling. > The argument seems to be essentially that we shouldn't have this > feature because we'd have to maintain the code and many of the same > goals could be

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-06-15 Thread Kevin Grittner
On Thu, Jun 15, 2017 at 2:16 PM, Andres Freund wrote: > On 2017-06-14 11:48:25 +0300, Marina Polyakova wrote: >> I suggest a patch where pgbench client sessions are not disconnected because >> of serialization or deadlock failures and these failures are mentioned in >>

Re: [HACKERS] Detection of IPC::Run presence in SSL TAP tests

2017-06-15 Thread Peter Eisentraut
On 6/15/17 15:57, Tom Lane wrote: > Pushed, thanks. I grabbed the very latest copy of ax_prog_perl_modules > out of the GNU archives --- it's only cosmetically different, but we > might as well be au courant. Um, this patch was previously rejected. Shouldn't we at least discuss it, or have it

Re: [HACKERS] Detection of IPC::Run presence in SSL TAP tests

2017-06-15 Thread Tom Lane
Michael Paquier writes: > On Tue, Jun 13, 2017 at 11:14 PM, Tom Lane wrote: >> I'd vote for removing this and adding a configure-time check that >> insists on IPC::Run when --enable-tap-tests is given. > There was a patch last year to do something

[HACKERS] Приглашение: Re: [HACKERS] intermittent failures in Cygwin from select... - пт, 16 июнь 2017 09:00 - 10:00 (MSK) (pgsql-hackers@postgresql.org)

2017-06-15 Thread Vladimir Sitnikov
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20170616T06Z DTEND:20170616T07Z DTSTAMP:20170615T193848Z ORGANIZER;CN=Vladimir Sitnikov:mailto:sitnikov.vladi...@gmail.com

[HACKERS] Typo in CREATE SUBSCRIPTION documentation

2017-06-15 Thread Julien Rouhaud
Hi, I just found $SUBJECT, patch attached. -- Julien Rouhaud http://dalibo.com - http://dalibo.org diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 77bf87681b..3ca06fb3c3 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++

Re: [HACKERS] Adding support for Default partition in partitioning

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 12:54 PM, Ashutosh Bapat wrote: > Some more comments on the latest set of patches. > > In heap_drop_with_catalog(), we heap_open() the parent table to get the > default partition OID, if any. If the relcache doesn't have an entry for the >

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-06-15 Thread Andres Freund
Hi, On 2017-06-14 11:48:25 +0300, Marina Polyakova wrote: > Now in pgbench we can test only transactions with Read Committed isolation > level because client sessions are disconnected forever on serialization > failures. There were some proposals and discussions about it (see message > here [1]

Re: [HACKERS] pgbench tap tests & minor fixes

2017-06-15 Thread Fabien COELHO
As for me, I would do expr_scanner_chomp_substring(PsqlScanState, int, int&); that changes end_offset as desired... Why not. And use it instead of end_offset = expr_scanner_offset(sstate) - 1; I removed these? The second issue: you are removing all trailing \n and \r. I think you should

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 12:06 PM, Peter Eisentraut wrote: > Making this work well would be a major part of the usability story that > this is being sold on. If the proposed solution is that you can cobble > together a few bits of shell, then not only is that not

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Tom Lane
Robert Haas writes: > I think you're right. So here's a theory: > 1. The ERROR mapping the DSM segment is just a case of the worker the > losing a race, and isn't a bug. I concur that this is a possibility, but if we expect this to happen, seems like there should be

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-15 Thread Petr Jelinek
On 15/06/17 18:36, Peter Eisentraut wrote: > On 6/15/17 12:22, Petr Jelinek wrote: >> On 15/06/17 17:53, Peter Eisentraut wrote: >>> On 6/14/17 18:35, Petr Jelinek wrote: Attached fixes it (it was mostly about order of calls). >>> >>> So do I understand this right that the actual fix is just

Re: [HACKERS] Getting server crash on Windows when using ICU collation

2017-06-15 Thread Ashutosh Sharma
Hi, On Thu, Jun 15, 2017 at 8:36 PM, Peter Eisentraut wrote: > On 6/12/17 00:38, Ashutosh Sharma wrote: >> PFA patch that fixes the issue described in above thread. As mentioned >> in the above thread, the crash is basically happening in varstr_cmp() >> function

Re: [HACKERS] Getting server crash on Windows when using ICU collation

2017-06-15 Thread Ashutosh Sharma
Hi, On Thu, Jun 15, 2017 at 7:43 PM, Amit Kapila wrote: > On Mon, Jun 12, 2017 at 10:08 AM, Ashutosh Sharma > wrote: >> PFA patch that fixes the issue described in above thread. As mentioned >> in the above thread, the crash is basically

Re: [HACKERS] UPDATE of partition key

2017-06-15 Thread Amit Khandekar
On 13 June 2017 at 15:40, Amit Khandekar wrote: > While rebasing my patch for the below recent commit, I realized that a > similar issue exists for the uptate-tuple-routing patch as well : > > commit 78a030a441966d91bc7e932ef84da39c3ea7d970 > Author: Tom Lane

Re: [HACKERS] Broken hint bits (freeze)

2017-06-15 Thread Bruce Momjian
On Thu, Jun 15, 2017 at 03:00:18PM +0530, Amit Kapila wrote: > On Wed, Jun 14, 2017 at 8:44 PM, Bruce Momjian wrote: > > On Wed, Jun 14, 2017 at 07:45:17PM +0530, Amit Kapila wrote: > >> > Now, it seems we later added a doc section early on that talks about > >> > "Verify

Re: [HACKERS] Shortened URLs for commit messages

2017-06-15 Thread Bruce Momjian
On Tue, May 23, 2017 at 11:25:07PM -0400, Bruce Momjian wrote: > I have written the following sed script to convert regular Postgres > email message URLs to their shorter form for commit messages: > > sed > 's;http\(s\?\)://www\.postgresql\.org/message-id/;http\1://postgr.es/m/;gi' > > in case

Re: [HACKERS] Adding support for Default partition in partitioning

2017-06-15 Thread Ashutosh Bapat
Some more comments on the latest set of patches. In heap_drop_with_catalog(), we heap_open() the parent table to get the default partition OID, if any. If the relcache doesn't have an entry for the parent, this means that the entry will be created, only to be invalidated at the end of the

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-15 Thread Peter Eisentraut
On 6/15/17 12:22, Petr Jelinek wrote: > On 15/06/17 17:53, Peter Eisentraut wrote: >> On 6/14/17 18:35, Petr Jelinek wrote: >>> Attached fixes it (it was mostly about order of calls). >> >> So do I understand this right that the actual fix is just moving up the >> logicalrep_worker_stop() call in

Re: [HACKERS] Something is rotten in publication drop

2017-06-15 Thread Tom Lane
Peter Eisentraut writes: > On 6/9/17 11:45, Tom Lane wrote: >> What we've done in many comparable situations is to allow a >> catalog-probing function to return NULL instead of failing >> when handed an OID or other identifier that it can't locate. >> Here it

Re: [HACKERS] Making server name part of the startup message

2017-06-15 Thread Magnus Hagander
On Thu, Jun 15, 2017 at 5:57 PM, Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> This makes no sense at all. The client is telling the server what the > >> server's name is? > > > I think for instance you could have one pgbouncer

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-15 Thread Petr Jelinek
On 15/06/17 17:53, Peter Eisentraut wrote: > On 6/14/17 18:35, Petr Jelinek wrote: >> Attached fixes it (it was mostly about order of calls). > > So do I understand this right that the actual fix is just moving up the > logicalrep_worker_stop() call in DropSubscription(). > No the fix is

[HACKERS] ASOF join

2017-06-15 Thread Konstantin Knizhnik
I wonder if there were some discussion/attempts to add ASOF join to Postgres (sorry, may be there is better term for it, I am refereeing KDB definition: http://code.kx.com/wiki/Reference/aj ). Such kind of join can be useful when we need to associate two timeseries. It is quite popular in

[HACKERS] GiST API Adancement

2017-06-15 Thread Yuan Dong
Hi hackers, I want to hack a little. I applied for GSoC project (https://wiki.postgresql.org/wiki/GSoC_2017#GiST_API_advancement), but now I'm going to hack on my own. With the help of Andrew Borodin, I want to start the project with adding a third state to collision check. The third state is

Re: [HACKERS] Something is rotten in publication drop

2017-06-15 Thread Peter Eisentraut
On 6/9/17 11:45, Tom Lane wrote: > What we've done in many comparable situations is to allow a > catalog-probing function to return NULL instead of failing > when handed an OID or other identifier that it can't locate. > Here it seems like pg_get_publication_tables() needs to use > missing_ok =

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Peter Eisentraut
On 6/14/17 17:41, Stephen Frost wrote: >> Relying on environment variables is clearly pretty crappy. So if that's >> the proposal, then I think it needs to be better. > I don't believe that was ever intended to be the final solution, I was > just pointing out that it's what the WIP patch did. >

[HACKERS] Huge pages support on Windows

2017-06-15 Thread Andrea caldarone
Hi all, First of all bear with me since I'm new in PostgreSQL world, I'm SQL Server DBA with 20yrs experience. I've seen the thread started by Tsunakawa Takayuki about huge pages support on windows and his version of pg_ctl.c in commit fest. I see no information anywhere about how to recompile

Re: [HACKERS] Making server name part of the startup message

2017-06-15 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> This makes no sense at all. The client is telling the server what the >> server's name is? > I think for instance you could have one pgbouncer instance (or whatever > pooler) pointing to several different servers. So the

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-15 Thread Peter Eisentraut
On 6/14/17 18:35, Petr Jelinek wrote: > Attached fixes it (it was mostly about order of calls). So do I understand this right that the actual fix is just moving up the logicalrep_worker_stop() call in DropSubscription(). > I also split the > SetSubscriptionRelState into 2 separate interface

Re: [HACKERS] WIP: Data at rest encryption

2017-06-15 Thread Robert Haas
On Wed, Jun 14, 2017 at 5:41 PM, Stephen Frost wrote: > I don't believe that was ever intended to be the final solution, I was > just pointing out that it's what the WIP patch did. > > The discussion had moved into having a command called which provided the > key on stdout, as

Re: [HACKERS] Misnaming of staext_dependencies_load

2017-06-15 Thread Alvaro Herrera
Kyotaro HORIGUCHI wrote: > Hello. > > It is annoying that only staext_dependencies_load is prefixed > with "staext" (two t's) among several similar names prefixed by > "statext"(three t's). > > Should we rename it to have the same prefix? Sure. Pushed, thanks. -- Álvaro Herrera

Re: [HACKERS] Making server name part of the startup message

2017-06-15 Thread Alvaro Herrera
Tom Lane wrote: > Satyanarayana Narlapuram writes: > > Change the Postgres wire protocol to include server name in the startup > > message. This field can be an optional field driven by the connection > > parameters for psql (-N, --servername). > > We

Re: [HACKERS] logical replication read-only slave

2017-06-15 Thread Peter Eisentraut
On 6/15/17 11:12, Maeldron T. wrote: > However, it provides me a safety net that I could not execute writes on > the slave by accident. Not only I couldn’t do it, I would also receive a > notification from the software about the attempt as it would throw an > exception. > > Let’s say I would

[HACKERS] logical replication read-only slave

2017-06-15 Thread Maeldron T.
Hello, I played around a bit with the logical replication in 10.0 beta 1. My first question was: is it possible to set the "slave" server to run in (almost) read-only mode? The current setup is the following: There is a Rails application running on multiple servers Two PostgreSQL servers,

Re: [HACKERS] Getting server crash on Windows when using ICU collation

2017-06-15 Thread Peter Eisentraut
On 6/12/17 00:38, Ashutosh Sharma wrote: > PFA patch that fixes the issue described in above thread. As mentioned > in the above thread, the crash is basically happening in varstr_cmp() > function and it's only happening on Windows because in varstr_cmp(), > if the collation provider is ICU, we

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 10:21 AM, Amit Kapila wrote: > Yes, I think it is for next query. If you refer the log below from lorikeet: > > 2017-06-13 16:44:57.179 EDT [59404ec6.2758:63] LOG: statement: > EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM >

Re: [HACKERS] memory fields from getrusage()

2017-06-15 Thread Tom Lane
Justin Pryzby writes: > Comments ? I was wondering whether it'd be better to drive this off of configure probes for the existence of the struct fields. However, in view of the same fields having different contents on some platforms, such a probe wouldn't really help much

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-06-15 Thread Ildus Kurbangaliev
On Mon, 5 Jun 2017 17:25:27 +0900 Etsuro Fujita wrote: > On 2017/06/02 18:10, Etsuro Fujita wrote: > > On 2017/05/16 21:36, Etsuro Fujita wrote: > >> One approach I came up with to fix this issue is to rewrite the > >> targetList entries of an inherited

Re: [HACKERS] memory fields from getrusage()

2017-06-15 Thread Justin Pryzby
On Thu, Jun 15, 2017 at 10:29:21AM -0400, Robert Haas wrote: > On Wed, Jun 14, 2017 at 6:28 PM, Justin Pryzby wrote: > > On Tue, Jun 13, 2017 at 12:16:00PM -0400, Robert Haas wrote: > >> It might be worth adding platform-specific code for common platforms. > > > > All I care

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 15, 2017 at 10:38 AM, Tom Lane wrote: >> ... er, -ENOCAFFEINE. Nonetheless, there are no checks of >> EXEC_FLAG_EXPLAIN_ONLY in any parallel-query code, so I think >> a bet is being missed somewhere. > ExecGather() is

Re: [HACKERS] Refreshing subscription relation state inside a transaction block

2017-06-15 Thread Petr Jelinek
On 15/06/17 15:52, Peter Eisentraut wrote: > On 6/15/17 02:41, Petr Jelinek wrote: >> Hmm, forcibly stopping currently running table sync is not what was >> intended, I'll have to look into it. We should not be forcibly stopping >> anything except the main apply worker during drop subscription

Re: [HACKERS] logical replication: \dRp+ and "for all tables"

2017-06-15 Thread Peter Eisentraut
On 6/10/17 02:02, Jeff Janes wrote: > On Fri, Jun 9, 2017 at 10:20 PM, Masahiko Sawada > wrote: > > On Sat, Jun 10, 2017 at 7:29 AM, Jeff Janes > wrote: > > If I create a

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 10:38 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Jun 15, 2017 at 10:32 AM, Tom Lane wrote: >>> It's fairly hard to read this other than as telling us that the worker was >>> launched for the EXPLAIN

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 15, 2017 at 10:32 AM, Tom Lane wrote: >> It's fairly hard to read this other than as telling us that the worker was >> launched for the EXPLAIN (although really? why aren't we skipping that if >>

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 10:32 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Jun 15, 2017 at 10:05 AM, Tom Lane wrote: >>> But we know, from the subsequent failed assertion, that the leader was >>> still trying to launch

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 15, 2017 at 10:05 AM, Tom Lane wrote: >> But we know, from the subsequent failed assertion, that the leader was >> still trying to launch parallel workers. So that particular theory >> doesn't hold water. > Is there

Re: [HACKERS] memory fields from getrusage()

2017-06-15 Thread Robert Haas
On Wed, Jun 14, 2017 at 6:28 PM, Justin Pryzby wrote: > On Tue, Jun 13, 2017 at 12:16:00PM -0400, Robert Haas wrote: >> It might be worth adding platform-specific code for common platforms. > > All I care (which linux happily/happens to support) is maxrss; I was probably >

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-06-15 Thread Marina Polyakova
Sounds like a good idea. Thank you! Please add to the next CommitFest Done: https://commitfest.postgresql.org/14/1170/ and review somebody else's patch in exchange for having your own patch reviewed. Of course, I remember about it. -- Marina Polyakova Postgres Professional:

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Amit Kapila
On Thu, Jun 15, 2017 at 7:42 PM, Robert Haas wrote: > On Thu, Jun 15, 2017 at 10:05 AM, Tom Lane wrote: >>> Well, as Amit points out, there are entirely legitimate ways for that >>> to happen. If the leader finishes the whole query itself before the

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-06-15 Thread Robert Haas
On Wed, Jun 14, 2017 at 4:48 AM, Marina Polyakova wrote: > Now in pgbench we can test only transactions with Read Committed isolation > level because client sessions are disconnected forever on serialization > failures. There were some proposals and discussions about

Re: [HACKERS] Getting server crash on Windows when using ICU collation

2017-06-15 Thread Amit Kapila
On Mon, Jun 12, 2017 at 10:08 AM, Ashutosh Sharma wrote: > PFA patch that fixes the issue described in above thread. As mentioned > in the above thread, the crash is basically happening in varstr_cmp() > function and it's only happening on Windows because in varstr_cmp(),

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-06-15 Thread Daniel Verite
Andres Freund wrote: > Since it's an application writer's choice whether to use it, > it seems to make not that much sense to have a > serverside guc - it can't really be sensible set. The application writers who are concerned by this wouldn't know that they have a choice. If there were

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Robert Haas
On Thu, Jun 15, 2017 at 10:05 AM, Tom Lane wrote: >> Well, as Amit points out, there are entirely legitimate ways for that >> to happen. If the leader finishes the whole query itself before the >> worker reaches the dsm_attach() call, it will call dsm_detach(), >> destroying

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Tom Lane
Robert Haas writes: > On Wed, Jun 14, 2017 at 6:01 PM, Tom Lane wrote: >> The lack of any other message before the 'could not map' failure must, >> then, mean that dsm_attach() couldn't find an entry in shared memory >> that it wanted to attach to. But

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Robert Haas
On Wed, Jun 14, 2017 at 6:01 PM, Tom Lane wrote: > I wrote: >> But surely the silent treatment should only apply to DSM_OP_CREATE? > > Oh ... scratch that, it *does* only apply to DSM_OP_CREATE. > > The lack of any other message before the 'could not map' failure must, > then,

Re: [HACKERS] Refreshing subscription relation state inside a transaction block

2017-06-15 Thread Peter Eisentraut
On 6/15/17 02:41, Petr Jelinek wrote: > Hmm, forcibly stopping currently running table sync is not what was > intended, I'll have to look into it. We should not be forcibly stopping > anything except the main apply worker during drop subscription (and we > do that only because we can't drop the

Re: [HACKERS] Adding connection id in the startup message

2017-06-15 Thread Tom Lane
Satyanarayana Narlapuram writes: > As a cloud service, Azure Database for PostgreSQL uses a gateway proxy to > route connections to a node hosting the actual server. Potentially there > could be multiple hops (for example client, optional proxy at the

Re: [HACKERS] Typo in comment in ecpg datetime.c

2017-06-15 Thread Peter Eisentraut
On 6/15/17 04:54, Daniel Gustafsson wrote: > Spotted s/fiedls/fields/ in src/interfaces/ecpg/pgtypeslib/datetime.c per the > attached patch. fixed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

Re: [HACKERS] Making server name part of the startup message

2017-06-15 Thread Peter Eisentraut
On 6/15/17 03:20, Satyanarayana Narlapuram wrote: > As a cloud service, Azure Database for PostgreSQL uses a gateway proxy > to route connections to a node hosting the actual server. To do that, > the proxy needs to know the name of the server it tries to locate. As a > work-around we currently

Re: [HACKERS] Making server name part of the startup message

2017-06-15 Thread Tom Lane
Satyanarayana Narlapuram writes: > As a cloud service, Azure Database for PostgreSQL uses a gateway proxy to > route connections to a node hosting the actual server. To do that, the proxy > needs to know the name of the server it tries to locate. As a

  1   2   >