Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-28 Thread Petr Jelinek
issue, we can change it. On 2016-02-24 18:35:16 +0100, Petr Jelinek wrote: +SET synchronous_commit = on; +SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding'); + ?column? +-- + init +(1 row) +SELECT 'msg1' F

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-02-29 Thread Petr Jelinek
misleading implications from the point of the user. Also it does not do anything for object that "set" doesn't do already, so why have two interfaces for doing same thing. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-29 Thread Petr Jelinek
I am honestly sure if that's a win or not. I think it'll be confusing (bug inducing) if there's no snapshot for non-transactional messages but for transactional ones, and it'll severely limit the usefulness of the interface. Nono, I meant I am not sure if speci

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-02-29 Thread Petr Jelinek
ctional updates (nextval) so that decoding could easily differentiate between transactional and non-transactional update of sequence and then just either call the callback immediately or add the change to reorder buffer based on that. The redo code could just have simple OR expression

Re: [HACKERS] pglogical - logical replication contrib module

2016-02-29 Thread Petr Jelinek
ng business trip didn't help that much either). I wasn't specifically waiting for March, but I have more WIP things (privately) on this that I wanted to submit as a whole but not enough time to get it to -hackers (one of those things is replica trigger firing that you mentioned upthr

Re: [HACKERS] Confusing with commit time usage in logical decoding

2016-03-01 Thread Petr Jelinek
gt;xact_time); + commit_time, origin_id, origin_lsn); } Well yeah but the commit_time is set few lines above as Artur pointed out, I think the proposed fix is correct one. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Trainin

Re: [HACKERS] Confusing with commit time usage in logical decoding

2016-03-01 Thread Petr Jelinek
On 01/03/16 18:18, Andres Freund wrote: Hi, On 2016-03-01 18:09:28 +0100, Petr Jelinek wrote: On 01/03/16 17:57, Alvaro Herrera wrote: Artur Zakirov wrote: Hello, Andres You have introduced a large replication progress tracking infrastructure last year. And there is a problem described at

Re: [HACKERS] [NOVICE] WHERE clause not used when index is used

2016-03-01 Thread Petr Jelinek
from adding the complexity as part of a fix. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] The plan for FDW-based sharding

2016-03-01 Thread Petr Jelinek
n due to admin error) will send server to similar situation as xid wraparound. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] The plan for FDW-based sharding

2016-03-01 Thread Petr Jelinek
lt-in sharding by several years just because somebody said we will use FDWs and that's what we worked on in those years. Note that I am not saying that other discussed approaches are any better, I am saying that we should know approximately what we actually want and not just beat FDWs

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-03 Thread Petr Jelinek
ort for VS2015 with 9.5 (support for new versions of VS won a backpatch the last couple of years) would be a good thing I think. +1, and I can help (at least review and testing if nothing else). -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-03 Thread Petr Jelinek
ge detection area so it's definitely not just build system. But I think it should be fairly localized and fenced by ifdef anyway. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-04 Thread Petr Jelinek
n no locale was specified as it uses the setlocale() which returns the legacy (and not recommended) locale names and our fallback code can handle those. But manually set locales can be a problem. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Su

Re: [HACKERS] WIP: Access method extendability

2016-03-08 Thread Petr Jelinek
s at all? It's just call to RelationNeedsWAL() nothing to hard and hidden magic like not doing anything with WAL for the unlogged tables is seldomly good idea. Another small thing is that we put the API explanation comments into .c file not .h file. Didn't look at the bloom i

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-09 Thread Petr Jelinek
2_putenv(x) because in new CRT putenv have different signature. Hmm, I don't see any problem there. We should however add the msvc 2015 module to rtmodules in the pgwin32_putenv so that we can run just with that runtime. -- Petr Jelinek http://www.2ndQuadrant.com/ Postgre

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-09 Thread Petr Jelinek
I don't currently know of any way of doing this in VS2015 that would work with older versions of windows with the exception of having our own definition of the locale_t struct so that the VS2013 code would still work... -- Petr Jelinek http://www.2ndQuadrant.com/ Postgre

