Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-01 Thread Michael Paquier
On Wed, Mar 1, 2017 at 2:21 AM, Andreas Karlsson wrote: > For each table: > > 1. Create new indexes without populating them, and lock the tables and > indexes for the session. +/* + * Copy contraint flags for old index. This is safe because the old index + *

Re: [HACKERS] [PATCH] Use $ parameters as replacement characters for pg_stat_statements

2017-03-01 Thread Lukas Fittl
On Wed, Mar 1, 2017 at 6:51 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > > Hmm, I think this could confuse people into thinking that the queries > displayed were in fact prepared queries. > > Maybe we could gather some more ideas. > I think thats a reasonable concern - the

Re: [HACKERS] patch: function xmltable

2017-03-01 Thread Alvaro Herrera
I've been giving this a look. I started by tweaking the docs once again, and while verifying that the example works as expected, I replayed what I have in sgml: ... begin SGML paste ... For example, given the following XML document: the following query produces the result

Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2]

2017-03-01 Thread Kouhei Kaigai
> Hello all, > > as this is my first mail to pgsql-hackers, please be gentle :) > Welcome to pgsql-hackers, > I've looked at the patch, and as I'm not that familiar with the pg-sourcecode, > customs and so on, this isn't a review, more like food for thought and all > should be taken with a grain

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Kyotaro HORIGUCHI
At Wed, 1 Mar 2017 08:06:10 -0800, Andres Freund wrote in <20170301160610.wc7ez3vihmial...@alap3.anarazel.de> > On 2017-02-28 12:42:32 +0900, Michael Paquier wrote: > > Please no. Replication slots are designed the current way because we > > don't want to have to use

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-01 Thread Craig Ringer
On 2 March 2017 at 06:20, Petr Jelinek wrote: > If I understand you correctly you are saying that if PREPARE is being > decoded, we can load the GID from the 2pc info in memory about the > specific 2pc. The info gets removed on COMMIT PREPARED but at that point >

Re: [HACKERS] timeouts in PostgresNode::psql

2017-03-01 Thread Craig Ringer
On 2 March 2017 at 03:19, Peter Eisentraut wrote: > On 2/26/17 21:28, Craig Ringer wrote: >> Amended patch attached after a few Perl-related comments I got on >> private mail. Instead of >> >> $exc_save !~ /^$timeout_exception.*/ >> >> I've updated to: >> >>

Re: [HACKERS] port of INSTALL file generation to XSLT

2017-03-01 Thread Magnus Hagander
On Wed, Mar 1, 2017 at 3:58 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2/28/17 08:57, Magnus Hagander wrote: > > It appears we need pandoc 1.13 to get the good output. This won't be > > available until Debian stretch. > > > > So for PG10, I propose the

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Kyotaro HORIGUCHI
At Wed, 1 Mar 2017 12:17:43 -0500, Peter Eisentraut wrote in > On 2/27/17 23:27, Petr Jelinek wrote: > >>> WARNING: restart LSN of replication slots is ignored by checkpoint > >>> DETAIL: Some replication

Re: [HACKERS] mat views stats

2017-03-01 Thread Michael Paquier
On Thu, Mar 2, 2017 at 7:20 AM, Jim Mlodgenski wrote: > > > On Sun, Feb 26, 2017 at 11:49 AM, Robert Haas wrote: >> >> On Wed, Feb 22, 2017 at 11:13 AM, Jim Nasby >> wrote: >> > Certainly easier, but I don't think it'd be

Re: [HACKERS] pg_dump, pg_dumpall and data durability

2017-03-01 Thread Michael Paquier
On Thu, Mar 2, 2017 at 2:26 AM, David Steele wrote: > This patch is in need of a committer. Any takers? > I didn't see a lot of enthusiasm from committers on the thread Stephen at least has showed interest. > so if nobody picks it up by the end of the CF I'm going to mark

Re: [HACKERS] Wrong variable type in KeepLogSeg

2017-03-01 Thread Kyotaro HORIGUCHI
At Tue, 28 Feb 2017 12:21:01 +0100, Magnus Hagander wrote in magnus> > Hello, I found a variable definition with wrong type magnus> > specification in KeepLogSeg, which doesn't harm anything. magnus>

Re: [HACKERS] GSoC 2017

