Re: [HACKERS] [GSOC] [Weekly report 2] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-06-15 Thread Heikki Linnakangas
On 06/15/2017 08:51 AM, Mengxing Liu wrote: My design is as follow: For hash table, key is the pointer of SerializableXact; Value is the RWConflictData object. Hashcode is generated based on the SerializableXact pointer. So, given a SerializableXact, we can quickly find if it is conflict with

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

2017-06-15 Thread Petr Jelinek
On 13/06/17 18:33, Masahiko Sawada wrote: > On Wed, Jun 14, 2017 at 1:02 AM, Masahiko Sawada > wrote: >> On Tue, Jun 13, 2017 at 4:53 PM, Petr Jelinek >> wrote: >>> On 13/06/17 09:06, Masahiko Sawada wrote: Hi, The commit

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

2017-06-15 Thread Ashutosh Bapat
On Thu, Jun 15, 2017 at 10:46 AM, Amit Langote wrote: > Thanks for taking a look. > > On 2017/06/14 20:06, Ashutosh Bapat wrote: >> On Wed, Jun 14, 2017 at 9:20 AM, Amit Langote >> wrote: >>> >>> By the way, I mentioned an existing

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

2017-06-15 Thread Amit Langote
Thanks for the review. On 2017/06/15 16:08, Ashutosh Bapat wrote: > On Thu, Jun 15, 2017 at 10:46 AM, Amit Langote wrote: >> If we end up having to perform the validation scan and the table being >> attached is a partitioned table, we will scan its leaf partitions. Each >> of those leaf

[HACKERS] Missing comment for create_modifytable_path

2017-06-15 Thread Etsuro Fujita
While working on adding support for tuple routing for foreign partitions, I noticed that in create_modifytable_path, we forgot to add a comment on its new argument 'partitioned_rels'. Attached a patch for including that in the comments for that function. Best regards, Etsuro Fujita diff

Re: [HACKERS] Broken hint bits (freeze)

2017-06-15 Thread Amit Kapila
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 have moved the wal_level section into that >> >

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-06-15 Thread Simon Riggs
On 15 June 2017 at 02:59, Noah Misch wrote: > Formally, the causative commit is the one that removed the superuser() test, > namely 25fff40. > > [Action required within three days. This is a generic notification.] > > The above-described topic is currently a PostgreSQL 10

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

2017-06-15 Thread Ashutosh Bapat
On Thu, Jun 15, 2017 at 2:12 PM, Amit Langote wrote: > Thanks for the review. > > On 2017/06/15 16:08, Ashutosh Bapat wrote: >> On Thu, Jun 15, 2017 at 10:46 AM, Amit Langote wrote: >>> If we end up having to perform the validation scan and the table being >>>

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

2017-06-15 Thread Amit Langote
On 2017/06/15 17:53, Ashutosh Bapat wrote: > On Thu, Jun 15, 2017 at 2:12 PM, Amit Langote wrote: >>> Both of the above comments are not related to the bug that is being fixed, >>> but >>> they apply to the same code where the bug exists. So instead of fixing it >>> twice, may be we should expand

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

2017-06-15 Thread Amit Langote
Oops, I meant to send one more comment. On 2017/06/15 15:48, Amit Langote wrote: > BTW, I noticed the following in 0002 +errmsg("there exists a default partition for table \"%s\", cannot add a new partition", This error message style seems novel to me.

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

2017-06-15 Thread Amit Langote
On 2017/06/15 4:51, Robert Haas wrote: > On Wed, Jun 14, 2017 at 8:02 AM, Jeevan Ladhe > wrote: >> Here are the details of the patches in attached zip. >> 0001. refactoring existing ATExecAttachPartition code so that it can be >> used for >> default partitioning as

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

2017-06-15 Thread Shubham Barai
On 15 June 2017 at 07:23, Alvaro Herrera wrote: > Shubham Barai wrote: > > Hi, > > > > I have made some changes in tests and pushed them to my branch. > > > > Thanks for helping me out with testing. > > > > Now, current head produces false positives but, with my patch,

[HACKERS] Adding connection id in the startup message

2017-06-15 Thread Satyanarayana Narlapuram
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 pooling, Azure gateway proxy, backend server)

[HACKERS] Making server name part of the startup message

2017-06-15 Thread Satyanarayana Narlapuram
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 overload the username parameter to pass in the server

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

2017-06-15 Thread Peter Eisentraut
On 6/13/17 03:49, Michael Paquier wrote: > 001_ssltests.pl in src/test/ssl/ includes the following to skip all > tests should IPC::Run be not available: We used to have stanzas like that elsewhere but then removed them in favor of the configure option. It looks like this was forgotten. I have

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

2017-06-15 Thread Amit Langote
On 2017/06/15 18:05, Ashutosh Bapat wrote: > On Thu, Jun 15, 2017 at 2:30 PM, Amit Langote > wrote: >> On 2017/06/15 17:53, Ashutosh Bapat wrote: >>> On Thu, Jun 15, 2017 at 2:12 PM, Amit Langote wrote: > Both of the above comments are not related to the bug

Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-06-15 Thread Thomas Munro
On Thu, Jun 15, 2017 at 6:32 PM, Mahi Gurram wrote: > Followed the same as per your suggestion. Refer the code snippet below: > >> void >> _PG_init(void){ >> RequestAddinShmemSpace(1); >> PreviousShmemHook = shmem_startup_hook; >>shmem_startup_hook =

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 =

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

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] 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] intermittent failures in Cygwin from select_parallel tests

2017-06-15 Thread Amit Kapila
On Thu, Jun 15, 2017 at 3:31 AM, 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] Adding connection id in the startup message

2017-06-15 Thread Peter Eisentraut
On 6/15/17 03:11, Satyanarayana Narlapuram wrote: > Client adds a connection id in the startup message and send it to the > server it is trying to connect to. Proxy logs the connection id > information in its logs, and passes it to the server. Server logs the > connection Id in the server log, and

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

2017-06-15 Thread Daniel Verite
Fabien COELHO wrote: > I'm not fully convinced by this feature: using multiple queries is a > useful trick to reduce network-related latency by combining several > queries in one packet. Devs and even ORMs could use this trick. It's proposed as an option. For apps that intentionally

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

2017-06-15 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 6/15/17 03:11, Satyanarayana Narlapuram wrote: > > Client adds a connection id in the startup message and send it to the > > server it is trying to connect to. Proxy logs the connection id > > information in its logs, and passes it

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

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] 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] 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 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] 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: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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] Race conditions with WAL sender PID lookups

2017-06-15 Thread Kyotaro HORIGUCHI
Hi, At Thu, 8 Jun 2017 13:15:02 +0900, Michael Paquier wrote in > On Thu, Jun 8, 2017 at 3:31 AM, Robert Haas wrote: > > I think if you're going to fix it so that we take

[HACKERS] Typo in comment in ecpg datetime.c

2017-06-15 Thread Daniel Gustafsson
Spotted s/fiedls/fields/ in src/interfaces/ecpg/pgtypeslib/datetime.c per the attached patch. cheers ./daniel typo-ecpg_datetime.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

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

2017-06-15 Thread Ashutosh Bapat
On Thu, Jun 15, 2017 at 2:30 PM, Amit Langote wrote: > On 2017/06/15 17:53, Ashutosh Bapat wrote: >> On Thu, Jun 15, 2017 at 2:12 PM, Amit Langote wrote: Both of the above comments are not related to the bug that is being fixed, but they apply to the

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

[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] 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. >

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

[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

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

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

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] 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] 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 ).

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

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

  1   2   >