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

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

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

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

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] 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 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] 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] 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] 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] 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] 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] 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: 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] 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] [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] 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] 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] [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 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] [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] 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] 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] 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] 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] 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] 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
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] 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] [PATCH] Teach Catalog.pm how many attributes there should be per DATA() line

2017-03-06 Thread Dagfinn Ilmari Mannsåker
David Christensen writes: >> Hi David, >> >> Here's a review of your patch. > > Hi Ilmari, thanks for your time and review. I’m fine with the revised > version. Okay, I've marked the patch as Ready For Committer. Thanks, Ilmari -- "The surreality of the universe tends

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

2017-03-06 Thread Robert Haas
On Wed, Mar 1, 2017 at 5:55 PM, Andres Freund wrote: > The issue was that on 32bit platforms the Datum returned by some > functions (int2int4_sum in this case) isn't actually a separately > allocated Datum, but rather just something embedded in a larger > struct. That,

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

2017-03-06 Thread Andres Freund
On 2017-03-06 12:40:18 -0500, Robert Haas wrote: > On Wed, Mar 1, 2017 at 5:55 PM, Andres Freund wrote: > > The issue was that on 32bit platforms the Datum returned by some > > functions (int2int4_sum in this case) isn't actually a separately > > allocated Datum, but rather

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

2017-03-06 Thread Jan Michálek
2017-03-06 16:25 GMT+01:00 Pavel Stehule : > > > 2017-03-06 16:17 GMT+01:00 Jan Michálek : > >> >> >> 2017-03-06 15:19 GMT+01:00 Pavel Stehule : >> >>> >>> >>> 2017-03-06 0:26 GMT+01:00 Jan Michálek

Re: [HACKERS] perlcritic

2017-03-06 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > 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

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

2017-03-06 Thread David Christensen
> Hi David, > > Here's a review of your patch. Hi Ilmari, thanks for your time and review. I’m fine with the revised version. Best, David -- David Christensen End Point Corporation da...@endpoint.com 785-727-1171 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

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

2017-03-06 Thread Robert Haas
On Sat, Mar 4, 2017 at 1:52 PM, Peter Geoghegan wrote: > On Sat, Mar 4, 2017 at 8:02 AM, Tom Lane wrote: >>> Perhaps there could be a choice of behaviors. Even if we all agreed >>> that parameter notation was better in theory, there's something to be >>> said

[HACKERS] [GSoC] Push-based query executor discussion

2017-03-06 Thread Arseny Sher
Hello, I would like to work on push-based executor [1] during GSoC, so I'm writing to introduce myself and start the discussion of the project. I think I should mention beforehand that the subject is my master's thesis topic, and I have already started working on it. This letter is not

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

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 12:53 PM, Stephen Frost wrote: > Regarding 02, I certainly see that as valuable for the reasons which > David outlined in his initial email. I can certainly take point on > getting it committed, but I wouldn't complain if someone else does > either.

Re: [HACKERS] Patch to implement pg_current_logfile() function

2017-03-06 Thread Robert Haas
On Sat, Mar 4, 2017 at 10:32 AM, Tom Lane wrote: > Without having actually looked at this patch, I would say that if it added > a direct call of fopen() to backend-side code, that was already the wrong > thing. Almost always, AllocateFile() would be a better choice, not only

Re: [HACKERS] RADIUS fallback servers

2017-03-06 Thread Adam Brightwell
On Mon, Mar 6, 2017 at 10:24 AM, Adam Brightwell wrote: >>> 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'

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

2017-03-06 Thread Robert Haas
On Sat, Mar 4, 2017 at 9:12 AM, David Steele wrote: > Yes, that makes sense. Attached are two patches as requested: > > 01 - Just marks pg_stop_backup() variants as parallel restricted > 02 - Add the wait_for_archive param to pg_stop_backup(). > > These apply cleanly on

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