2017-03-01 Thread Jim Nasby
On 2/27/17 4:52 PM, Thomas Munro wrote: By the way, that page claims that PostgreSQL runs on Irix and Tru64, which hasn't been true for a few years. There could be a GSoC project to add support for those back in... ;P -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in

Re: [HACKERS] I propose killing PL/Tcl's "modules" infrastructure

2017-03-01 Thread Jim Nasby
On 2/27/17 2:42 PM, Tom Lane wrote: + SET pltcl.start_proc = 'no_such_function'; + select tcl_int4add(1, 2); + ERROR: function no_such_function() does not exist Can the error message be more explicit somehow? Otherwise people will be quite confused as to where no_such_function() is coming

Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional

2017-03-01 Thread Jim Nasby
On 2/27/17 6:25 PM, David Steele wrote: The purpose of this patch is to make waiting for archive optional, with the default being the current behavior, i.e., to wait for all WAL to be archived. This functionality is already used internally by pg_basebackup, so the only real change is to expose

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

2017-03-01 Thread Jim Nasby
On 2/28/17 2:45 PM, Andres Freund wrote: So if you don't want to allow multiple statements, use PQexecParams et al. That does leave most application authors out in the cold though, since they're using a higher level connection manager. If the maintenance burden isn't terribly high it would

Re: [HACKERS] PATCH: two slab-like memory allocators

2017-03-01 Thread Andres Freund
On 2017-02-28 20:29:36 -0800, Andres Freund wrote: > On 2017-02-28 20:18:35 -0800, Andres Freund wrote: > > - Andres, hoping the buildfarm turns greener > > Oh well, that didn't work. Investigating. The fix for that was fairly trivial, and the buildfarm has cooled down. The issue was that on

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Kyotaro HORIGUCHI
At Wed, 1 Mar 2017 12:18:07 -0500, Peter Eisentraut wrote in <98538b00-42ae-6a6b-f852-50b3c937a...@2ndquadrant.com> > On 2/27/17 22:27, Kyotaro HORIGUCHI wrote: > > This patch adds a GUC to put a limit to the number of segments > > that replication slots can

Re: [HACKERS] 2017-03 Commitfest In Progress

2017-03-01 Thread Tom Lane
Thomas Munro writes: > On Thu, Mar 2, 2017 at 4:42 AM, David Steele wrote: >> The 2017-03 commitfest is now in progress. Here's the breakdown: >> >> Needs review: 128 >> Waiting on Author: 26 >> Ready for Committer: 26 >> Total: 180 > Not

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-01 Thread Jim Nasby
On 2/28/17 11:21 AM, Andreas Karlsson wrote: The only downside I can see to this approach is that we no logner will able to reindex catalog tables concurrently, but in return it should be easier to confirm that this approach can be made work. Another downside is any stored regclass fields will

Re: [HACKERS] Two questions about Postgres parser

