Re: [HACKERS] Restricting maximum keep segments by repslots

2018-01-14 Thread Kyotaro HORIGUCHI
Hello, At Thu, 11 Jan 2018 13:56:14 +, Greg Stark wrote in > On 11 January 2018 at 09:55, Sergei Kornilov wrote: > > if (active_pid != 0) > > status = "streaming"; > >

Re: [HACKERS] Restricting maximum keep segments by repslots

2018-01-14 Thread Kyotaro HORIGUCHI
Hello, At Thu, 11 Jan 2018 12:55:27 +0300, Sergei Kornilov wrote in <2798121515664...@web40g.yandex.ru> > Hello > > >> patch -p1 gives some "Stripping trailing CRs from patch" > >> messages for me, but applied to current HEAD and builds. After > > > > Hmm. I wonder why I get

Re: [COMMITTERS] pgsql: Improve performance of get_actual_variable_range with recently-d

2018-01-14 Thread Masahiko Sawada
On Fri, Sep 8, 2017 at 8:41 AM, Tom Lane wrote: > Improve performance of get_actual_variable_range with recently-dead tuples. > > In commit fccebe421, we hacked get_actual_variable_range() to scan the > index with SnapshotDirty, so that if there are many uncommitted tuples >

Re: PATCH: psql tab completion for SELECT

2018-01-14 Thread Andres Freund
On January 14, 2018 5:44:01 PM PST, Edmund Horner wrote: >On 15 January 2018 at 14:20, Andres Freund wrote: >> On January 14, 2018 5:12:37 PM PST, Edmund Horner >wrote: >>>And here's a patch to add savepoint protection for tab

Re: [HACKERS] Useless code in ExecInitModifyTable