2017-03-06 Thread Tomas Vondra
On 03/06/2017 07:05 PM, Robert Haas wrote: On Mon, Mar 6, 2017 at 12:44 PM, Andres Freund wrote: On 2017-03-06 12:40:18 -0500, Robert Haas wrote: On Wed, Mar 1, 2017 at 5:55 PM, Andres Freund wrote: The issue was that on 32bit platforms the Datum

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

2017-03-06 Thread Stephen Frost
Robert, all, * Robert Haas (robertmh...@gmail.com) wrote: > On Sat, Mar 4, 2017 at 9:12 AM, David Steele wrote: > > Yes, that makes sense. Attached are two patches as requested: > > > > 01 - Just marks pg_stop_backup() variants as parallel restricted > > 02 - Add the

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

2017-03-06 Thread Andres Freund
Hi, On 2017-03-06 19:49:56 +0100, Tomas Vondra wrote: > On 03/06/2017 07:05 PM, Robert Haas wrote: > > On Mon, Mar 6, 2017 at 12:44 PM, Andres Freund wrote: > > > On 2017-03-06 12:40:18 -0500, Robert Haas wrote: > > > > On Wed, Mar 1, 2017 at 5:55 PM, Andres Freund

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

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 12:44 PM, Andres Freund wrote: > On 2017-03-06 12:40:18 -0500, Robert Haas wrote: >> On Wed, Mar 1, 2017 at 5:55 PM, Andres Freund wrote: >> > The issue was that on 32bit platforms the Datum returned by some >> > functions

Re: [HACKERS] Statement-level rollback

2017-03-06 Thread Robert Haas
On Fri, Mar 3, 2017 at 2:15 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Peter Eisentraut >> On 2/28/17 02:39, Tsunakawa, Takayuki wrote: >> > I'd like to propose

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

2017-03-06 Thread Peter Eisentraut
On 3/5/17 05:40, Jan Michálek wrote: > jelen=# \pset linestyle rst > Line style is rst. > jelen=# \pset format wrapped > Output format is wrapped. > jelen=# SELECT repeat('Goodnight Irene ', 30); > +-+ > |

Re: [HACKERS] Parallel Index Scans

2017-03-06 Thread Gavin Flower
On 07/03/17 02:46, Amit Kapila wrote: 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

Re: [HACKERS] contrib modules and relkind check

2017-03-06 Thread Corey Huinker
On Tue, Feb 14, 2017 at 1:30 AM, Michael Paquier wrote: > Hm... It may be a good idea to be consistent on the whole system and > refer to "partitioned table" as a table without storage and used as an > entry point for partitions. The docs use this term in CREATE TABLE,

Re: [HACKERS] DROP FUNCTION of multiple functions

2017-03-06 Thread Peter Eisentraut
On 2/27/17 01:46, Michael Paquier wrote: > On Sat, Feb 25, 2017 at 10:27 PM, Peter Eisentraut > wrote: >> Here is a new patch set that addresses your comments. The structure is >> still the same, just a bunch of things have been renamed based on >> suggestions.

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

2017-03-06 Thread Lukas Fittl
On Mon, Mar 6, 2017 at 9:36 AM, Robert Haas wrote: > On Sat, Mar 4, 2017 at 1:52 PM, Peter Geoghegan wrote: > > In my opinion, we expose query id (and dbid, and userid) as the > > canonical identifier for each pg_stat_statements entry, and have done > > so

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

2017-03-06 Thread Andres Freund
Hi, This issue has bothered me in non-partitioned use-cases recently, so thanks for taking it up. On 2017-03-06 18:22:17 +0300, Aleksander Alekseev wrote: > diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c > index 2fb9a8bf58..fa906e7930 100644 > ---

Re: [HACKERS] Faster methods for getting SPI results

2017-03-06 Thread Peter Eisentraut
On 3/5/17 16:07, Jim Nasby wrote: >> There is nothing that requires us to materialize the results into an >> actual list of actual rows. We could wrap the SPI_tuptable into a >> Python object and implement __getitem__ or __iter__ to emulate sequence >> or mapping access. > Would it be possible to