2017-03-01 Thread Jim Nasby
On 2/27/17 10:37 AM, Tom Lane wrote: 2. Implicit user defined type casts are not applied for COALESCE operator: That has nothing to do with whether the cast is user-defined. It has to do with not wanting to automatically unify types across type-category boundaries (in this case, numeric vs.

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Peter Eisentraut
On 3/1/17 09:12, Josh Soref wrote: > On Mar 1, 2017 9:06 AM, "Peter Eisentraut" > > wrote: > > On 2/6/17 06:03, Heikki Linnakangas wrote: > > Ah, yes please. Post them over and I'll have a look at those as well.

Re: [HACKERS] some dblink refactoring

2017-03-01 Thread Peter Eisentraut
On 2/28/17 22:22, Corey Huinker wrote: > Any chance we can make get_connect_string() a core function or at least > externally accessible? [get_connect_string() gets the connection string for a foreign server] The connection string for a foreign server depends on the nature of the foreign server.

Re: [HACKERS] Statement-level rollback

2017-03-01 Thread Tom Lane
Peter Eisentraut writes: > On 2/28/17 08:17, Tom Lane wrote: >> I do not really see how this would ever get past the compatibility >> problems that forced us to give up on server-side autocommit years ago. > I think it's different because it's not a global

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Andres Freund
Hi, On 2017-02-28 12:42:32 +0900, Michael Paquier wrote: > Please no. Replication slots are designed the current way because we > don't want to have to use something like wal_keep_segments as it is a > wart, and this applies as well for replication slots in my opinion. I think a per-slot option

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-01 Thread Tom Lane
Andres Freund writes: > On 2016-12-08 13:34:41 -0800, Andres Freund wrote: >> Hi, >> >> I'm wondering if it's not time for $subject: >> - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was >> forgotten >> - They have us keep weird hacks around just for the sake

Re: [HACKERS] perlcritic

2017-03-01 Thread Dagfinn Ilmari Mannsåker
Hi Peter, Peter Eisentraut writes: > I posted this about 18 months ago but then ran out of steam. [ ] Here > is an updated patch. The testing instructions below still apply. > Especially welcome would be ideas on how to address some of the places > I have

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-03-01 Thread David Steele
On 1/30/17 11:33 PM, Michael Paquier wrote: > On Fri, Dec 2, 2016 at 1:39 PM, Haribabu Kommi > wrote: >> The latest proposed patch still having problems. >> Closed in 2016-11 commitfest with "moved to next CF" status because of a bug >> fix patch. >> Please feel free to

Re: [HACKERS] BRIN cost estimate

2017-03-01 Thread Alvaro Herrera
Alvaro Herrera wrote: > I have added this patch to the commitfest, which I've been intending to > get in for a long time. I'll be submitting an updated patch, if needed. Here is Emre's patch rebased to current sources. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] objsubid vs subobjid

2017-03-01 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 2/22/17 19:35, Jim Nasby wrote: > > pg_get_object_address() currently returns a field called subobjid, while > > pg_depend calls that objsubid. I'm guessing that wasn't on purpose > > (especially because internally the function uses objsubid), and it'd be > > nice

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Alvaro Herrera
Josh Soref wrote: > >

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Alvaro Herrera
Josh Soref wrote: > - else if (ControlFile->state == DB_SHUTDOWNING) > + else if (ControlFile->state == DB_SHUTTINGDOWN) SHUTDOWNING and SHUTDOWNED are typos first introduced by hacker emeritus Vadim Mikheev in 1999 together with WAL, commit 47937403676d. It goes to show that not every

Re: [HACKERS] Time to drop old-style (V0) functions?

2017-03-01 Thread Andres Freund
On 2017-03-01 11:18:34 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2016-12-08 13:34:41 -0800, Andres Freund wrote: > >> Hi, > >> > >> I'm wondering if it's not time for $subject: > >> - V0 causes confusion / weird crashes when PG_FUNCTION_INFO_V1 was > >> forgotten

Re: [HACKERS] SerializedSnapshotData alignment

2017-03-01 Thread Noah Misch
On Mon, Feb 27, 2017 at 12:11:54PM +0530, Robert Haas wrote: > On Mon, Feb 27, 2017 at 5:13 AM, Noah Misch wrote: > > Dear 7b4ac19 authors, > > > > Field ps_snapshot_data usually receives four-byte alignment within > > ParallelIndexScanDescData, but it contains the eight-byte

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-01 Thread Fabien COELHO
Hello Corey, That is accurate. The only positive it has is that the user only experiences one error, and it's the first error that was encountered if reading top-to-bottom, left to right. It is an issue of which we prioritize - user experience or simpler code. Hmmm. The last simpler

Re: [HACKERS] UPDATE of partition key

2017-03-01 Thread Amit Khandekar
On 23 February 2017 at 16:02, Amit Langote wrote: > >> 2. In the patch, as part of the row movement, ExecDelete() is called >> followed by ExecInsert(). This is done that way, because we want to >> have the ROW triggers on that (sub)partition executed. If a user has

Re: [HACKERS] PATCH: two slab-like memory allocators

2017-03-01 Thread Andres Freund
On 2017-03-02 04:47:13 +0100, Tomas Vondra wrote: > On 03/01/2017 11:55 PM, Andres Freund wrote: > > On 2017-02-28 20:29:36 -0800, Andres Freund wrote: > > > On 2017-02-28 20:18:35 -0800, Andres Freund wrote: > > > > - Andres, hoping the buildfarm turns greener > > > > > > Oh well, that didn't

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-03-01 Thread vinayak
On 2017/02/28 16:54, Masahiko Sawada wrote: I've created a wiki page[1] describing about the design and functionality of this feature. Also it has some examples of use case, so this page would be helpful for even testing. Please refer it if you're interested in testing this feature. [1] 2PC

Re: [HACKERS] PATCH: two slab-like memory allocators

2017-03-01 Thread Tomas Vondra
On 03/01/2017 05:18 AM, Andres Freund wrote: On 2017-02-28 10:41:22 -0800, Andres Freund wrote: Hi, On 2017-02-27 23:44:20 -0800, Andres Freund wrote: *preliminary* patch attached. This needs a good bit of polishing (primarily comment work, verifying that valgrind works), but I'm too tired

Re: [HACKERS] SerializedSnapshotData alignment

2017-03-01 Thread Noah Misch
On Mon, Feb 27, 2017 at 03:08:35PM +1300, Thomas Munro wrote: > On Mon, Feb 27, 2017 at 2:18 PM, Noah Misch wrote: > > I wondered the same thing; if nothing else, why don't protosciurus and > > castoroides fail the same way? They do use older compilers, "Sun C 5.10 > >

Re: [HACKERS] Radix tree for character conversion

2017-03-01 Thread Kyotaro HORIGUCHI
At Wed, 1 Mar 2017 14:34:23 +0900, Michael Paquier wrote in > On Tue, Feb 28, 2017 at 5:34 PM, Kyotaro HORIGUCHI > wrote: > > At Tue, 28 Feb 2017 15:20:06 +0900,

Re: [HACKERS] PATCH: two slab-like memory allocators

2017-03-01 Thread Tomas Vondra
On 03/01/2017 11:55 PM, Andres Freund wrote: On 2017-02-28 20:29:36 -0800, Andres Freund wrote: On 2017-02-28 20:18:35 -0800, Andres Freund wrote: - Andres, hoping the buildfarm turns greener Oh well, that didn't work. Investigating. The fix for that was fairly trivial, and the buildfarm

Re: [HACKERS] \h tab-completion

2017-03-01 Thread Kyotaro HORIGUCHI
Hello, At Wed, 1 Mar 2017 08:47:15 -0500, Peter Eisentraut wrote in > On 2/3/17 07:12, Andreas Karlsson wrote: > > On 01/25/2017 07:13 AM, Michael Paquier wrote: > >> What I think you should do is making

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-03-01 Thread Ashutosh Bapat
Updated 0001 patch with some more comments. Attaching all the patches for quick access. On Wed, Mar 1, 2017 at 2:26 PM, Ashutosh Bapat wrote: >> >> 2. If the PartitionJoinPath emerges as the best path, we create paths >> for each of the remaining child-joins.

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-01 Thread Ashutosh Bapat
>> >> Isn't list_range_parted multilevel partitioned table. It gets dropped >> in the testcases. So, I guess, we already have a testcase there. > > I thought Simon meant the test case where a partition that is itself > partitioned is dropped. At least that's what I took from "... fails *on* >

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-03-01 Thread Kyotaro HORIGUCHI
Hello, At Tue, 28 Feb 2017 10:39:01 -0500, Stephen Frost wrote in <20170228153901.gh9...@tamriel.snowman.net> > * David Fetter (da...@fetter.org) wrote: > > On Mon, Feb 27, 2017 at 11:53:17PM -0500, Stephen Frost wrote: > > > * Kyotaro HORIGUCHI

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-01 Thread Stas Kelvich
> On 2 Mar 2017, at 01:20, Petr Jelinek wrote: > > The info gets removed on COMMIT PREPARED but at that point > there is no real difference between replicating it as 2pc or 1pc since > the 2pc behavior is for all intents and purposes lost at that point. > If we

Re: [HACKERS] Patch to improve performance of replay of AccessExclusiveLock

2017-03-01 Thread Amit Kapila
On Wed, Mar 1, 2017 at 5:32 PM, David Rowley wrote: > Hackers, > > I've attached a small patch which aims to improve the performance of > AccessExclusiveLock when there are many AccessExclusiveLock stored. > I could see that your idea is quite straightforward to

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Josh Soref
0001-spelling-comments.patch Description: Binary data 0002-spelling-strings.patch Description: Binary data 0003-spelling-sgml.patch Description: Binary data 0004-spelling-variables.patch Description: Binary data 0005-spelling-misc.patch Description: Binary data -- Sent via

Re: [HACKERS] PATCH: two slab-like memory allocators

2017-03-01 Thread Andres Freund
On 2017-03-02 04:36:23 +0100, Tomas Vondra wrote: > I've noticed two minor typos: > > 1) That is solved this by creating ... >- extra "this" > > 2) Given this, routines like pfree their corresponding context ... >- missing "find" or "determine" Will fix. > I also see you've explicitly

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-01 Thread Andres Freund
On 2017-03-01 19:25:23 -0600, Jim Nasby wrote: > On 2/28/17 11:21 AM, Andreas Karlsson wrote: > > The only downside I can see to this approach is that we no logner will > > able to reindex catalog tables concurrently, but in return it should be > > easier to confirm that this approach can be made

Re: [HACKERS] multivariate statistics (v24)

2017-03-01 Thread Kyotaro HORIGUCHI
Hello, At Thu, 2 Mar 2017 04:05:34 +0100, Tomas Vondra wrote in > OK, > > attached is v24 of the patch series, addressing most of the reported > issues and comments (at least I believe so). The main changes

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-01 Thread Corey Huinker
On Thu, Mar 2, 2017 at 1:23 AM, Fabien COELHO wrote: > > Hello Corey, > > That is accurate. The only positive it has is that the user only >> experiences one error, and it's the first error that was encountered if >> reading top-to-bottom, left to right. It is an issue of

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Josh Soref
Peter Eisentraut wrote: > Yes, some of that was committed, and some comments were offered. If > there is more to do, please send a rebased patch set. Conflicting comments were offered. And Heikki requested I send along the remainder. Which I did. Only one of those patches would have been

Re: [HACKERS] many copies of atooid() and oid_cmp()

2017-03-01 Thread Peter Eisentraut
On 1/12/17 09:36, Tom Lane wrote: > Peter Eisentraut writes: >> On 1/11/17 11:25 PM, Tom Lane wrote: >>> +1 for the concept, but I'm a bit worried about putting atooid() in >>> postgres_ext.h. That's going to impose on the namespace of libpq-using >>>

Re: [HACKERS] objsubid vs subobjid

2017-03-01 Thread Peter Eisentraut
On 3/1/17 09:51, Alvaro Herrera wrote: > Peter Eisentraut wrote: >> On 2/22/17 19:35, Jim Nasby wrote: >>> pg_get_object_address() currently returns a field called subobjid, while >>> pg_depend calls that objsubid. I'm guessing that wasn't on purpose >>> (especially because internally the

Re: [HACKERS] log_autovacuum_min_duration doesn't log VACUUMs

2017-03-01 Thread Jeff Janes
On Wed, Mar 1, 2017 at 6:43 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2/10/17 03:38, Simon Riggs wrote: > > I guess its fairly obvious in the title, but > > log_autovacuum_min_duration doesn't log VACUUMs only autovacuums. > > > > What isn't obvious is why that

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Josh Soref
I understood that they were git commits. I could have excluded the file but opted not to in case people were willing to take a small drift -- the SHAs are what someone needs to review the commit, and personally, I'd rather read something without typos than with -- especially in a summary. But,

Re: [pgsql-www] [HACKERS] Small issue in online devel documentation build

2017-03-01 Thread Fabien COELHO
Hello Peter, I wrote a few lines of perl to move replaceable out of option and did some manual editing is special cases, the resulting simple 359 changes is attached. If the stylesheet produces unpleasant output, then the stylesheet should be changed. Sure. I'm not sure whether it is a

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-01 Thread Pavel Stehule
> > > >1. > >Added explicit casts bytea=>jsonb and jsonb=>bytea (for jsonb=>bytea >output using RETURNING bytea FORMAT JSONB and corresponding bytea=>jsonb >input using FORMAT JSONB). > > This point has sense in Oracle, where JSON is blob. But it is little bit obscure in

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-01 Thread Corey Huinker
On Wed, Mar 1, 2017 at 3:07 AM, Fabien COELHO wrote: > > Hello Corey, > > It doesn't strike me as much cleaner, but it's no worse, either. >> > > Hmmm. > > The "if (x) { x = ... ; if (x) {" does not help much to improve > readability and understandability... > > My 0.02€

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Josh Soref
I can easily drop the shutdown* items; The reason for rowMarks is consistency with lr_arowMarks. I'll tentatively exclude that from any resubmission I make tonight... -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Josh Soref
I'll include it. -- 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] Restricting maximum keep segments by repslots

2017-03-01 Thread Peter Eisentraut
On 2/27/17 22:27, Kyotaro HORIGUCHI wrote: > This patch adds a GUC to put a limit to the number of segments > that replication slots can keep. Please measure it in size, not in number of segments. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Alvaro Herrera
Josh Soref wrote: > One thing that would be helpful is if someone could comment on: > https://github.com/jsoref/postgres/commit/9050882d601134ea1ba26f77ce5f1aaed75418de > -#undef SH_ITERTOR > +#undef SH_ITERATOR > > It's unclear to me what that line is/was doing. It's possible that it > could be

Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC

2017-03-01 Thread Masahiko Sawada
On Tue, Feb 28, 2017 at 10:42 PM, Pavan Deolasee wrote: > Hello All, > > During the second heap scan of CREATE INDEX CONCURRENTLY, we're only > interested in the tuples which were inserted after the first scan was > started. All such tuples can only exists in pages which

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Peter Eisentraut
On 2/27/17 23:27, Petr Jelinek wrote: >>> WARNING: restart LSN of replication slots is ignored by checkpoint >>> DETAIL: Some replication slots lose required WAL segnents to continue. > However this is dangerous as logical replication slot does not consider > it error when too old LSN is

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-01 Thread Fabien COELHO
Hello Corey, on elif if misplaced elif misplaced elif error else eval expression => possible eval error set new status if eval fine Currently it is really: switch (state) { case NONE: case ELSE_TRUE: case ELSE_FALSE: success = false; show some error

Re: [HACKERS] pg_dump, pg_dumpall and data durability

2017-03-01 Thread David Steele
On 1/22/17 11:02 PM, Michael Paquier wrote: > On Tue, Nov 29, 2016 at 1:30 PM, Michael Paquier > wrote: >> On Mon, Nov 14, 2016 at 6:07 PM, Michael Paquier >> wrote: >>> On Mon, Nov 14, 2016 at 6:04 PM, Albe Laurenz

Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional

2017-03-01 Thread David Steele
On 3/1/17 5:11 PM, Jim Nasby wrote: > On 2/27/17 6:25 PM, David Steele wrote: >> The purpose of this patch is to make waiting for archive optional, with >> the default being the current behavior, i.e., to wait for all WAL to be >> archived. This functionality is already used internally by >>

Re: [HACKERS] patch: function xmltable

2017-03-01 Thread Pavel Stehule
Hi 2017-03-02 1:12 GMT+01:00 Alvaro Herrera : > > I've been giving this a look. I started by tweaking the docs once > again, and while verifying that the example works as expected, I > replayed what I have in sgml: > > ... begin SGML paste ... > > For

Re: [HACKERS] user mapping messages

2017-03-01 Thread Ashutosh Bapat
On Thu, Feb 23, 2017 at 8:06 PM, Andrew Dunstan wrote: > > While reviewing the IF NOT EXISTS patch for CREATE USER MAPPING I > noticed that in several places we treat the user name as the name of the > user mapping. Strictly ISTM that user mappings are really

Re: [HACKERS] UPDATE of partition key

2017-03-01 Thread Amit Langote
On 2017/02/26 4:01, David G. Johnston wrote: > IIUC ​it is already possible, for those who care to do so, to get a > serialization failure in this scenario by upgrading isolation to repeatable > read. Maybe, this can be added as a note in the documentation. Thanks, Amit -- Sent via

Re: [HACKERS] Patch: Optimize memory allocation in function 'bringetbitmap'

2017-03-01 Thread Alvaro Herrera
Alvaro Herrera wrote: > Jinyu Zhang wrote: > > > Update the patch_brin_optimze_mem according to your comment. > > I have added this patch to the commitfest, which I've been intending to > get in for a long time. I'll be submitting an updated patch soon. Here it is. I addressed some of Tomas'

Re: [HACKERS] ANALYZE command progress checker

2017-03-01 Thread Andres Freund
On 2017-03-01 10:20:41 -0800, David Fetter wrote: > On Wed, Mar 01, 2017 at 09:45:40AM -0500, Peter Eisentraut wrote: > > On 2/28/17 04:24, vinayak wrote: > > > The view provides the information of analyze command progress details as > > > follows > > > postgres=# \d pg_stat_progress_analyze > >

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-01 Thread Corey Huinker
On Wed, Mar 1, 2017 at 12:23 PM, Fabien COELHO wrote: > > Hello Corey, > > on elif >> if misplaced elif >> misplaced elif error >> else >> eval expression >> => possible eval error >> set new status if eval fine >> > > Currently it is really: > > switch

Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2]

2017-03-01 Thread Tels
Hello all, as this is my first mail to pgsql-hackers, please be gentle :) I've looked at the patch, and as I'm not that familiar with the pg-sourcecode, customs and so on, this isn't a review, more like food for thought and all should be taken with a grain of salt. :) So here are a few

Re: [HACKERS] ANALYZE command progress checker

2017-03-01 Thread Andres Freund
On 2017-03-01 10:25:49 -0800, Andres Freund wrote: > We now have a framework for this [1] (currently used by vacuum, but > extensible). The question is about presentation. I'm fairly sure that > we shouldn't just add yet another framework, and I doubt that that's > what's proposed by Peter. > >

Re: [HACKERS] Possible spelling fixes

2017-03-01 Thread Andres Freund
On 2017-03-01 14:40:26 -0300, Alvaro Herrera wrote: > Josh Soref wrote: > > > One thing that would be helpful is if someone could comment on: > > https://github.com/jsoref/postgres/commit/9050882d601134ea1ba26f77ce5f1aaed75418de > > -#undef SH_ITERTOR > > +#undef SH_ITERATOR > > > > It's unclear

Re: [HACKERS] ANALYZE command progress checker

2017-03-01 Thread David Fetter
On Wed, Mar 01, 2017 at 09:45:40AM -0500, Peter Eisentraut wrote: > On 2/28/17 04:24, vinayak wrote: > > The view provides the information of analyze command progress details as > > follows > > postgres=# \d pg_stat_progress_analyze > >View "pg_catalog.pg_stat_progress_analyze" > >

Re: [HACKERS] Logical replication existing data copy

2017-03-01 Thread Petr Jelinek
On 28/02/17 20:36, Erik Rijkers wrote: > This is the most frequent error that happens while doing pgbench-runs > over logical replication: I run it continuously all day, and every few > hours an error occurs of the kind seen below: a table (pgbench_history, > mostly) ends up 1 row short (673466

Re: [HACKERS] timeouts in PostgresNode::psql

2017-03-01 Thread Peter Eisentraut
On 2/26/17 21:28, Craig Ringer wrote: > Amended patch attached after a few Perl-related comments I got on > private mail. Instead of > > $exc_save !~ /^$timeout_exception.*/ > > I've updated to: > > $exc_save !~ /^\Q$timeout_exception\E/ > > i.e. don't do an unnecessary wildcard match at the

Re: [HACKERS] ANALYZE command progress checker

2017-03-01 Thread David Fetter
On Wed, Mar 01, 2017 at 10:28:23AM -0800, Andres Freund wrote: > On 2017-03-01 10:25:49 -0800, Andres Freund wrote: > > We now have a framework for this [1] (currently used by vacuum, but > > extensible). The question is about presentation. I'm fairly sure that > > we shouldn't just add yet

Re: [HACKERS] ANALYZE command progress checker

2017-03-01 Thread Andres Freund
On March 1, 2017 11:34:48 AM PST, David Fetter wrote: >I notice that that commit has no SGML component. Should it have one? Don't think so. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] 2017-03 Commitfest In Progress

2017-03-01 Thread Thomas Munro
On Thu, Mar 2, 2017 at 4:42 AM, David Steele wrote: > The 2017-03 commitfest is now in progress. Here's the breakdown: > > Needs review: 128 > Waiting on Author: 26 > Ready for Committer: 26 > Total: 180 Not quite a record haul but close. -- Thomas Munro

Re: [HACKERS] Statement-level rollback

2017-03-01 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tom Lane > "Tsunakawa, Takayuki" writes: > > As I stated here and at the PGConf.ASIA developer meeting last year, > > I'd like to propose statement-level rollback

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-01 Thread Fabien COELHO
Hello Corey, It doesn't strike me as much cleaner, but it's no worse, either. Hmmm. The "if (x) { x = ... ; if (x) {" does not help much to improve readability and understandability... My 0.02€ about v19: If there are two errors, I do not care which one is shown, both will have to be

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-03-01 Thread Ashutosh Bapat
> > 2. If the PartitionJoinPath emerges as the best path, we create paths > for each of the remaining child-joins. Then we collect paths with > properties same as the given PartitionJoinPath, one from each > child-join. These paths are converted into plans and a Merge/Append > plan is created

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
Hi Aleksander, On Tue, 28 Feb 2017 18:05:36 +0300 Aleksander Alekseev wrote: > Hi, Yugo. > > Looks like a great feature! I'm going to take a closer look on your code > and write a feedback shortly. For now I can only tell that you forgot > to include some

Re: [HACKERS] timeouts in PostgresNode::psql

2017-03-01 Thread Craig Ringer
On 28 February 2017 at 20:39, Alvaro Herrera wrote: > Lately I've been wondering about backpatching the whole TAP test > infrastructure, all the way back. As we notice bugs, it's really useful > to use newly added tests in all branches; but currently PostgresNode >

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-01 Thread Robert Haas
On Tue, Feb 28, 2017 at 7:31 PM, Amit Kapila wrote: > Yeah, actually those were added later in Enable-WAL-for-Hash* patch, > but I think as this patch is standalone, so we should not remove it > from their existing usage, I have added those back and rebased the >

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-01 Thread Craig Ringer
On 9 February 2017 at 21:23, Stas Kelvich wrote: >> On 2 Feb 2017, at 00:35, Craig Ringer wrote: >> >> Stas was concerned about what happens in logical decoding if we crash >> between PREPSRE TRANSACTION and COMMIT PREPARED. But we'll always go

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2017-03-01 Thread Thomas Munro
On Sat, Feb 11, 2017 at 1:52 AM, Robert Haas wrote: > On Thu, Feb 9, 2017 at 6:38 PM, Thomas Munro > wrote: >> Yes, potentially unbounded in rare case. If we plan for N batches, >> and then run out of work_mem because our estimates were just

Re: [HACKERS] WIP: [[Parallel] Shared] Hash

2017-03-01 Thread Thomas Munro
On Thu, Feb 16, 2017 at 9:08 PM, Thomas Munro wrote: > On Thu, Feb 16, 2017 at 3:36 PM, Andres Freund wrote: >> That's it for now... > > Thanks! Plenty for me to go away and think about. I will post a new > version soon. I'm testing a new

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Robert Haas
On Tue, Feb 28, 2017 at 10:04 AM, Michael Paquier wrote: > It would make more sense to just switch max_wal_size from a soft to a > hard limit. The current behavior is not cool with activity spikes. Having a hard limit on WAL size would be nice, but that's a different

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
Hi Ammit, On Wed, 1 Mar 2017 11:14:15 +0900 Amit Langote wrote: > Nagata-san, > > On 2017/02/28 23:33, Yugo Nagata wrote: > > Hi all, > > > > Now we have a declarative partitioning, but hash partitioning is not > > implemented yet. Attached is a POC patch to add

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-03-01 Thread Peter Moser
2017-02-15 20:24 GMT+01:00 Robert Haas : > There's no documentation in this patch. I'm not sure you want to go > to the trouble of writing SGML documentation until this has been > reviewed enough that it has a real chance of getting committed, but on > the other hand we're

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
On Wed, 1 Mar 2017 10:30:09 +0530 Rushabh Lathia wrote: > On Tue, Feb 28, 2017 at 8:03 PM, Yugo Nagata wrote: > > > Hi all, > > > > Now we have a declarative partitioning, but hash partitioning is not > > implemented yet. Attached is a POC patch

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
On Wed, 1 Mar 2017 10:52:58 +0530 amul sul wrote: > On Tue, Feb 28, 2017 at 8:03 PM, Yugo Nagata wrote: > > Hi all, > > > > Now we have a declarative partitioning, but hash partitioning is not > > implemented yet. Attached is a POC patch to add the hash

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-01 Thread Jan Michálek
Sorry, I have some errors in my diff, i had copy something from bad folder. I will fix it. 2017-03-01 0:27 GMT+01:00 Jan Michálek : > There it is, what i have. > I need i small help with psql.out, because \pset format wrapped. I don`t > know, how to have it in fixed

  1   2   >