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

2017-03-06 Thread Jan Michálek
2017-03-05 14:02 GMT+01:00 Jan Michálek : > > > 2017-03-05 13:39 GMT+01:00 Pavel Stehule : > >> >> >> 2017-03-05 13:22 GMT+01:00 Pavel Stehule : >> >>> >>> >>> 2017-03-05 13:08 GMT+01:00 Jan Michálek

Re: [HACKERS] Declarative partitioning optimization for large amount of partitions

2017-03-06 Thread Aleksander Alekseev
Hello. OK, here is a patch. Benchmark, before: ``` number of transactions actually processed: 1823 latency average = 1153.495 ms latency stddev = 154.366 ms tps = 6.061104 (including connections establishing) tps = 6.061211 (excluding connections establishing) ``` Benchmark, after: ``` number

Re: [HACKERS] RADIUS fallback servers

2017-03-06 Thread Adam Brightwell
>> I wonder if removing the complexity of maintaining two separate lists >> for the server and port would be a better/less complex approach. For >> instance, why not go with a list of typical 'host:port' strings for >> 'radiusservers'? If no port is specified, then simply use the default >> for

Re: [HACKERS] [PATCH] Teach Catalog.pm how many attributes there should be per DATA() line

2017-03-06 Thread Dagfinn Ilmari Mannsåker
Hi David, Here's a review of your patch. David Christensen writes: > Throws a build error if we encounter a different number of fields in a > DATA() line than we expect for the catalog in question. The patch is a good idea, and as-is implements the suggested feature.

Re: [HACKERS] Logical replication existing data copy

2017-03-06 Thread Erik Rijkers
On 2017-03-06 11:27, Petr Jelinek wrote: Hi, updated and rebased version of the patch attached. I compiled with /only/ this one latest patch: 0001-Logical-replication-support-for-initial-data-copy-v6.patch Is that correct, or are other patches still needed on top, or underneath?

Re: [HACKERS] PATCH: psql show index with type info

2017-03-06 Thread Amos Bird
Yeah, I'm thinking about that too. Here is a full list of the original type values, "Schema" "Name" "table" "view" "materialized view" "index" "sequence" "special" "foreign table" "table" What else do you think will benefit from extra type information? regards, Amos Stephen Frost

Re: [HACKERS] [BUGS] Seems bug in postgres_fdw?

2017-03-06 Thread Rader, David
On Sat, Mar 4, 2017 at 12:52 AM, Robert Haas wrote: > On Thu, Mar 2, 2017 at 3:28 AM, Rader, David wrote: > > Attached is a doc patch that updates the documentation for postgres-fdw > to > > include the actual values for the 4 session variables that

Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver

2017-03-06 Thread Peter Eisentraut
On 3/4/17 01:45, Petr Jelinek wrote: > I can see one difference though (I didn't see this code before) and that > is, the connectDBComplete starts with waiting for socket to become > writable and only then calls PQconnectPoll, while my patch starts with > PQconnectPoll call. And I see following

Re: [HACKERS] PATCH: psql show index with type info

2017-03-06 Thread Stephen Frost
Amos, * Amos Bird (amosb...@gmail.com) wrote: > Well, the prefix is used to differentiate other \d commands, like > this, Ah, ok, fair enough. Should we consider differentiating different table types also? I suppose those are primairly just logged and unlogged, but I could see that being

Re: [HACKERS] PATCH: psql show index with type info

2017-03-06 Thread Amos Bird
Hello Stephen, Well, the prefix is used to differentiate other \d commands, like this, amos=# \ditv List of relations Schema |Name| Type | Owner | Table ++--+---+- public | i |

Re: [HACKERS] ANALYZE command progress checker

2017-03-06 Thread David Steele
On 3/6/17 1:58 AM, Andres Freund wrote: > On 2017-03-03 15:33:15 -0500, David Steele wrote: > >> I propose we move this to the 2017-07 CF so the idea can be more fully >> developed. > > I don't see that being warranted in this case, we're really not talking > about something complicated: <...>

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-06 Thread David Steele
On 3/6/17 8:17 AM, Robert Haas wrote: > On Mon, Mar 6, 2017 at 7:38 AM, Tom Lane wrote: >> Simon Riggs writes: >>> On 1 March 2017 at 01:58, David Steele wrote: PostgreSQL currently requires the file mode mask (umask) to be

Re: [HACKERS] dump a comment of a TSDictionary

2017-03-06 Thread Stephen Frost
Greeting,s * Giuseppe Broccolo (giuseppe.brocc...@2ndquadrant.it) wrote: > I've seen that pg_dump execute the dump of an eventual comment of a > TSDictionary without > specifying the namespace where it is defined: Great catch! > This is actually a problem if a new TSDictionary is created, in a

Re: [HACKERS] PATCH: psql show index with type info

2017-03-06 Thread Stephen Frost
Greetings, * Amos Bird (amosb...@gmail.com) wrote: > psql currently supports \di+ to view indexes, > > List of relations > Schema |Name| Type | Owner | Table | Size | Description >

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-06 Thread David Steele
On 3/6/17 8:50 AM, Stephen Frost wrote: > * Simon Riggs (si...@2ndquadrant.com) wrote: >>> to allow the default mode of files and directories >>> in the $PGDATA directory to be modified. >> >> Are you saying if this is changed all files/directories will be >> changed to the new mode? > > No, new

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-06 Thread Amit Kapila
On Mon, Mar 6, 2017 at 1:37 PM, Kyotaro HORIGUCHI wrote: > Ok, I think I understand the complete picture. > > At Mon, 06 Mar 2017 15:58:56 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI > wrote in >

Re: [HACKERS] Change in "policy" on dump ordering?

2017-03-06 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 3/6/17 03:33, Michael Banck wrote: > > Would this be a candidate for backpatching, or is the behaviour change > > in pg_dump trumping the issues it solves? > > Unless someone literally has a materialized view on pg_policy, it >

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

2017-03-06 Thread Thomas Munro
On Wed, Mar 1, 2017 at 10:29 PM, Thomas Munro wrote: > I'm testing a patch that lets you set up a fixed sized > SharedBufFileSet object in a DSM segment, with its own refcount for > the reason you explained. It supports a dynamically expandable set of > numbered

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

2017-03-06 Thread Thomas Munro
On Wed, Mar 1, 2017 at 10:40 PM, Thomas Munro wrote: > I'm testing a new version which incorporates feedback from Andres and > Ashutosh, and is refactored to use a new SharedBufFileSet component to > handle batch files, replacing the straw-man implementation from

Re: [HACKERS] Faster methods for getting SPI results

2017-03-06 Thread Jim Nasby
On 3/2/17 8:03 AM, Peter Eisentraut wrote: On 12/20/16 23:14, Jim Nasby wrote: I've been looking at the performance of SPI calls within plpython. There's a roughly 1.5x difference from equivalent python code just in pulling data out of the SPI tuplestore. Some of that is due to an inefficiency

Re: [HACKERS] Change in "policy" on dump ordering?

2017-03-06 Thread Jim Nasby
On 3/4/17 11:49 AM, Peter Eisentraut wrote: I wonder whether we should emphasize this change by assigning DO_REFRESH_MATVIEW a higher number, like 100? Since there wasn't any interest in that idea, I have committed Jim's patch as is. Thanks. Something else that seems somewhat useful would be

Re: [HACKERS] objsubid vs subobjid

2017-03-06 Thread Jim Nasby
On 3/1/17 9:24 AM, Peter Eisentraut wrote: 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

Re: [HACKERS] Faster methods for getting SPI results (460% improvement)

2017-03-06 Thread Jim Nasby
On 2/28/17 9:42 PM, Jim Nasby wrote: I'll post a plpython patch that doesn't add the output format control. I've attached the results of that. Unfortunately the speed improvement is only 27% at this point (with 999 tuples). Presumably that's because it's constructing a brand new

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-06 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Simon Riggs writes: > > On 1 March 2017 at 01:58, David Steele wrote: > >> PostgreSQL currently requires the file mode mask (umask) to be 0077. > >> However, this precludes the possibility of a user in the

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-06 Thread Stephen Frost
Greetings, * Simon Riggs (si...@2ndquadrant.com) wrote: > On 1 March 2017 at 01:58, David Steele wrote: > > PostgreSQL currently requires the file mode mask (umask) to be 0077. > > However, this precludes the possibility of a user in the postgres group > > performing a

Re: [HACKERS] Parallel Index Scans

2017-03-06 Thread Amit Kapila
On Mon, Mar 6, 2017 at 6:49 PM, Robert Haas wrote: > On Mon, Mar 6, 2017 at 6:33 AM, Amit Kapila wrote: > > I was going to do it after index and index-only scans and parallel > bitmap heap scan were committed, but I've been holding off on >

Re: [HACKERS] Parallel Index Scans

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 6:33 AM, Amit Kapila wrote: > On Mon, Mar 6, 2017 at 4:57 PM, Michael Banck > wrote: >> Hi, >> >> On Thu, Feb 16, 2017 at 08:14:28AM +0530, Amit Kapila wrote: >>> On Thu, Feb 16, 2017 at 12:27 AM, Robert Haas

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 7:38 AM, Tom Lane wrote: > Simon Riggs writes: >> On 1 March 2017 at 01:58, David Steele wrote: >>> PostgreSQL currently requires the file mode mask (umask) to be 0077. >>> However, this precludes the

Re: [HACKERS] Proposal : Parallel Merge Join

2017-03-06 Thread Dilip Kumar
On Fri, Mar 3, 2017 at 3:57 PM, Robert Haas wrote: > I'm not happy with the way this patch can just happen to latch on to a > path that's not parallel-safe rather than one that is and then just > give up on a merge join in that case. I already made this argument in >

[HACKERS] dump a comment of a TSDictionary

2017-03-06 Thread Giuseppe Broccolo
Hi hackers, I've seen that pg_dump execute the dump of an eventual comment of a TSDictionary without specifying the namespace where it is defined: https://github.com/postgres/postgres/blob/master/src/bin/pg_dump/pg_dump.c#L13542 This is actually a problem if a new TSDictionary is created, in a

Re: [HACKERS] One-shot expanded output in psql using \gx

2017-03-06 Thread Christoph Berg
Re: Daniel Verite 2017-03-03 <4d84079e-325b-48c5-83e6-bb54bb567...@manitou-mail.org> > - tab-completion: works but the list in tab-complete.c:backslash_commands[] > is sorted alphabetically so "\\gx" should come after "\\gset" Good catch, it was still in that place from when it was named \G. In

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-06 Thread Tom Lane
Simon Riggs writes: > On 1 March 2017 at 01:58, David Steele wrote: >> PostgreSQL currently requires the file mode mask (umask) to be 0077. >> However, this precludes the possibility of a user in the postgres group >> performing a backup (or whatever).

Re: [HACKERS] [COMMITTERS] pgsql: Allow vacuums to report oldestxmin

2017-03-06 Thread Masahiko Sawada
On Fri, Mar 3, 2017 at 10:50 PM, Simon Riggs wrote: > Allow vacuums to report oldestxmin > > Allow VACUUM and Autovacuum to report the oldestxmin value they > used while cleaning tables, helping to make better sense out of > the other statistics we report in various cases.

Re: [HACKERS] objsubid vs subobjid

2017-03-06 Thread Peter Eisentraut
On 3/5/17 16:10, Jim Nasby wrote: > BTW, did you backpatch as well? The function was added in 9.5. > Presumably we wouldn't normally do that, but if we think this is unused > enough maybe it's worth it. It's a catalog change, so we can't backpatch it. -- Peter Eisentraut

Re: [HACKERS] Change in "policy" on dump ordering?

2017-03-06 Thread Peter Eisentraut
On 3/6/17 03:33, Michael Banck wrote: > Would this be a candidate for backpatching, or is the behaviour change > in pg_dump trumping the issues it solves? Unless someone literally has a materialized view on pg_policy, it wouldn't make a difference, so I'm not very keen on bothering to backpatch

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-06 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 1:29 PM, David Rowley wrote: > On 6 March 2017 at 18:51, Etsuro Fujita wrote: >> On 2017/03/06 11:05, David Rowley wrote: >>> The attached patch, based on 9.6, fixes the problem by properly >>> processing the

Re: [HACKERS] Parallel Index Scans

2017-03-06 Thread Amit Kapila
On Mon, Mar 6, 2017 at 4:57 PM, Michael Banck wrote: > Hi, > > On Thu, Feb 16, 2017 at 08:14:28AM +0530, Amit Kapila wrote: >> On Thu, Feb 16, 2017 at 12:27 AM, Robert Haas wrote: >> > On Wed, Feb 15, 2017 at 1:39 PM, Robert Haas

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-06 Thread Simon Riggs
On 1 March 2017 at 01:58, David Steele wrote: > PostgreSQL currently requires the file mode mask (umask) to be 0077. > However, this precludes the possibility of a user in the postgres group > performing a backup (or whatever). Now that > pg_start_backup()/pg_stop_backup()

Re: [HACKERS] Parallel Index Scans

2017-03-06 Thread Michael Banck
Hi, On Thu, Feb 16, 2017 at 08:14:28AM +0530, Amit Kapila wrote: > On Thu, Feb 16, 2017 at 12:27 AM, Robert Haas wrote: > > On Wed, Feb 15, 2017 at 1:39 PM, Robert Haas wrote: > >> On Wed, Feb 15, 2017 at 7:11 AM, Amit Kapila

[HACKERS] PATCH: psql show index with type info

2017-03-06 Thread Amos Bird
psql currently supports \di+ to view indexes, List of relations Schema |Name| Type | Owner | Table | Size | Description ++---+---+-++- public | ii | index | amos

Re: [HACKERS] Logical Replication and Character encoding

2017-03-06 Thread Petr Jelinek
On 06/03/17 11:06, Kyotaro HORIGUCHI wrote: > At Fri, 3 Mar 2017 21:31:24 -0500, Peter Eisentraut > wrote in > <88397afa-a8ec-8d8a-1c94-94a4795a3...@2ndquadrant.com> >> On 3/3/17 14:51, Petr Jelinek wrote: >>> On 03/03/17 20:37, Peter Eisentraut wrote: On

Re: [HACKERS] Logical Replication and Character encoding

2017-03-06 Thread Kyotaro HORIGUCHI
At Fri, 3 Mar 2017 21:31:24 -0500, Peter Eisentraut wrote in <88397afa-a8ec-8d8a-1c94-94a4795a3...@2ndquadrant.com> > On 3/3/17 14:51, Petr Jelinek wrote: > > On 03/03/17 20:37, Peter Eisentraut wrote: > >> On 2/27/17 00:23, Kyotaro HORIGUCHI wrote: > >>> Yeah,

Re: [HACKERS] UPDATE of partition key

2017-03-06 Thread Amit Langote
Hi, On 2017/03/02 15:23, Amit Khandekar wrote: > 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

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-06 Thread Ashutosh Bapat
> > > I understood you reasoning of why startup_cost = input_startup_cost and not > input_total_cost for aggregation by sorting. But what I didn't understand is > how come higher startup cost for aggregation by sorting would force hash > aggregation to be chosen? I am not clear about this part.

Re: [HACKERS] ANALYZE command progress checker

2017-03-06 Thread vinayak
On 2017/03/06 17:02, Amit Langote wrote: Hi Vinayak, On 2017/02/28 18:24, vinayak wrote: The attached patch reports the different phases of analyze command. Added this patch to CF 2017-03. In the updated monitoring.sgml: + + computing heap stats + + VACUUM is currently

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-06 Thread Kyotaro HORIGUCHI
Thank you for the comment. At Fri, 3 Mar 2017 14:47:20 -0500, Peter Eisentraut wrote in > On 3/1/17 19:54, Kyotaro HORIGUCHI wrote: > >> Please measure it in size, not in number of segments. > > It was

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-06 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 11:12 AM, Ashutosh Bapat wrote: > On Mon, Mar 6, 2017 at 11:05 AM, Simon Riggs wrote: >> On 6 March 2017 at 05:29, Ashutosh Bapat >> wrote: >> >>> Just to confirm, you want the output

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-06 Thread Rushabh Lathia
Thanks Ashutosh & Robert for the explanation. On Mon, Mar 6, 2017 at 10:02 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Sat, Mar 4, 2017 at 2:50 PM, Robert Haas wrote: > > On Thu, Mar 2, 2017 at 6:48 PM, Ashutosh Bapat > >

Re: [HACKERS] Logical replication and inheritance

2017-03-06 Thread Amit Langote
On 2017/03/06 18:04, Amit Langote wrote: > One more option is for OpenTableList() called by CreatePublication() and > AlterPublicationTables() to not disregard inheritance, as if ONLY was > specified. Oops, meant to say: One more option is for OpenTableList to disregard inheritance... Thanks,

Re: [HACKERS] Logical replication and inheritance

2017-03-06 Thread Amit Langote
On 2017/03/04 4:24, Peter Eisentraut wrote: > On 2/27/17 01:57, Amit Langote wrote: >> I see that if the table is a inheritance parent, and ONLY is not >> specified, the child tables are also added to the publication. > >> If the child table is later removed from the inheritance hierarchy, it >>

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-06 Thread Kyotaro HORIGUCHI
By the way, At Mon, 06 Mar 2017 17:07:55 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170306.170755.68410634.horiguchi.kyot...@lab.ntt.co.jp> > Ok, I think I understand the complete picture. > > At Mon, 06 Mar 2017 15:58:56 +0900 (Tokyo Standard

Re: [HACKERS] Change in "policy" on dump ordering?

2017-03-06 Thread Michael Banck
Hi, On Sat, Mar 04, 2017 at 02:49:36PM -0500, Peter Eisentraut wrote: > On 3/1/17 08:36, Peter Eisentraut wrote: > > On 2/22/17 18:24, Jim Nasby wrote: > >>> Yes, by that logic matview refresh should always be last. > >> > >> Patches for head attached. > >> > >> RLS was the first item added after

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-06 Thread Ashutosh Bapat
> > We can leave it for the committer to decide, maybe. Committers often > rewrite surrounding comments to improve wording, correcting factual > errors, etc. > Sure. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company -- Sent via pgsql-hackers mailing list

Re: [HACKERS] wait events for disk I/O

2017-03-06 Thread Rushabh Lathia
On Sat, Mar 4, 2017 at 7:53 PM, Amit Kapila wrote: > On Mon, Feb 20, 2017 at 4:04 PM, Rushabh Lathia > wrote: > > > > My colleague Rahila reported compilation issue with > > the patch. Issue was only coming with we do the clean > > build on the

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-06 Thread Amit Langote
On 2017/03/06 17:01, Ashutosh Bapat wrote: > On Mon, Mar 6, 2017 at 1:26 PM, Amit Langote > wrote: >> On 2017/03/06 16:49, Ashutosh Bapat wrote: >>> On Mon, Mar 6, 2017 at 12:48 PM, Amit Langote wrote: On 2017/03/06 15:41, Michael Paquier wrote: > This

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-06 Thread Michael Paquier
On Mon, Mar 6, 2017 at 4:18 PM, Amit Langote wrote: > About autovacuum_* parameters - we currently don't handle partitioned > tables in autovacuum.c, because no statistics are reported for them. That > is, relation_needs_vacanalyze() will never return true for

Re: [HACKERS] Radix tree for character conversion

2017-03-06 Thread Kyotaro HORIGUCHI
Hello, At Fri, 3 Mar 2017 12:53:04 +0900, Michael Paquier wrote in > On Thu, Mar 2, 2017 at 2:20 PM, Kyotaro HORIGUCHI > wrote: > > 5) Just remove plain map files

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-06 Thread Kyotaro HORIGUCHI
Ok, I think I understand the complete picture. At Mon, 06 Mar 2017 15:58:56 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170306.155856.198084190.horiguchi.kyot...@lab.ntt.co.jp> > > I can guess two ways to fix this. One is change the definition of

[HACKERS] pg_dump segfaults with publication

2017-03-06 Thread Amit Langote
Hi, pg_dump segfaults if there are more than one DO_PUBLICATION_REL objects to dump. create table foo (a int); create publication foo_pub; alter publication foo_pub add table foo; $ pg_dump create table bar (a int); alter publication foo_pub add table bar; $ pg_dump -s Segmentation fault

Re: [HACKERS] ANALYZE command progress checker

2017-03-06 Thread Amit Langote
Hi Vinayak, On 2017/02/28 18:24, vinayak wrote: > The attached patch reports the different phases of analyze command. > Added this patch to CF 2017-03. In the updated monitoring.sgml: + + computing heap stats + + VACUUM is currently computing heap stats. + + + +

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-06 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 1:26 PM, Amit Langote wrote: > On 2017/03/06 16:49, Ashutosh Bapat wrote: >> On Mon, Mar 6, 2017 at 12:48 PM, Amit Langote wrote: >>> On 2017/03/06 15:41, Michael Paquier wrote: This comment is not completely correct. Children can be temp

<    1   2