Re: [HACKERS] rename pg_log directory?

2017-03-06 Thread Andreas Karlsson
On 03/01/2017 05:49 AM, Peter Eisentraut wrote: On 2/27/17 09:51, Tom Lane wrote: No objection to the basic point, but "log" seems perhaps a little too generic to me. Would something like "server_log" be better? Well, "log" is pretty well established. There is /var/log, and if you unpack a,

Re: [HACKERS] rename pg_log directory?

2017-03-06 Thread Tom Lane
Andreas Karlsson writes: > On 03/01/2017 05:49 AM, Peter Eisentraut wrote: >> On 2/27/17 09:51, Tom Lane wrote: >>> No objection to the basic point, but "log" seems perhaps a little too >>> generic to me. Would something like "server_log" be better? >> Well, "log" is pretty

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

2017-03-06 Thread Jan Michálek
2017-03-06 19:45 GMT+01:00 Peter Eisentraut : > On 3/5/17 05:40, Jan Michálek wrote: > > jelen=# \pset linestyle rst > > Line style is rst. > > jelen=# \pset format wrapped > > Output format is wrapped. > > jelen=# SELECT repeat('Goodnight Irene ', 30); > >

Re: [HACKERS] Automatic cleanup of oldest WAL segments with pg_receivexlog

2017-03-06 Thread Peter Eisentraut
On 3/4/17 02:09, Michael Paquier wrote: > Well, that's one reason why I was thinking that having an independent > in-core option to clean up the tail of the oldest segments is > interesting: users don't need to maintain their own infra logic to do > anything. Now this end-segment command can as

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-06 Thread Andres Freund
On 2017-03-04 11:09:40 +0530, Robert Haas wrote: > On Sat, Mar 4, 2017 at 5:56 AM, Andres Freund wrote: > > attached is a patch to address this problem, and the one reported by > > Dilip. I ran a lot of TPC-H and other benchmarks, and so far this > > addresses all the

Re: [HACKERS] Enabling replication connections by default in pg_hba.conf

2017-03-06 Thread Peter Eisentraut
On 3/3/17 20:30, Michael Paquier wrote: > Yeah, it looks sensible to me to keep "replication" for physical > replication, and switch logical replication checks to match a database > name in hba comparisons. I think we are OK to move ahead with this. Another question would be why only enable

Re: [HACKERS] WARNING: relcache reference leak: relation "p1" not closed

2017-03-06 Thread Kevin Grittner
[original message held up for review -- should be along eventualy...] On Mon, Mar 6, 2017 at 3:11 PM, Kevin Grittner wrote: > With e434ad39ae7316bcf35fd578dd34ad7e1ff3c25f I did a `make world`, > `make install-world`, a fresh default initdb, a start with default > config,

[HACKERS] WARNING: relcache reference leak: relation "p1" not closed

2017-03-06 Thread Kevin Grittner
With e434ad39ae7316bcf35fd578dd34ad7e1ff3c25f I did a `make world`, `make install-world`, a fresh default initdb, a start with default config, `make installcheck`, connected to the regression database with psql as the initial superuser, and ran: regression=# vacuum freeze analyze; WARNING:

Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)

2017-03-06 Thread Tomas Vondra
On 03/06/2017 10:13 PM, Peter Eisentraut wrote: On 3/3/17 09:03, Tomas Vondra wrote: Attached is v2, fixing both issues. I wonder if + bytea *raw_page = PG_GETARG_BYTEA_P(0); + uargs->page = VARDATA(raw_page); is expected to work reliably, without copying the argument to a

Re: [HACKERS] dump a comment of a TSDictionary

2017-03-06 Thread Tom Lane
Stephen Frost writes: > * 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! One of my smarter CS professors

Re: [HACKERS] dump a comment of a TSDictionary

2017-03-06 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * 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: >

Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)