Re: [HACKERS] WAL log only necessary part of 2PC GID

2016-03-09 Thread Petr Jelinek
Hi, I wonder why you define the gidlen as uint32 when it would fit into uint8 which in the current TwoPhaseFileHeader struct should be win of 8 bytes on padding (on 64bit). I think that's something worth considering given that this patch aims to lower the size of the data. --

Re: [HACKERS] Timeline following for logical slots

2016-03-09 Thread Petr Jelinek
ogical replication client to a physical replica using a base backup taken by pg_basebackup and without the presence of failover slots. I won't pretend it's pretty. Well for testing purposes it's quite fine I think. The TAP framework enhancements needed for this are now in and it works c

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-09 Thread Petr Jelinek
nfo) { if ((info & ~XLR_INFO_MASK) == XLOG_LOGICAL_MESSAGE) return "MESSAGE"; return NULL; } Correct, fixed, thanks. I also rebased this as there was conflict after the fixes to logical decoding by Andres. -- Petr Jelinek http://www.2

Re: [HACKERS] Reworks of CustomScan serialization/deserialization

2016-03-09 Thread Petr Jelinek
OM_NAME_MAX_LEN); Shouldn't this be actually "if" with ereport() considering this is public API and extensions can pass anything there? (for that matter same is true for RegisterExtensibleNodeMethods but that's already committed). Other than that this seems like straight c

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-03-09 Thread Petr Jelinek
son not to accept this. Yes, the idea seems sane. Looking at the code, this adds bool hide_from_client to edata which is not initialized in errstart so that needs to be fixed. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training

Re: [HACKERS] Reworks of CustomScan serialization/deserialization

2016-03-09 Thread Petr Jelinek
ble-cassert > was not specified. > Well that's exactly my problem, this should IMHO throw error even without --enable-cassert. It's not like it's some performance sensitive API where if would be big problem, ensuring correctness of the input is more imporant here IMHO. --

Re: [HACKERS] Relation extension scalability

2016-03-09 Thread Petr Jelinek
. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] auto_explain sample rate

2016-03-09 Thread Petr Jelinek
e GUC description and the documentation say it's in percent but that's not really true as percent is 0 to 100. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hac

Re: [HACKERS] Reworks of CustomScan serialization/deserialization

2016-03-10 Thread Petr Jelinek
In fact, hash, match and keycopy function > of HTAB for string keys deal with the first (keysize - 1) bytes. > So, strkey(extnodename) == EXTNODENAME_MAX_LEN is not legal. > Yes, my thoughts as well but that can be separate tiny patch that does not have to affect this one. In my opin

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-03-10 Thread Petr Jelinek
nt, client just gets failed query without any message when used with ERROR level. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make c

Re: [HACKERS] [PROPOSAL] Client Log Output Filtering

2016-03-10 Thread Petr Jelinek
On 10/03/16 17:07, Tom Lane wrote: Petr Jelinek writes: The comment above errhidefromclient says "Only log levels below ERROR can be hidden from the client." but use of the errhidefromclient(true) actually does hide the error message from client, client just gets failed query w

Re: [HACKERS] WAL log only necessary part of 2PC GID

2016-03-10 Thread Petr Jelinek
On 10/03/16 13:43, Pavan Deolasee wrote: On Wed, Mar 9, 2016 at 7:56 PM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: Hi, I wonder why you define the gidlen as uint32 when it would fit into uint8 which in the current TwoPhaseFileHeader struct should be win of 8 by

Re: [HACKERS] Relation extension scalability

2016-03-10 Thread Petr Jelinek
On 10/03/16 09:57, Dilip Kumar wrote: On Thu, Mar 10, 2016 at 7:55 AM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: Thanks for the comments.. Hmm, why did you remove the comment above the call to UnlockRelationForExtension? While re factoring I lose this comment.. Fi

Re: [HACKERS] auto_explain sample rate

2016-03-10 Thread Petr Jelinek
On 10/03/16 20:59, Julien Rouhaud wrote: On 10/03/2016 04:37, Petr Jelinek wrote: On 17/02/16 01:17, Julien Rouhaud wrote: Agreed, it's too obscure. Attached v4 fixes as you said. Seems to be simple enough patch and works. However I would like documentation to say that the range is 0