2018-01-14 Thread Amit Langote
On 2018/01/15 11:28, Stephen Frost wrote: > Fujita-san, Amit, > > * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: >> On 2017/06/21 16:59, Etsuro Fujita wrote: >>> Commit d3cc37f1d801a6b5cad9bf179274a8d767f1ee50 added this to >>> ExecInitModifyTable: >>> >>> + /* The root table RT index is

Removing WITH clause support in CREATE FUNCTION, for isCachable and isStrict

2018-01-14 Thread Michael Paquier
Hi all, As noticed by Daniel here: https://www.postgresql.org/message-id/d5f34c9d-3ab7-4419-af2e-12f67581d...@yesql.se Using a WITH clause takes precendence over what is defined in the main function definition when using isStrict and isCachable. For example, when using VOLATILE and IMMUTABLE, an

Re: PATCH: psql tab completion for SELECT

2018-01-14 Thread Edmund Horner
On 15 January 2018 at 14:20, Andres Freund wrote: > On January 14, 2018 5:12:37 PM PST, Edmund Horner wrote: >>And here's a patch to add savepoint protection for tab completion. > > It'd be good to explain what that means, so people don't have to read the >

Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

2018-01-14 Thread Michael Paquier
On Fri, Jan 12, 2018 at 11:35:48PM +0100, Daniel Gustafsson wrote: > On 11 Jan 2018, at 09:01, Michael Paquier wrote: >> I would like to think that a special section >> dedicated to option compatibility for each command would be welcome to >> track which grammar is

Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis

2018-01-14 Thread Stephen Frost
Greetings Lætitia, Amit, * Lætitia Avrot (laetitia.av...@gmail.com) wrote: > Thanks Stephen for the suggestion. I wan't thinking globally enough. I was > planning to look at it today but Amit was faster. So thanks Amit too! This seems to have gotten lost in the shuffle, but Amit's patch still

Re: PATCH: psql tab completion for SELECT

2018-01-14 Thread Andres Freund
On January 14, 2018 5:12:37 PM PST, Edmund Horner wrote: >And here's a patch to add savepoint protection for tab completion. It'd be good to explain what that means, so people don't have to read the patch to be able to discuss whether this is a good idea. Andres -- Sent

Re: PATCH: psql tab completion for SELECT

2018-01-14 Thread Edmund Horner
And here's a patch to add savepoint protection for tab completion. It could definitely use some scrutiny to make sure it's not messing up the user's transaction. I added some error checking for the savepoint creation and the rollback, and then wrapped it in #ifdef NOT_USED (just as the query

Re: Logical decoding fast-forward and slot advance

2018-01-14 Thread Petr Jelinek
On 08/01/18 08:02, Simon Riggs wrote: > On 31 December 2017 at 10:44, Petr Jelinek > wrote: > >> Attached is patch which adds ability to do fast-forwarding while >> decoding. That means wal is consumed as fast as possible and changes are >> not given to output

Re: WIP: a way forward on bootstrap data

2018-01-14 Thread John Naylor
On 1/14/18, Tom Lane wrote: > I'm not sure about the decision to move all the OID macros into > one file; that seems like namespace pollution. > The design I'd kind of imagined was one generated file of #define's > per pg_*.h file, not just one giant one. First, thanks for

Re: WIP: a way forward on bootstrap data

2018-01-14 Thread Tom Lane
I wrote: > Another thing that I'd sort of hoped might happen from this patchset > is to cure the problem of keeping some catalog headers safe for > client-side inclusion, because some clients want the OID value macros > and/or macros for column values (eg PROVOLATILE_IMMUTABLE), so they >

Re: WIP: a way forward on bootstrap data

2018-01-14 Thread Tom Lane
Greg Stark writes: > I'm 1000% on board with replacing oid constants with symbolic names > that get substituted programmatically. Yeah, that's almost an independent feature --- we could do that without any of this other stuff, if we wanted. > However I wonder why we're bothering

Re: proposal: alternative psql commands quit and exit

2018-01-14 Thread Everaldo Canuto
On Sun, Jan 14, 2018 at 2:38 AM, Chapman Flack wrote: > On 01/13/18 21:36, Everaldo Canuto wrote: > > > I don't wanna be irritating but here every postgres user I found really > > can't understand how the original patch was not accepted, people against > it > > did not

Re: [PATCH] Find additional connection service files in pg_service.conf.d directory

2018-01-14 Thread Michael Paquier
On Fri, Jan 12, 2018 at 09:53:51AM -0500, Curt Tilmes wrote: > This patch adds an extra search for service connection definitions if > the current places fail > to find the service (~/.pg_service.conf /pg_service.conf). > It will then search > every readable file in the directory

Re: [HACKERS] [PATCH] Improve geometric types

2018-01-14 Thread Emre Hasegeli
> I found seemingly inconsistent handling of NaN. > > - Old box_same assumed NaN != NaN, but new assumes NaN == > NaN. I'm not sure how the difference is significant out of the > context of sorting, though... There is no box != box operator. If there was one, previous code would return false

Re: WIP: a way forward on bootstrap data

2018-01-14 Thread Greg Stark
I'm 1000% on board with replacing oid constants with symbolic names that get substituted programmatically. However I wonder why we're bothering inventing a new syntax that doesn't actually do much more than present static tabular data. If things like magic proname->prosrc behaviour are not

Re: [HACKERS] UPDATE of partition key

2018-01-14 Thread Amit Khandekar
On 13 January 2018 at 02:56, Robert Haas wrote: > On Fri, Jan 12, 2018 at 12:23 PM, Amit Khandekar > wrote: >>> (1) if they need it by subplan index, first use >>> subplan_partition_offsets to convert it to a per-leaf index >> >> Before that, we

Re: PQHost() undefined behavior if connecting string contains both host and hostaddr types

2018-01-14 Thread Michael Paquier
On Sun, Jan 14, 2018 at 02:19:26PM +1100, Haribabu Kommi wrote: > While working on [1], we find out the inconsistency in PQHost() behavior > if the connecting string that is passed to connect to the server contains > multiple hosts with both host and hostaddr types. For example, > >