2017-03-06 Thread Peter Eisentraut
On 3/3/17 09:03, Tomas Vondra wrote: > Attached is v2, fixing both issues. I wonder if + bytea *raw_page = PG_GETARG_BYTEA_P(0); + uargs->page = VARDATA(raw_page); is expected to work reliably, without copying the argument to a different memory context. I think it would be better

Re: [HACKERS] rename pg_log directory?

2017-03-06 Thread Andreas Karlsson
On 02/27/2017 03:05 PM, Peter Eisentraut wrote: How about changing the default for log_directory from 'pg_log' to, say, 'log'? I have attached a patch which does this. I do not care much about which name is picked as long as we get rid off the "pg_" prefix. Btw, is there a reason for why

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

2017-03-06 Thread Andres Freund
On 2017-03-02 22:51:09 +0100, Tomas Vondra wrote: > Attaches is the last part of the patch series, rebased to current master and > adopting the new chunk header approach. Something seems to have gone awry while sending that - the attachement is a whopping 0 bytes... -- Sent via pgsql-hackers

Re: [HACKERS] Parallel seq. plan is not coming against inheritance or partition table

2017-03-06 Thread Robert Haas
On Sun, Mar 5, 2017 at 9:41 PM, Amit Kapila wrote: >> RCA: >> >> From "Replace min_parallel_relation_size with two new GUCs" commit >> onwards, we are not assigning parallel workers for the child rel with >> zero heap pages. This means we won't be able to create a

Re: [HACKERS] dump a comment of a TSDictionary

2017-03-06 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > >> Do you want to deal with this whole mess, or shall I have a go at it? > > > I'm just about to push the pg_upgrade fixes for large object comments > > and security

Re: [HACKERS] Re: check failure with -DRELCACHE_FORCE_RELEASE -DCLOBBER_FREED_MEMORY

2017-03-06 Thread Tom Lane
I wrote: > I fixed that, and the basic regression tests no longer crash outright with > these settings, but I do see half a dozen errors that all seem to be in > RLS-related tests. Those turned out to all be the same bug in DoCopy. "make check-world" passes for me now with

Re: [HACKERS] Automatic cleanup of oldest WAL segments with pg_receivexlog

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 3:26 PM, Peter Eisentraut wrote: > On 3/4/17 02:09, Michael Paquier wrote: >> Well, that's one reason why I was thinking that having an independent >> in-core option to clean up the tail of the oldest segments is >> interesting: users don't

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-06 Thread Andres Freund
On 2017-03-06 16:58:23 -0500, Robert Haas wrote: > On Mon, Mar 6, 2017 at 3:32 PM, Andres Freund wrote: > >> I think DEBUG1 is far too high for something that could occur with > >> some frequency on a busy system; I'm fairly strongly of the opinion > >> that you ought to

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-06 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > There's also some tests simply taking way too long, e.g. the pg_dump > tests just do largely redundant tests for 30s. About half of the time in the pg_dump case, at least, appears to be in 010_dump_connstr.pl. I've not looked into it, but

Re: [HACKERS] Logical replication existing data copy

2017-03-06 Thread Erik Rijkers
On 2017-03-06 16:10, Erik Rijkers wrote: 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

Re: [HACKERS] dump a comment of a TSDictionary

2017-03-06 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Do you want to deal with this whole mess, or shall I have a go at it? > I'm just about to push the pg_upgrade fixes for large object comments > and security labels, followed not too far behind by the fix for

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 3:32 PM, Andres Freund wrote: >> I think DEBUG1 is far too high for something that could occur with >> some frequency on a busy system; I'm fairly strongly of the opinion >> that you ought to downgrade that by a couple of levels, say to DEBUG3 >> or so.

[HACKERS] Need a builtin way to run all tests faster manner

2017-03-06 Thread Andres Freund
Hi, Right now check-world, a sensible thing to run before commits that aren't very narrow, takes a long time. To the point it seems to impact development velocity enough that it's more sensible to just skip it, and rely on the buildfarm. That's not a great solution. A large amount of the time

Re: [HACKERS] WARNING: relcache reference leak: relation "p1" not closed