Re: [HACKERS] Relation extension scalability

2016-03-10 Thread Petr Jelinek
On 11/03/16 02:44, Dilip Kumar wrote: On Fri, Mar 11, 2016 at 12:04 AM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: Thanks for looking.. Those look good. The patch looks good in general now. I am bit scared by the lockWaiters * 20 as it can result in relatively big c

Re: [HACKERS] auto_explain sample rate

2016-03-11 Thread Petr Jelinek
On 11/03/16 11:45, Magnus Hagander wrote: On Thu, Mar 10, 2016 at 10:07 PM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: On 10/03/16 20:59, Julien Rouhaud wrote: On 10/03/2016 04:37, Petr Jelinek wrote: On 17/02/16 01:17, Julien Rouhaud

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-03-11 Thread Petr Jelinek
On 02/03/16 08:05, Craig Ringer wrote: On 1 March 2016 at 05:30, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: On 29/02/16 03:23, Craig Ringer wrote: Sound reasonable? I wonder if it would be acceptable to create new info flag for RM_SEQ_ID that would behav

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Petr Jelinek
On 11/03/16 22:29, Robert Haas wrote: On Thu, Mar 10, 2016 at 8:54 PM, Petr Jelinek wrote: I am not talking about extension locks, the lock queue can be long because there is concurrent DDL for example and then once DDL finishes suddenly 100 connections that tried to insert into table will try

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Petr Jelinek
On 12/03/16 01:01, Jim Nasby wrote: On 3/11/16 5:14 PM, Petr Jelinek wrote: I don't really understand this part about concurrent DDL. If there were concurrent DDL going on, presumably other backends would be blocked on the relation lock, not the relation extension lock - and it doesn&#

Re: [HACKERS] Relation extension scalability

2016-03-11 Thread Petr Jelinek
ally needed were a couple dozen more pages. I agree, We can have some max limit on number of extra pages, What other thinks ? Well, that's what I meant with clamping originally. I don't know what is a good value though. -- Petr Jelinek http://www.2ndQuadr

Re: [HACKERS] pl/pgSQL, get diagnostics and big data

2016-03-11 Thread Petr Jelinek
ion of that, see the 0004 and bottom of 0003 in http://www.postgresql.org/message-id/557d9ded.2080...@2ndquadrant.com (I think at minimum what the 0003 does in c.h is needed). -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &

Re: [HACKERS] MinGW versus _strtoui64() ?

2016-03-12 Thread Petr Jelinek
On 13/03/16 03:30, Tom Lane wrote: Per a comment from Petr Jelinek, I added this in commit 23a27b039d94ba35: #ifdef WIN32 return _strtoui64(str, endptr, base); #else ... Several of the Windows buildfarm members are good with that, but narwhal is not: numutils.c: In function

Re: [HACKERS] MinGW versus _strtoui64() ?

2016-03-12 Thread Petr Jelinek
On 13/03/16 04:24, Tom Lane wrote: Petr Jelinek writes: On 13/03/16 03:30, Tom Lane wrote: Per a comment from Petr Jelinek, I added this in commit 23a27b039d94ba35: #ifdef WIN32 return _strtoui64(str, endptr, base); #else ... Several of the Windows buildfarm members are good with that, but

Re: [HACKERS] Relation extension scalability

