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

2017-02-11 Thread Corey Huinker
On Sat, Feb 11, 2017 at 5:57 PM, Greg Stark wrote: > On 10 February 2017 at 21:36, Fabien COELHO wrote: > >> command prompt is now > >> --- --- > >> \echo bob '' = initial state, no branch going on at

Re: [HACKERS] Improve OR conditions on joined columns (common star schema problem)

2017-02-11 Thread Tom Lane
Jim Nasby writes: > On 2/8/17 5:54 PM, Tom Lane wrote: >> Maybe it'd be better to imagine this as something closer to planagg.c, >> that is it knows how to apply a specific high-level optimization that >> might or might not be a win, so it builds a path describing that

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

2017-02-11 Thread Amit Kapila
On Fri, Feb 10, 2017 at 6:45 AM, Peter Geoghegan wrote: > On Thu, Feb 9, 2017 at 2:47 PM, Peter Geoghegan wrote: >>> which isn't an issue here, but reinforces my point about the (badly >>> documented) assumption that we don't release locks on user relations >>> early.

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

2017-02-11 Thread Fabien COELHO
Just realized that '?' means "unknown transactional status" in %x. That might cause confusion if a person had a prompt of %x%R. Is that enough reason to pick a different cue? Argh. "\?\.?[tfz]" seems distinctive enough. Note that %R uses "'=-*^!$( and %x uses *!?, which means that they

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

2017-02-11 Thread Greg Stark
On 10 February 2017 at 21:36, Fabien COELHO wrote: >> command prompt is now >> --- --- >> \echo bob '' = initial state, no branch going on at all >> \if yes 't' = inside a true branch >> \if no'tf' =

Re: [HACKERS] Parallel Index Scans

2017-02-11 Thread Amit Kapila
On Sat, Feb 11, 2017 at 9:41 PM, Robert Haas wrote: > On Fri, Feb 10, 2017 at 11:22 PM, Amit Kapila wrote: >>> Why can't we rely on _bt_walk_left? >> >> The reason is mentioned in comments, but let me try to explain with >> some example. When you

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-02-11 Thread Andreas Karlsson
On 02/02/2015 03:10 PM, Andres Freund wrote: I think if we should instead just use the new index, repoint the dependencies onto the new oid, and then afterwards, when dropping, rename the new index one onto the old one. That means the oid of the index will change and some less than pretty

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

2017-02-11 Thread Corey Huinker
On Sat, Feb 11, 2017 at 3:48 PM, Fabien COELHO wrote: > > Just realized that '?' means "unknown transactional status" in %x. That >> might cause confusion if a person had a prompt of %x%R. Is that enough >> reason to pick a different cue? >> > > Argh. > > "\?\.?[tfz]" seems

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

2017-02-11 Thread Greg Stark
On 11 February 2017 at 23:45, Corey Huinker wrote: > So you'd just want to know nesting depth, with no indicator of true/false? Even that's more than bash does, for example: $ if true ; then > if false ; then > : > fi > fi I'm a bit confused how the true/false is

Re: [HACKERS] Parallel Index Scans

2017-02-11 Thread Amit Kapila
On Fri, Feb 10, 2017 at 11:27 PM, Robert Haas wrote: > On Wed, Feb 1, 2017 at 8:20 AM, Amit Kapila wrote: >>> The hunk in indexam.c looks like a leftover that can be omitted. >> >> It is not a leftover hunk. Earlier, the patch has the same check >>

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

2017-02-11 Thread Corey Huinker
On Sat, Feb 11, 2017 at 2:43 AM, Fabien COELHO wrote: > > Ok, so that's not just PROMPT_READY, that's every prompt...which might be >> ok. ? is a great optional cue, and you're thinking on 2 levels deep, 2nd >> level always being '.'? >> > > Yep. The idea is to keep it

Re: [HACKERS] Access inside pg_node_tree from query?

2017-02-11 Thread Ryan Murphy
> > There are no in-core operators or functions to manipulate pg_node_tree. > Thanks Michael, just checking!

Re: [HACKERS] Logical replication existing data copy

2017-02-11 Thread Erik Rijkers
On 2017-02-08 23:25, Petr Jelinek wrote: 0001-Use-asynchronous-connect-API-in-libpqwalreceiver-v2.patch 0002-Always-initialize-stringinfo-buffers-in-walsender-v2.patch 0003-Fix-after-trigger-execution-in-logical-replication-v2.patch

Re: [HACKERS] gitlab post-mortem: pg_basebackup waiting for checkpoint

2017-02-11 Thread Michael Banck
Hi, Am Samstag, den 11.02.2017, 11:25 +0100 schrieb Michael Banck: > Am Samstag, den 11.02.2017, 11:07 +0100 schrieb Magnus Hagander: > > As for the code, while I haven't tested it, isn't the "checkpoint > > completed" message in the wrong place? Doesn't PQsendQuery() complete > > immediately,

Re: [HACKERS] DROP SUBSCRIPTION and ROLLBACK

2017-02-11 Thread Petr Jelinek
On 10/02/17 19:55, Masahiko Sawada wrote: > On Thu, Feb 9, 2017 at 12:44 AM, Petr Jelinek > wrote: >> On 08/02/17 07:40, Masahiko Sawada wrote: >>> On Wed, Feb 8, 2017 at 9:01 AM, Michael Paquier >>> wrote: On Wed, Feb 8, 2017 at 1:30

[HACKERS] gitlab post-mortem: pg_basebackup waiting for checkpoint