2017-03-06 Thread Tom Lane
Kevin Grittner writes: > With e434ad39ae7316bcf35fd578dd34ad7e1ff3c25f I did a `make world`, > `make install-world`, a fresh default initdb, a start with default > config, `make installcheck`, connected to the regression database > with psql as the initial superuser, and ran:

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

2017-03-06 Thread Tomas Vondra
On 03/06/2017 08:08 PM, Andres Freund wrote: Hi, On 2017-03-06 19:49:56 +0100, Tomas Vondra wrote: On 03/06/2017 07:05 PM, Robert Haas wrote: On Mon, Mar 6, 2017 at 12:44 PM, Andres Freund wrote: On 2017-03-06 12:40:18 -0500, Robert Haas wrote: On Wed, Mar 1, 2017 at

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

2017-03-06 Thread Andres Freund
Hi, On 2017-03-06 23:32:30 +0100, Tomas Vondra wrote: > > > The question however is whether this won't make the optimization > > > pointless. > > > I also, wonder how much we save by this optimization and how widely it's > > > used? Can someone point me to some numbers? > > > > I don't recall

Re: [HACKERS] Automatic cleanup of oldest WAL segments with pg_receivexlog

2017-03-06 Thread Michael Paquier
On Tue, Mar 7, 2017 at 7:16 AM, Robert Haas wrote: > On Mon, Mar 6, 2017 at 3:26 PM, Peter Eisentraut > wrote: >> On 3/4/17 02:09, Michael Paquier wrote: >>> Well, that's one reason why I was thinking that having an independent >>> in-core

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2017-03-06 Thread Andres Freund
Hi, On 2017-02-13 11:52:53 -0500, Robert Haas wrote: > On Thu, Feb 9, 2017 at 5:32 PM, Andres Freund wrote: > >> > Again, some parts of the code doing something bad isn't a good argument > >> > for doing again. Releasing locks early is a bad pattern, because backend > >> >

Re: [HACKERS] Proposal : Parallel Merge Join

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 8:15 AM, Dilip Kumar wrote: > 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

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

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 3:27 AM, Rushabh Lathia wrote: > Yes, I thought of adding wait event only for the sync but then recording the > wait event for both write and sync. I understand that OS level writes are > cheap but it still have some cost attached to that. Also I

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2017-03-06 Thread Andres Freund
On 2017-02-13 12:05:21 -0500, Robert Haas wrote: > On Fri, Feb 10, 2017 at 8:39 PM, Peter Geoghegan wrote: > > On Thu, Feb 9, 2017 at 2:32 PM, Andres Freund wrote: > >> Except that the proposed names aren't remotely like that... ;). > > > > Revision attached --

Re: [HACKERS] contrib modules and relkind check

2017-03-06 Thread Michael Paquier
On Tue, Mar 7, 2017 at 3:10 AM, Corey Huinker wrote: > Michael, do you want to add yourself as a reviewer? Yes, thanks for the reminder. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-06 Thread Robert Haas
On Mon, Mar 6, 2017 at 5:19 PM, Andres Freund wrote: > The whole performance issue trigger this thread only exists when the > hashtable sizes are mis-estimated, right? Turns out that after applying > the just-committed changes, that "fixing" the bad-mixing and/or doing >

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

2017-03-06 Thread Michael Paquier
On Tue, Mar 7, 2017 at 8:57 AM, Robert Haas wrote: > On Mon, Mar 6, 2017 at 3:27 AM, Rushabh Lathia > wrote: >> Yes, I thought of adding wait event only for the sync but then recording the >> wait event for both write and sync. I understand that

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-06 Thread Andres Freund
On 2017-03-06 18:59:02 -0500, Robert Haas wrote: > On Mon, Mar 6, 2017 at 5:19 PM, Andres Freund wrote: > > The whole performance issue trigger this thread only exists when the > > hashtable sizes are mis-estimated, right? Turns out that after applying > > the just-committed

  1   2   >