2016-03-13 Thread Petr Jelinek
ed arises in next one. (with my love for round numbers I would have suggested 8MB as that's 3 orders of magnitude, but I am fine with 4MB as well) -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgs

Re: [HACKERS] Reworks of CustomScan serialization/deserialization

2016-03-13 Thread Petr Jelinek
On 14/03/16 02:53, Kouhei Kaigai wrote: >> -Original Message- >> From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Petr Jelinek >> Sent: Friday, March 11, 2016 12:27 AM >> To: Kaigai Kouhei(海外 浩平); pgsql-hac

Re: [HACKERS] WIP: Upper planner pathification

2016-03-13 Thread Petr Jelinek
; To me that seems too low inside the planning tree, perhaps adding it just to the subquery_planner before SS_identify_outer_params would be better, that's the place where you see the path for the whole (sub)query so you can search and modify what you need from there. -- Petr Jelinek

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-03-14 Thread Petr Jelinek
king for the specific LSN in SQL interface by first calling the pg_logical_slot_get_changes function with upto_lsn set to whatever lsn you expect to start at, but it's ugly. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Traini

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-03-14 Thread Petr Jelinek
east. The point was that the next call will start from whatever lsn you specified as upto_lsn. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql

Re: [HACKERS] Relation extension scalability

2016-03-18 Thread Petr Jelinek
On 17/03/16 04:42, Dilip Kumar wrote: On Mon, Mar 14, 2016 at 8:26 AM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: Well any value we choose will be very arbitrary. If we look at it from the point of maximum absolute disk space we allocate for relation at once, the 4MB

[HACKERS] Re: [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-03-19 Thread Petr Jelinek
I still don't like that this works on path leading to an object given that we can't fulfill the promise of inserting to an arbitrary position there. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --

Re: [HACKERS] WIP: Access method extendability

2016-03-19 Thread Petr Jelinek
w that one. I'd like the English of the generic_xlog.c description improved but I won't get to it before weekend. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] Reworks of CustomScan serialization/deserialization

2016-03-19 Thread Petr Jelinek
the manner of RegisterExtensibleNodeMethods() Hi, looks good, only nitpick I have is that it probably should be custom_node.h with underscore given that we use underscore everywhere (except for libpq and for some reason atomic ops). -- Petr Jelinek http://www

Re: [HACKERS] Sequence Access Method WIP

2016-03-20 Thread Petr Jelinek
On 19/03/16 23:02, Alvaro Herrera wrote: Petr Jelinek wrote: And finally the 0003-gapless-seq is example contrib module that implements dependably and transitionally safe gapless sequence access method. It's obviously slow as it has to do locking and basically serialize all the chang

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-20 Thread Petr Jelinek
just that the public headers are botched in current version and apparently nobody important is using them to force MS to fix them. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers maili

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
n_session_setup for same origin only in one process but you don't need to have it setup for session to update it, the replorigin_advance() works just fine. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Se

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
n_session_setup for same origin only in one process but you don't need to have it setup for session to update it, the replorigin_advance() works just fine. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Se

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 14:15, Andres Freund wrote: On March 21, 2016 2:08:54 PM GMT+01:00, Petr Jelinek wrote: On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 14:25, Andres Freund wrote: On 2016-03-21 14:18:27 +0100, Petr Jelinek wrote: On 21/03/16 14:15, Andres Freund wrote: Only when the origin is actually setup for the current session. You need to call the replorigin_advance yourself from your apply code. That's problematic f

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-21 Thread Petr Jelinek
ably deserve at least a short comment explaining the purpose (just like the other structs around). Okay. Updated version attached. (BTW please try to CC author of the patch when reviewing) -- Petr Jelinek http://www.2ndQuadrant.com/ Pos

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-21 Thread Petr Jelinek
Just noticed there is missing symlink in the pg_xlogdump. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services >From f47730e5e8ef5797c7595aafcbf8cff3b375d0ad Mon Sep 17 00:00:00 2001 From: Petr Jelinek Date: Wed, 24 F

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-22 Thread Petr Jelinek
On 22/03/16 07:32, konstantin knizhnik wrote: On Mar 21, 2016, at 4:30 PM, Petr Jelinek wrote: On 21/03/16 14:25, Andres Freund wrote: On 2016-03-21 14:18:27 +0100, Petr Jelinek wrote: On 21/03/16 14:15, Andres Freund wrote: Only when the origin is actually setup for the current session

Re: [HACKERS] WIP: Access method extendability

2016-03-22 Thread Petr Jelinek
hods (which means it would probably be better to record dependency of opclass on amhandler as mentioned before, since this is already solved for functions and if the oid of am is not referenced anywhere it does not need special handling for binary upgrade). -- Petr Jelinek http:/

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-22 Thread Petr Jelinek
On 22/03/16 12:47, Andres Freund wrote: On 2016-03-21 18:10:55 +0100, Petr Jelinek wrote: + + + Generic Message Callback + + + The optional message_cb callback is called whenever + a logical decoding message has been decoded. + +typedef void (*LogicalDecodeMessageCB

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-22 Thread Petr Jelinek
On 22/03/16 14:40, Michael Paquier wrote: On Wed, Mar 9, 2016 at 11:10 PM, Petr Jelinek wrote: Something like attached is simplest way this would work correctly (note that I didn't really test it and it's missing comments). Note that we are falling back to the old parsing i

Re: [HACKERS] Relation extension scalability

2016-03-22 Thread Petr Jelinek
o add extra blocks or not.. I also think the code simplicity makes this worth it. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-23 Thread Petr Jelinek
On 22/03/16 14:11, Andres Freund wrote: On 2016-03-22 14:03:06 +0100, Petr Jelinek wrote: On 22/03/16 12:47, Andres Freund wrote: On 2016-03-21 18:10:55 +0100, Petr Jelinek wrote: + + + Generic Message Callback + + + The optional message_cb callback is called whenever

Re: [HACKERS] Reworks of CustomScan serialization/deserialization

2016-03-23 Thread Petr Jelinek
On 23/03/16 08:34, Kouhei Kaigai wrote: -Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Petr Jelinek Sent: Thursday, March 17, 2016 5:06 PM To: Kaigai Kouhei(海外 浩平) Cc: Robert Haas; pgsql-hackers@postgresql.org Subject

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-23 Thread Petr Jelinek
troversial based on the original thread. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresq

Re: [HACKERS] Rationalizing code-sharing among src/bin/ directories

2016-03-23 Thread Petr Jelinek
ibpq/encnames.c -> ../../../src/backend/utils/mb/encnames.c which seem like they'd be better handled by moving those files into src/common/. Thoughts? Yes please! -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Servic

Re: [HACKERS] Reworks of CustomScan serialization/deserialization

2016-03-23 Thread Petr Jelinek
itted). -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-23 Thread Petr Jelinek
On 23/03/16 14:17, Alvaro Herrera wrote: Petr Jelinek wrote: +++ b/contrib/test_decoding/sql/messages.sql @@ -0,0 +1,17 @@ +-- predictability +SET synchronous_commit = on; + +SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding

Re: [HACKERS] multivariate statistics v14

2016-03-23 Thread Petr Jelinek
good job on splitting the functionality into patchset. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www

Re: [HACKERS] Relation extension scalability

2016-03-23 Thread Petr Jelinek
On 23/03/16 19:39, Robert Haas wrote: On Tue, Mar 22, 2016 at 1:12 PM, Petr Jelinek wrote: I also think the code simplicity makes this worth it. Agreed. I went over this patch and did a cleanup pass today. I discovered that the LockWaiterCount() function was broken if you try to tried to

Re: [HACKERS] Relation extension scalability

2016-03-23 Thread Petr Jelinek
On 23/03/16 20:01, Robert Haas wrote: On Wed, Mar 23, 2016 at 2:52 PM, Petr Jelinek wrote: Second, if the other backend extended the relation in some other manner and did not extend the FSM, how does calling RecordAndGetPageWithFreeSpace help? As far as I can see, GetPageWithFreeSpace and

Re: [HACKERS] Relation extension scalability

2016-03-23 Thread Petr Jelinek
On 23/03/16 20:19, Petr Jelinek wrote: On 23/03/16 20:01, Robert Haas wrote: On Wed, Mar 23, 2016 at 2:52 PM, Petr Jelinek wrote: Second, if the other backend extended the relation in some other manner and did not extend the FSM, how does calling RecordAndGetPageWithFreeSpace help? As far as

Re: [HACKERS] Relation extension scalability

2016-03-23 Thread Petr Jelinek
On 23/03/16 20:43, Robert Haas wrote: On Wed, Mar 23, 2016 at 3:33 PM, Petr Jelinek wrote: Btw thinking about it some more, ISTM that not finding the block and just doing the extension if the FSM wasn't extended correctly previously is probably cleaner behavior than what we do now

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-23 Thread Petr Jelinek
nt type" a couple of times. Hmm I see you are right, I missed the last couple emails. Ok I'll mark it ready for committer - it does work fine on my vs2015 machine and I am happy with the code too. Well, as happy as I can be given the locale mess. -- Petr Jelinek

Re: [HACKERS] Relation extension scalability

2016-03-24 Thread Petr Jelinek
ome up with any better, Please suggest one. GetNearestPageWithFreeSpace? (although not sure that's accurate description, maybe Nearby would be better) -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-24 Thread Petr Jelinek
s? I mean, if we've got the names for those symbols wrong, how is this working right now? We didn't older versions just defined the other variants as well, but the _timezone and _tzname have been around since at least VS2003. -- Petr Jelinek http://www.

Re: [HACKERS] Relation extension scalability

2016-03-28 Thread Petr Jelinek
? It seems so, do you have ability to reasonably test with 64 clients? I am mostly wondering if we see the performance going further down or just plateau. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via p

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-29 Thread Petr Jelinek
secret. It will obviously fail until we push the 0002 and 0004 though. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subs

Re: [HACKERS] WIP: Access method extendability

2016-03-29 Thread Petr Jelinek
. It's not perfect but it's better (I am not native speaker either). It's same as v12, just changed comments somewhat. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services diff --git a/src/backend/access/rmgrd

Re: [HACKERS] WIP: Access method extendability

2016-03-29 Thread Petr Jelinek
* in the page. Then size of delta would be size of page plus size of fragment >+ * header. >+ */ >+ #define FRAGMENT_HEADER_SIZE (2 * sizeof(OffsetNumber)) >+ #define MATCH_THRESHOLD FRAGMENT_HEADER_SIZE >+ #define MAX_DELTA_SIZEBLCKSZ + FRAGMENT_HEADER_SIZE

Re: [HACKERS] WIP: Access method extendability

2016-03-29 Thread Petr Jelinek
my merge 13, but somehow the diff was broken so now I just sent diff against Alexander's work with mine + Alvaro's changes, sorry for confusion. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via

Re: [HACKERS] Sequence Access Method WIP

2016-03-29 Thread Petr Jelinek
URPOSE. Hmm nothing special indeed, still can't reproduce, I did one blind try for a fix. Can you test with attached? -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services >From 7f42f2b420e2b931e1ca013f3fdeaccf302f361

Re: [HACKERS] Sequence Access Method WIP

2016-03-29 Thread Petr Jelinek
On 29/03/16 22:08, Fabrízio de Royes Mello wrote: On Tue, Mar 29, 2016 at 4:59 PM, Petr Jelinek mailto:p...@2ndquadrant.com>> wrote: > > On 29/03/16 19:46, Fabrízio de Royes Mello wrotez >> >> >> > >> > Hmm I am unable to reproduce this. What O

Re: [HACKERS] Sequence Access Method WIP

2016-03-30 Thread Petr Jelinek
t; to avoid reading as "is_initIALIZED" Sounds good. DEPENDS ON 0001-seqam-v10.patch , which isn't commited yet --- and it doesn't apply cleanly to current git master. Please update/rebase the patch and resubmit. The current version of seqam is 0001-seqam-2016-03-29 whic

Re: [HACKERS] pglogical - logical replication contrib module

2016-01-15 Thread Petr Jelinek
y sure what to do to 'recover' my cluster at this point so I'll send this off and rebuild my cluster and start over. I think the problem here is that you resubscribed with syncrhonize_structure := true while the conflicting structure already existed, that option only works correctly

Re: [HACKERS] pglogical - logical replication contrib module

2016-01-15 Thread Petr Jelinek
On 2016-01-10 20:57, Steve Singer wrote: On 01/09/2016 01:30 PM, Steve Singer wrote: On 12/31/2015 06:34 PM, Petr Jelinek wrote: I'm not really sure what to do to 'recover' my cluster at this point so I'll send this off and rebuild my cluster and start over. I had a

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-01-22 Thread Petr Jelinek
fully improved as well. The functionality itself didn't change. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From c19d7274091baee4a52b1fa0ac684ace4cc9 Mon Sep 17 00:00:00 2001 From: Petr Jelinek Date: Fri,

Re: [HACKERS] Sequence Access Method WIP

2016-01-29 Thread Petr Jelinek
he appropriate adjustments to existing code, ie check > that amkind is correct when fetching an index handler. I considered > putting that into the AM API refactor patch, but desisted.) > Well I was wondering how to handle this as well, the submitted patch currently just adds Asserts, be

Re: [HACKERS] Sequence Access Method WIP

2016-01-30 Thread Petr Jelinek
we are creating ACCESS METHOD object so that's what should be after CREATE. In any case this is slightly premature IMHO as DDL is somewhat unless until we have sequence access methods implementation we can agree on, or the generic WAL logging so that custom indexes can be crash safe.

Re: [HACKERS] Sequence Access Method WIP

2016-01-30 Thread Petr Jelinek
On 30 January 2016 at 13:48, Robert Haas wrote: > On Sat, Jan 30, 2016 at 7:37 AM, Petr Jelinek wrote: >> Just as a note, CREATE SEQUENCE ACCESS METHOD already causes grammar >> conflict now, that's why my proposal was different, I didn't want to >> add more keyw

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-01 Thread Petr Jelinek
t if > we name them just "Logical messages" then it's OK for me. > Yeah the patch talks about logical messages, I use different title in mailing list and CF to make it more clear on first sight what this actually is technically. -- Petr Jelinek http://ww

Re: [HACKERS] WIP: Failover Slots

2016-02-15 Thread Petr Jelinek
it can create non-failover slot so in my opinion we ideally need both types of slots (and that's exactly what this patch gives us). -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hacker

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-24 Thread Petr Jelinek
Hello, It seems that you forgot regression tests for test_decoding. There is an entry in test_decoding/Makefile, but there are not files sql/messages.sql and expected/messages.out. However they are included in the first version of the patch. Hi, yes, git add missing. -- Petr Jelinek

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-02-24 Thread Petr Jelinek
erface like this, I'd strongly prefer the jsonb_array_insert naming though. I attached possible implementation, which is basically quite small (all logic-related modifications is only about 4 lines in `setPath` function). This implementation assumes a flag to separate "insert before&quo

Re: [HACKERS] Logical decoding restart problems

2016-08-19 Thread Petr Jelinek
hat origin. This is especially useful for the transaction forwarding you are doing (See BDR and/or pglogical code for example of that). -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mail

Re: [HACKERS] Logical decoding restart problems

2016-08-19 Thread Petr Jelinek
On 19/08/16 18:36, Konstantin Knizhnik wrote: On 19.08.2016 19:06, Petr Jelinek wrote: I don't think this will work correctly, there will be gap between when the new slot starts to decode and the drop of the old one as the new slot first needs to make snapshot. Do I understand corr

Re: [HACKERS] LSN as a recovery target

2016-08-19 Thread Petr Jelinek
could just add an additional sentence: "This parameter value is parsed using the system datatype ". Or something like that. Thoughts? +1 If we want to specifically name the recovery_target_lsn in the message, we could probably do it using context. -- Petr Jelinek htt

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-08-20 Thread Petr Jelinek
hose patches are still pending and should be considered for commit in the next CF. (Of course, I think they should just be committed, but I would, wouldn't I?) I think the doc one should definitely go in and possibly be back-patched all the way to 9.4. I didn't look at the other on

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2016-08-23 Thread Petr Jelinek
h. I wonder if it would not be better to have the opposite function instead - converting xid to txid as that will always work and does not have to have the NULL case and would be simpler in terms of code. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Developm

Re: [HACKERS] LSN as a recovery target

2016-08-23 Thread Petr Jelinek
opo" CONTEXT: line 11 of configuration file "recovery.conf", parameter "recovery_target_lsn" Looks very reasonable to me (both patches). Thanks for doing that. I am inclined to mark this as ready for committer. -- Petr Jelinek http://www.2ndQuadrant.com

  1   2   3   4   5   6   7   8   9   10   >