2017-02-11 Thread Michael Banck
Hi, one take-away from the Gitlab Post-Mortem[1] appears to be that after their secondary lost replication, they were confused about what pg_basebackup was doing when they tried to rebuild it. It just sat there and did nothing (even with --verbose), so they assumed something was wrong with either

Re: [HACKERS] gitlab post-mortem: pg_basebackup waiting for checkpoint

2017-02-11 Thread Magnus Hagander
On Sat, Feb 11, 2017 at 10:38 AM, Michael Banck wrote: > Hi, > > one take-away from the Gitlab Post-Mortem[1] appears to be that after > their secondary lost replication, they were confused about what > pg_basebackup was doing when they tried to rebuild it. It just sat

[HACKERS] Access inside pg_node_tree from query?

2017-02-11 Thread Ryan Murphy
Hi Postgressers, Quick question, just curious - is there a way to access the members of a `pg_node_tree` value within a Postgres query? By pg_node_tree I mean for example, the `ev_qual` field in the `pg_rewrite` table. By "access the members" I mean in the same way that you can access the

Re: [HACKERS] gitlab post-mortem: pg_basebackup waiting for checkpoint

2017-02-11 Thread Michael Banck
Hi, Am Samstag, den 11.02.2017, 11:07 +0100 schrieb Magnus Hagander: > As for the code, while I haven't tested it, isn't the "checkpoint > completed" message in the wrong place? Doesn't PQsendQuery() complete > immediately, and the check needs to be put *after* the PQgetResult() > call? I

Re: [HACKERS] Checksums by default?

2017-02-11 Thread Robert Haas
On Fri, Feb 10, 2017 at 7:38 PM, Tomas Vondra wrote: > Incidentally, I've been dealing with a checksum failure reported by a > customer last week, and based on the experience I tend to agree that we > don't have the tools needed to deal with checksum failures. I

Re: [HACKERS] Parallel Index Scans

2017-02-11 Thread Robert Haas
On Fri, Feb 10, 2017 at 11:22 PM, Amit Kapila wrote: >> Why can't we rely on _bt_walk_left? > > The reason is mentioned in comments, but let me try to explain with > some example. When you reach that point of code, it means that either > the current page (assume page

Re: [HACKERS] [ patch ] pg_dump: new --custom-fetch-table and --custom-fetch-value parameters

2017-02-11 Thread Andrea Urbani
I'm a beginner here... anyway I try to share my ideas. My situation is changed in a worst state: I'm no more able to make a pg_dump neither with my custom fetch value (I have tried "1" as value = one row at the time) neither without the "--column-inserts": pg_dump: Dumping the contents of

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Alexander Korotkov
On Sat, Feb 11, 2017 at 4:17 PM, Tomas Vondra wrote: > On 02/11/2017 01:21 PM, Alexander Korotkov wrote: > >> Hi, Tomas! >> >> On Sat, Feb 11, 2017 at 2:28 AM, Tomas Vondra >> > >> wrote: >> >>

Re: [HACKERS] Access inside pg_node_tree from query?

2017-02-11 Thread Michael Paquier
On Sat, Feb 11, 2017 at 7:19 PM, Ryan Murphy wrote: > Quick question, just curious - is there a way to access the members of a > `pg_node_tree` value within a Postgres query? By pg_node_tree I mean for > example, the `ev_qual` field in the `pg_rewrite` table. By "access

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Alexander Korotkov
Hi, Tomas! On Sat, Feb 11, 2017 at 2:28 AM, Tomas Vondra wrote: > As discussed at the Developer meeting ~ a week ago, I've ran a number of > benchmarks on the commit, on a small/medium-size x86 machines. I currently > don't have access to a machine as big as used

Re: [HACKERS] LWLock optimization for multicore Power machines

2017-02-11 Thread Alexander Korotkov
On Wed, Feb 8, 2017 at 5:00 PM, Bernd Helmle wrote: > Am Dienstag, den 07.02.2017, 16:48 +0300 schrieb Alexander Korotkov: > > But win isn't > > as high as I observed earlier. And I wonder why absolute numbers are > > lower > > than in our earlier experiments. We used IBM

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Tomas Vondra
On 02/11/2017 01:21 PM, Alexander Korotkov wrote: Hi, Tomas! On Sat, Feb 11, 2017 at 2:28 AM, Tomas Vondra > wrote: As discussed at the Developer meeting ~ a week ago, I've ran a number of benchmarks on the commit, on a

Re: [HACKERS] LWLock optimization for multicore Power machines

2017-02-11 Thread Tomas Vondra
On 02/11/2017 01:42 PM, Alexander Korotkov wrote: I think it would make sense to run more kinds of tests. Could you try set of tests provided by Tomas Vondra? If even we wouldn't see win some of the tests, it would be still valuable to see that there is no regression there. FWIW it

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

2017-02-11 Thread Tomas Vondra
On 02/11/2017 02:33 AM, Andres Freund wrote: On 2017-02-11 02:13:59 +0100, Tomas Vondra wrote: On 02/09/2017 10:37 PM, Andres Freund wrote: Hi, On 2016-12-13 01:45:13 +0100, Tomas Vondra wrote: src/backend/utils/mmgr/Makefile | 2 +- src/backend/utils/mmgr/aset.c | 115

Re: [HACKERS] Should we cacheline align PGXACT?

2017-02-11 Thread Ashutosh Sharma
> FWIW it might be interesting to have comparable results from the same > benchmarks I did. The scripts available in the git repositories should not > be that hard to tweak. Let me know if you're interested and need help with > that. > Sure, I will have a look into those scripts once I am done