Re: [HACKERS] proposal psql \gdesc

2017-06-15 Thread Fabien COELHO
Hello Pavel, new update - rebase, changed message I did yet another rebase of your patch after Tom alphabetically ordered backslash commands. Here is the result. -- Fabien.diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index e6eba21..833460e 100644 --- a/doc/s

Re: [HACKERS] Why forcing Hot_standby_feedback to be enabled when creating a logical decoding slot on standby

2017-06-15 Thread sanyam jain
Isn't XLogRecord carries full information to be decoded in itself?If so a VACCUM should not be a problem in decoding? Thanks Sanyam Jain From: Michael Paquier Sent: Monday, June 12, 2017 6:52:06 AM To: sanyam jain Cc: Pg Hackers Subject: Re: [HACKERS] Why forci

Re: [HACKERS] GiST API Adancement

2017-06-15 Thread Andrew Borodin
Hi, Dong! 2017-06-15 21:19 GMT+05:00 Yuan Dong : > 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 that: > subtree is totally within the query. In this case, GiST scan can scan down > su

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 the >> default partition OID, if any. If the relcache does

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 z

[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 worked before, and the lack of prior complaints > >> says that not man

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 are having a problem with it. > That's fourtee

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 without complains, still

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 fixes it. > That's a good catch. All the other

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 >>> connecti

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 pg_c

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 > "/path/contains/upcasewords/an_ext.so" and failed. > > Af

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 >> just saw this on Markus Winand's Modern SQL blog: >>

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 o

[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 `SplitIdentifierStr

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 Drop

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 checkpoint) never archived.

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 that with explicit r

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 worry about the implicit casts you've added. They might cause problems. >>> >

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 f

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 in

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 pre

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 ). Interesting idea. Also in Pandas: ht

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 us

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 and

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 is

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 unders

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 11:55 AM, Jeff Janes > > > wrote: > > > >

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 see until each worker has attached >>> to and then detached from t

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. >> >> >> Given the cycle created between numeric->decimal and d

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 that failing > transaction

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 transaction with serialization or >> >> deadlock failure

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 transactions should be > >> ret

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 associated shm_mq. > Oh. That's sad. It definitely

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 > binarie

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 concur that this is a possibility, > > Actually,

[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 oug

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 the problem by inserting

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 my idea about row e

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 previously rejected. Shouldn't we a

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 accomplishe

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 >> reports. > > I think that's

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 go

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 like that: > https://www.postgresql.org/message-

[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 UID:2a6cc082-5202-11e7-978f-bfaa91f

[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 +++ b/doc/src/s

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 > parent, this means that the entry

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] an

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 very > user-friendly, it also won'

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 other occurrences in the bui

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 m

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 and it's only happening on Windo

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 happening in varstr_cmp() >> function and it's only hap

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 > Date: Mon Jun 12 23:29:44 2017 -0

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 standby servers" so I hav

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 function

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 D

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 seems like pg_get_publication_tables()

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 instance (or whatever > > pooler) pointing to s

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 heap_ope

[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 tradi

[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 t

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 = TRU

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 onl

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 client connects > to the poole

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 while

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 I recall, allowing i

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 need this extra parameter for backward comp

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 switc

[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, strea

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 d

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 > tenk1; > 2017-06-13 16:44

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 --- you'd still need pla

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 UPDATE/DELETE properly using > >> rewri

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 (which linux happily/h

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 where workers get launched, and that ain't

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 (and

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 publication "for all tables", \dRp+ doesn't indicate i

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 (although really? why aren't we skipping that if >>> EXEC_FLAG_

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 >> EXEC_FLAG_EXPLAIN_ONLY?), ... > Uh, because ANALYZE was used? ...

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 parallel workers. So that particular theory >>> doesn't hold water.

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 any chance that it's already trying to launch

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 > originally interested in

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: http://www.p

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 >>> worker reaches the dsm_attach() call, it w

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 it (see message > here [1] and

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(), > if the collation prov

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 i

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 the segment, and the

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 how could that happen? > Well, as Amit poi

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, mean that dsm_attach

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 rem

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 client like > pgbouncer for connection pool

  1   2   >