Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Andres Freund
On 2017-03-27 09:33:43 -0400, Tom Lane wrote: > Andres Freund writes: > > Checking for this isn't entirely pretty - see my attached attempt at > > doing so. I considered hiding > > __attribute__((optimize("no-crossjumping"))) in execInterpExpr.c behind > > a macro (like

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-03-27 Thread Mike Palmiotto
On Mon, Mar 27, 2017 at 11:46 AM, Robert Haas wrote: > On Mon, Mar 27, 2017 at 11:22 AM, Mike Palmiotto > wrote: >> On Mon, Mar 27, 2017 at 10:47 AM, Robert Haas wrote: >>> On Thu, Mar 9, 2017 at 9:47 AM, Stephen

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 12:11 PM, David Rowley wrote: > On 28 March 2017 at 04:57, Robert Haas wrote: >> On Sat, Mar 25, 2017 at 12:18 PM, Rushabh Lathia >> wrote: >>> About the original issue reported by Tomas, I

Re: [HACKERS] Documentation improvements for partitioning

2017-03-27 Thread Robert Haas
On Thu, Mar 9, 2017 at 8:23 PM, Amit Langote wrote: > On 2017/03/10 3:26, Robert Haas wrote: >> I think you might have the titles for 0002 and 0003 backwards. > > Oops, you're right. > >> On Fri, Mar 3, 2017 at 2:51 AM, Amit Langote wrote: >>> 0002: some cosmetic

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-27 Thread Daniel Verite
Vaishnavi Prabakaran wrote: > Am going to include the test which you shared in the test patch. Please let > me know if you want to cover anymore specific cases to gain confidence. One bit of functionality that does not work in batch mode and is left as is by the patch is the PQfn() fast

Re: [HACKERS] Potential data loss of 2PC files

2017-03-27 Thread Teodor Sigaev
Thank you, pushed Michael Paquier wrote: On Fri, Mar 24, 2017 at 11:36 PM, Teodor Sigaev wrote: And the renaming of pg_clog to pg_xact is also my fault. Attached is an updated patch. Thank you. One more question: what about symlinks? If DBA moves, for example, pg_xact to

Re: [HACKERS] segfault in hot standby for hash indexes

2017-03-27 Thread Ashutosh Sharma
>> >> >> >> I think it would have been probably okay to use *int* for ntuples as >> >> that matches with what you are actually assigning in the function. >> > >> > okay, corrected it. Attached is newer version of patch. >> > >> >> Thanks, this version looks good to me. > > > It solves the problem

Re: [HACKERS] segfault in hot standby for hash indexes

2017-03-27 Thread Jeff Janes
On Fri, Mar 24, 2017 at 12:49 AM, Amit Kapila wrote: > On Fri, Mar 24, 2017 at 12:25 PM, Ashutosh Sharma > wrote: > >> > >> I think it would have been probably okay to use *int* for ntuples as > >> that matches with what you are actually assigning

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Rushabh Lathia
On Mon, Mar 27, 2017 at 9:52 PM, Robert Haas wrote: > On Mon, Mar 27, 2017 at 12:11 PM, David Rowley > wrote: > > On 28 March 2017 at 04:57, Robert Haas wrote: > >> On Sat, Mar 25, 2017 at 12:18 PM, Rushabh Lathia > >>

Re: [HACKERS] Bug in get_partition_for_tuple

2017-03-27 Thread Robert Haas
On Wed, Mar 22, 2017 at 4:00 AM, Amit Langote wrote: >> You're right, fixed that in the attached updated patch. > > Added this to the partitioning open items list, to avoid being forgotten > about. > >

Re: [HACKERS] partitioned tables and contrib/sepgsql

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 11:22 AM, Mike Palmiotto wrote: > On Mon, Mar 27, 2017 at 10:47 AM, Robert Haas wrote: >> On Thu, Mar 9, 2017 at 9:47 AM, Stephen Frost wrote: >>> While going over the contrib modules, I noticed

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Tom Lane
As to the point of whether it actually helps or not ... on gcc 6.3.1 (Fedora 25), yes it does. Seems to be one "jmp *something" per EEO_NEXT or EEO_JUMP. on gcc 4.4.7 (RHEL 6), it makes things *WORSE*. We go from about half of the dispatches getting routed through a common location, to *all*

Re: [HACKERS] Guidelines for GSoC student proposals / Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-03-27 Thread Kevin Grittner
On Sat, Mar 25, 2017 at 9:24 PM, Mengxing Liu wrote: > I've updated the proposal according to your comments. > But I am still wondering that can you review it for a double-check > to make sure I've made everything clear? Additional comments added. I'm afraid a

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Tom Lane
I wrote: > As to the point of whether it actually helps or not ... > on gcc 4.4.7 (RHEL 6), it makes things *WORSE*. We go from about half of > the dispatches getting routed through a common location, to *all* of them > (except one; for some odd reason the first EEO_NEXT in EEOP_NULLIF > survives

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Andres Freund
On 2017-03-27 11:52:05 -0400, Tom Lane wrote: > As to the point of whether it actually helps or not ... > > on gcc 6.3.1 (Fedora 25), yes it does. Seems to be one "jmp *something" > per EEO_NEXT or EEO_JUMP. > > on gcc 4.4.7 (RHEL 6), it makes things *WORSE*. We go from about half of > the

Re: [HACKERS] Crash on promotion when recovery.conf is renamed

2017-03-27 Thread Alexander Korotkov
On Mon, Mar 27, 2017 at 11:26 AM, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier > > Moved to CF 2017-03. Both patches still apply. > > Sorry to be late for

Re: [HACKERS] logical replication worker and statistics

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 11:14 AM, Fujii Masao wrote: > Logical replication worker should call pgstat_report_stat()? > Currently it doesn't seem to do that and no statistics about > table accesses by logical replication workers are collected. > For example, this can prevent

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of find_all_inheritors()

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 12:08 PM, Teodor Sigaev wrote: > Improve performance of find_all_inheritors() > > Previous coding uses three nested loops which obviously were a pain for > large number of table's children. Patch replaces inner loop with > a hashmap. > > Author:

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Tom Lane
Robert Haas writes: > On Mon, Mar 27, 2017 at 9:54 AM, Tom Lane wrote: >> Since this has now come up twice, I suggest adding a comment there >> that explains why we're intentionally ignoring max_parallel_workers. > Good idea. How about the attached?

Re: [HACKERS] Potential data loss of 2PC files

2017-03-27 Thread Teodor Sigaev
Thank you. One more question: what about symlinks? If DBA moves, for example, pg_xact to another dist and leaves the symlink in data directoty. Suppose, fsync on symlink will do nothing actually. I did not think of this case, but is that really common? There is even I saw a lot such cases.

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 12:36 PM, Rushabh Lathia wrote: > Hmm I agree that it's good idea, and I will work on that as separate patch. Maybe you want to start with what David already posted? >> Possibly we >> should fix the crash bug first, though, and then do that

[HACKERS] logical replication worker and statistics

2017-03-27 Thread Fujii Masao
Hi, Logical replication worker should call pgstat_report_stat()? Currently it doesn't seem to do that and no statistics about table accesses by logical replication workers are collected. For example, this can prevent autovacuum from working on those tables properly. Regards, -- Fujii Masao

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Andres Freund
On 2017-03-27 11:22:40 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-03-27 09:33:43 -0400, Tom Lane wrote: > >> I think it would, primarily because if we find out that some other compiler > >> spells this differently, we could handle it totally within configure. >

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 9:54 AM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Mar 27, 2017 at 1:29 AM, Rushabh Lathia >> wrote: >>> But it seems a bit futile to produce the parallel plan in the first place, >>> because

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Robert Haas
On Sat, Mar 25, 2017 at 12:18 PM, Rushabh Lathia wrote: > About the original issue reported by Tomas, I did more debugging and > found that - problem was gather_merge_clear_slots() was not returning > the clear slot when nreader is zero (means nworkers_launched = 0). >

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

2017-03-27 Thread Masahiko Sawada
On Sun, Mar 26, 2017 at 2:26 AM, Masahiko Sawada wrote: > On Sun, Mar 26, 2017 at 1:37 AM, Fujii Masao wrote: >> On Mon, Mar 6, 2017 at 9:37 PM, Masahiko Sawada >> wrote: >>> On Fri, Mar 3, 2017 at 10:50 PM, Simon Riggs

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 12:26 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Mar 27, 2017 at 9:54 AM, Tom Lane wrote: >>> Since this has now come up twice, I suggest adding a comment there >>> that explains why we're

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Andres Freund
On 2017-03-27 12:18:37 -0400, Tom Lane wrote: > I wrote: > > As to the point of whether it actually helps or not ... > > on gcc 4.4.7 (RHEL 6), it makes things *WORSE*. We go from about half of > > the dispatches getting routed through a common location, to *all* of them > > (except one; for some

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-27 Thread Maksim Milyutin
On 24.03.2017 03:54, Amit Langote wrote: And here is the updated patch. Perhaps you forgot my fix in the updated patch diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 3999e6e..36917c8 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Andres Freund
On 2017-03-16 10:13:37 +0100, Petr Jelinek wrote: > On 16/03/17 09:53, Andres Freund wrote: > > On 2017-03-16 09:40:48 +0100, Petr Jelinek wrote: > >> On 16/03/17 04:42, Andres Freund wrote: > >>> On 2017-03-15 20:28:33 -0700, Andres Freund wrote: > Hi, > > I just unstuck a bunch of

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Andres Freund
On 2017-03-27 13:30:11 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-03-27 12:18:37 -0400, Tom Lane wrote: > >> My feeling at this point is that we might be better off disabling > >> the computed-goto case by default. At the very least, we're going > >> to need a

Re: [HACKERS] Unused argument in PinBuffer function

2017-03-27 Thread Alexander Korotkov
On Thu, Aug 4, 2016 at 2:28 PM, Ildar Musin wrote: > I was looking through the buffer manager's code and have noticed that > function PinBuffer has an unused 'strategy' argument. It's seems that after > refactoring made by Alexander Korotkov and Andres Freund >

Re: [HACKERS] segfault in hot standby for hash indexes

2017-03-27 Thread Robert Haas
On Fri, Mar 24, 2017 at 3:49 AM, Amit Kapila wrote: > On Fri, Mar 24, 2017 at 12:25 PM, Ashutosh Sharma > wrote: >>> >>> I think it would have been probably okay to use *int* for ntuples as >>> that matches with what you are actually assigning in

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 12:50 PM, Andres Freund wrote: > Robert, Petr, either of you planning to fix this (as outlined elsewhere > in the thred)? Oh, I didn't realize anybody was looking to me to fix this. I sort of thought that it was fallout from the logical replication

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Andres Freund
On 2017-03-27 13:01:11 -0400, Robert Haas wrote: > On Mon, Mar 27, 2017 at 12:50 PM, Andres Freund wrote: > > Robert, Petr, either of you planning to fix this (as outlined elsewhere > > in the thred)? > > Oh, I didn't realize anybody was looking to me to fix this. Well, it's

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Tom Lane
Robert Haas writes: > ... I don't have much > personal enthusiasm for trying to figure out how to make dynamic > loading on the postgres binary itself work everywhere, so if it falls > to me to fix, it's likely to get a hard-coded check for some > hard-coded name. +1.

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

2017-03-27 Thread Jan Michálek
2017-03-23 17:26 GMT+01:00 Pierre Ducroquet : > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-27 Thread Jesper Pedersen
Hi Mithun, On 03/26/2017 01:56 AM, Mithun Cy wrote: Thanks, Amit for the review. On Sat, Mar 25, 2017 at 7:03 PM, Amit Kapila wrote: I think one-dimensional patch has fewer places to touch, so that looks better to me. However, I think there is still hard coding and

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-27 Thread Tom Lane
Andres Freund writes: > On 2017-03-27 12:18:37 -0400, Tom Lane wrote: >> My feeling at this point is that we might be better off disabling >> the computed-goto case by default. At the very least, we're going >> to need a version check that restricts it to latest gcc. > In my

Re: [HACKERS] [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint

2017-03-27 Thread Andreas Seltenreich
Ashutosh Sharma writes: >> TRAP: FailedAssertion("!(LWLockHeldByMe(((LWLock*) >> (&(bufHdr)->content_lock", File: "bufmgr.c", Line: 3397) > Thanks for reporting this problem. Could you please let me know on for > how long did you run sqlsmith to get this crash. I got about one TRAP per hour

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

2017-03-27 Thread Corey Huinker
> > > 0001+0002 patch primarily for ease of review. will be following with a > single v28 patch shortly. > 0001-psql-if-v28.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

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

2017-03-27 Thread Fabien COELHO
And here you go Patch applies cleany, make check ok. Looks pretty good. A minor detail I have just noticed, sorry: now that options are discarded by functions, some string variable declarations should be moved back inside the active branch. You moved them out because you where sharing the

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

2017-03-27 Thread Corey Huinker
On Mon, Mar 27, 2017 at 3:25 PM, Fabien COELHO wrote: > > And here you go >> > > Patch applies cleany, make check ok. Looks pretty good. > > A minor detail I have just noticed, sorry: now that options are discarded > by functions, some string variable declarations should be

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-27 Thread Alvaro Herrera
Is the WARM tap test suite supposed to work when applied without all the other patches? I just tried applied that one and running "make check -C src/test/modules", and it seems to hang after giving "ok 5" for t/002_warm_stress.pl. (I had to add a Makefile too, attached.) -- Álvaro Herrera

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-27 Thread Robert Haas
On Thu, Mar 23, 2017 at 2:47 PM, Pavan Deolasee wrote: > It's quite hard to say that until we see many more benchmarks. As author of > the patch, I might have got repetitive with my benchmarks. But I've seen > over 50% improvement in TPS even without chain conversion (6

Re: [HACKERS] increasing the default WAL segment size

2017-03-27 Thread Beena Emerson
Hello, On Sat, Mar 25, 2017 at 10:32 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > At this point, I suggest splitting this patch up into several > potentially less controversial pieces. > > One big piece is that we currently don't support segment sizes larger > than 64 GB,

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

2017-03-27 Thread Corey Huinker
On Mon, Mar 27, 2017 at 10:34 AM, Fabien COELHO wrote: > > Hello, > > I think that you could use another pattern where you init the >>> PQExpBufferData structure instead of create it, so that only the string >>> is >>> malloced. >>> >> >> In v26, I have the functions return

Re: [HACKERS] PL/Python: Add cursor and execute methods to plan object

2017-03-27 Thread Peter Eisentraut
On 3/22/17 11:46, Andrew Dunstan wrote: > This is a very simple patch that does what it advertises. It applies > cleanly and provides tests for both the new methods (plan.cursor and > plan.execute). > > Marking Ready For Committer. committed -- Peter Eisentraut

Re: [HACKERS] New CORRESPONDING clause design

2017-03-27 Thread Pavel Stehule
Hi fresh update - I enhanced Value node by location field as Tom proposal. Few more regress tests. But I found significant issue, that needs bigger fix - Surafel, please, can you fix it. It crash on SELECT 0 AS x1, 1 AS a, 0 AS x2, 2 AS b, 0 AS x3, -1 AS x3 UNION ALL CORRESPONDING SELECT 4 AS

Re: [HACKERS] exposing wait events for non-backends (was: Tracking wait event for latches)

2017-03-27 Thread Kuntal Ghosh
Thank you Robert for committing the patch. commit fc70a4b0df38bda6a13941f1581f25fbb643c7f3 I've changed the status to Committed. On Mon, Mar 27, 2017 at 6:09 AM, Michael Paquier wrote: > On Sat, Mar 25, 2017 at 5:26 PM, Kuntal Ghosh >

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

2017-03-27 Thread Craig Ringer
On 27 March 2017 at 09:31, Craig Ringer wrote: > We're in the last week of the CF. If you have a patch that's nearly > ready or getting there, now would be a good time to post it for help > and input from others. > > I would really like to get this in, but we're running

Re: [HACKERS] Adding the optional clause 'AS' in CREATE TRIGGER

2017-03-27 Thread Okano, Naoki
Hi Surafel, Thank you for your review! But I have not finish fixing a patch yet. > v Use tage in documentation ok. > v Don’t modified existing test case add new one instead These existing tests I modified are the results of commands "SELECT pg_get_triggerdef(oid, true) ... ". I modified

Re: [HACKERS] [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint

2017-03-27 Thread Ashutosh Sharma
Hi, > testing with master as of cf366e97ff, sqlsmith occasionally triggers the > following assertion: > > TRAP: FailedAssertion("!(LWLockHeldByMe(((LWLock*) > (&(bufHdr)->content_lock", File: "bufmgr.c", Line: 3397) > > Backtraces always look like the one below. It is reproducible on a >

Re: [HACKERS] Radix tree for character conversion

2017-03-27 Thread Kyotaro HORIGUCHI
Hmm, things are bit different. At Thu, 23 Mar 2017 12:13:07 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170323.121307.241436413.horiguchi.kyot...@lab.ntt.co.jp> > > Ok, I'll write a small script to generate a set of "conversion > > dump" and try

Re: [HACKERS] Adding support for Default partition in partitioning

2017-03-27 Thread Rushabh Lathia
I applied the patch and was trying to perform some testing, but its ending up with server crash with the test shared by you in your starting mail: postgres=# CREATE TABLE list_partitioned ( postgres(# a int postgres(# ) PARTITION BY LIST (a); CREATE TABLE postgres=# postgres=# CREATE TABLE

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-27 Thread Michael Paquier
On Sat, Mar 25, 2017 at 9:50 PM, Craig Ringer wrote: > I'm fairly confident that I overlooked single row mode entirely in the > original patch, though it's long enough ago that it's hard for me to > remember exactly. > > I don't really have much of an opinion on the best

Re: [HACKERS] Monitoring roles patch

2017-03-27 Thread Simon Riggs
On 25 March 2017 at 16:30, Dave Page wrote: > I believe this and other reasons we've described are exactly why other DBMS' > do what we're proposing. It would help review if you could show some links and give a commentary on what you think others do, what they get right and

Re: [HACKERS] Logical decoding on standby

2017-03-27 Thread Craig Ringer
On 27 March 2017 at 14:08, Craig Ringer wrote: > So this patch makes ReplicationSlotAcquire check that the slot > database matches the current database and refuse to acquire the slot > if it does not. New patch attached that drops above requirement, so slots can still be

Re: [HACKERS] Parallel bitmap heap scan

2017-03-27 Thread Dilip Kumar
On Mon, Mar 27, 2017 at 12:53 PM, Rafia Sabih wrote: > Recently, on testing TPC-H 300 scale factor I stumbled on to a error > for Q6, the test environment is as follows, > work_mem = 1GB, > shared_buffers = 10 GB, > Effective_cache_size = 10GB > random_page_cost =

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

2017-03-27 Thread Stas Kelvich
> On 27 Mar 2017, at 12:26, Craig Ringer wrote: > > On 27 March 2017 at 09:31, Craig Ringer wrote: > >> We're in the last week of the CF. If you have a patch that's nearly >> ready or getting there, now would be a good time to post it for help >>

Re: [HACKERS] UPDATE of partition key

2017-03-27 Thread Amit Khandekar
On 25 March 2017 at 01:34, Amit Khandekar wrote: I am yet to handle all of your comments, but meanwhile , attached is > an updated patch, that handles RETURNING. > > Earlier it was not working because ExecInsert() did not return any > RETURNING clause. This is because the

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-27 Thread Craig Ringer
On 27 March 2017 at 15:26, Michael Paquier wrote: > On Sat, Mar 25, 2017 at 9:50 PM, Craig Ringer wrote: >> I'm fairly confident that I overlooked single row mode entirely in the >> original patch, though it's long enough ago that it's hard for

Re: [HACKERS] free space map and visibility map

2017-03-27 Thread Masahiko Sawada
On Mon, Mar 27, 2017 at 2:38 PM, Kyotaro HORIGUCHI wrote: > At Sat, 25 Mar 2017 19:53:47 -0700, Jeff Janes wrote > in

Re: [HACKERS] Logical decoding on standby

2017-03-27 Thread Craig Ringer
Hi Here's the next patch in the split-up series, drop db-specific (logical) replication slots on DROP DATABASE. Current behaviour is to ERROR if logical slots exist on the DB, whether in-use or not. With this patch we can DROP a database if it has logical slots so long as they are not active. I

Re: [HACKERS] increasing the default WAL segment size

2017-03-27 Thread Simon Riggs
On 25 March 2017 at 17:02, Peter Eisentraut wrote: > At this point, I suggest splitting this patch up into several > potentially less controversial pieces. > > One big piece is that we currently don't support segment sizes larger > than 64 GB, for various

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-27 Thread Michael Paquier
On Mon, Mar 27, 2017 at 4:42 PM, Craig Ringer wrote: > On 27 March 2017 at 15:26, Michael Paquier wrote: >> On Sat, Mar 25, 2017 at 9:50 PM, Craig Ringer wrote: >>> I'm fairly confident that I overlooked single row mode

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

2017-03-27 Thread Thomas Munro
On Sun, Mar 26, 2017 at 3:56 PM, Thomas Munro wrote: > But... what you said above must be a problem for Windows. I believe > it doesn't allow files to be unlinked if they are open, and I see that > DSM segments are cleaned up in resowner's phase == >

Re: [HACKERS] Parallel bitmap heap scan

2017-03-27 Thread Rafia Sabih
On Wed, Mar 8, 2017 at 11:52 PM, Robert Haas wrote: > On Wed, Mar 8, 2017 at 1:18 PM, Tom Lane wrote: >> Robert Haas writes: >>> What I'm using is: >> >>> Configured with: >>>

Re: [HACKERS] Logical decoding on standby

2017-03-27 Thread Simon Riggs
On 27 March 2017 at 09:03, Craig Ringer wrote: > I think this one's ready to go. Looks like something I could commit. Full review by me while offline today, aiming to commit tomorrow barring issues raised. -- Simon Riggshttp://www.2ndQuadrant.com/

Re: [HACKERS] Proposal for changes to recovery.conf API

2017-03-27 Thread Simon Riggs
On 7 March 2017 at 23:31, Josh Berkus wrote: > On 03/02/2017 07:13 AM, David Steele wrote: >> Hi Simon, >> >> On 2/25/17 2:43 PM, Simon Riggs wrote: >>> On 25 February 2017 at 13:58, Michael Paquier >>> wrote: >>> - trigger_file is removed.

Re: [HACKERS] Crash on promotion when recovery.conf is renamed

2017-03-27 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier > Moved to CF 2017-03. Both patches still apply. Sorry to be late for reviewing this, but done now. The patch applied, make check passed, and the code looks almost good. I could

[HACKERS] Column widening without outage

2017-03-27 Thread Aniruddha Deshpande
Hi All, We want to extend/widen the column without outage. But as column widening takes ACCESS EXCLUSIVE LOCK, we have seen noticeable pause on SELECT/INSERTS. This behavior was more noticeable in tables which has composite Foreign keys. .We tried doing it like below which resulted in minimizing

[HACKERS] example for xmltable with XMLNAMESPACES

2017-03-27 Thread Arjen Nienhuis
It wasn't completely clear for me how to use namespaces in xmltable(). Maybe add this to the documentation. It shows the default namespace and quoting the namespace name. WITH xmldata(data) AS (VALUES (' http://example.com/myns; xmlns:B="http://example.com/b;> '::xml) ) SELECT xmltable.*

[HACKERS] On How To Shorten The Steep Learning Curve Towards PG Hacking

2017-03-27 Thread Kang Yuzhe
Dear PG Hacker/Experts, I am newbie to PG Hacking. I have been reading the PG code base to find my space in it but without success. There are hundreds of Hands-on with PG Application development on the web. Alas, there is almost none in PG hacking. I have found PG source Code reading and

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 1:29 AM, Rushabh Lathia wrote: > >> But it seems a bit futile to produce the parallel plan in the first place, >> because with max_parallel_workers=0 we can't possibly get any parallel >> workers ever. I wonder why compute_parallel_worker() only

Re: [HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...

2017-03-27 Thread Michael Paquier
On Mon, Mar 27, 2017 at 9:00 PM, Kang Yuzhe wrote: > 1. Prepare Hands-on with PG internals > > For example, a complete Hands-on with SELECT/INSERT SQL Standard PG > internals. The point is the experts can pick one fairly complex feature and > walk it from Parser to

Re: [HACKERS] pgbench - allow to store select results into variables

2017-03-27 Thread Rafia Sabih
On Fri, Mar 24, 2017 at 8:59 PM, Fabien COELHO wrote: > > Hello Rafia, > >> if (my_command->argc > 2) >> + syntax_error(source, lineno, my_command->line, my_command->argv[0], >> + "at most on argument expected", NULL, -1); >> >> I suppose you mean 'one' argument here. > > >

Re: [HACKERS] [COMMITTERS] pgsql: Improve access to parallel query from procedural languages.

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 1:48 AM, Rafia Sabih wrote: > This is caused because trigger related functions are marked safe and > using global variables, hence when executed in parallel are giving > incorrect output. Attached patch fixes this. I have modified only >

Re: [HACKERS] Parallel bitmap heap scan

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 5:02 AM, Dilip Kumar wrote: > On Mon, Mar 27, 2017 at 12:53 PM, Rafia Sabih > wrote: >> Recently, on testing TPC-H 300 scale factor I stumbled on to a error >> for Q6, the test environment is as follows, >> work_mem =

Re: [HACKERS] perlcritic

2017-03-27 Thread Peter Eisentraut
On 3/23/17 11:58, Daniel Gustafsson wrote: > Given the nitpick nature of the comments, bumping status to ready for > committer. Committed, with your changes. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --

Re: [HACKERS] perlcritic

2017-03-27 Thread Peter Eisentraut
On 3/1/17 11:21, Dagfinn Ilmari Mannsåker wrote: > diff --git a/src/pl/plperl/plc_perlboot.pl b/src/pl/plperl/plc_perlboot.pl > index 292c9101c9..b4212f5ab2 100644 > --- a/src/pl/plperl/plc_perlboot.pl > +++ b/src/pl/plperl/plc_perlboot.pl > @@ -81,18 +81,15 @@ sub ::encode_array_constructor >

Re: [HACKERS] Adding support for Default partition in partitioning

2017-03-27 Thread Jeevan Ladhe
Hi Rahila, IIUC, your default_partition_v3.patch is trying to implement an error if new partition is added to a table already having a default partition. I too tried to run the test and similar to Rushabh, I see the server is crashing with the given test. However, if I reverse the order of

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-27 Thread Rushabh Lathia
On Mon, Mar 27, 2017 at 10:59 AM, Rushabh Lathia wrote: > > > On Mon, Mar 27, 2017 at 3:43 AM, Tomas Vondra < > tomas.von...@2ndquadrant.com> wrote: > >> On 03/25/2017 05:18 PM, Rushabh Lathia wrote: >> >>> >>> >>> On Sat, Mar 25, 2017 at 7:01 PM, Peter Eisentraut >>>

Re: [HACKERS] Index usage for elem-contained-by-const-range clauses

2017-03-27 Thread Alexander Korotkov
On Sat, Mar 18, 2017 at 12:41 AM, Pritam Baral wrote: > On Friday 10 March 2017 07:59 PM, Alexander Korotkov wrote: > >> Hi, Pritam! > > I've assigned to review this patch. > > On Thu, Feb 23, >> 2017 at 2:17 AM, Pritam Baral wrote: > > >> The

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-03-27 Thread Alexander Korotkov
On Fri, Mar 10, 2017 at 6:06 PM, Pavel Stehule wrote: > 2017-03-10 16:00 GMT+01:00 Alexander Korotkov : > >> On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost >> wrote: >> >>> * Peter Eisentraut

[HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...

2017-03-27 Thread Kang Yuzhe
Dear PG Hackers/Experts, I am newbie to PG Hacking. I have been reading the PG code base to find my space in it but without success. There are hundreds of Hands-on with PG Application development on the web. Alas, there is almost none in PG hacking. I have found PG source Code reading and

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-27 Thread Amit Kapila
On Mon, Mar 27, 2017 at 11:21 AM, Amit Kapila wrote: > On Sun, Mar 26, 2017 at 11:26 AM, Mithun Cy > wrote: >> Thanks, Amit for the review. >> On Sat, Mar 25, 2017 at 7:03 PM, Amit Kapila wrote: >>> >>> I think

Re: [HACKERS] Monitoring roles patch

2017-03-27 Thread Simon Riggs
On 23 March 2017 at 13:16, Dave Page wrote: > Thanks - updated patch attached. No problems with the patch so far. I'd like some tests though... -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-27 Thread Amit Kapila
On Sat, Mar 25, 2017 at 1:24 PM, Amit Kapila wrote: > On Fri, Mar 24, 2017 at 11:49 PM, Pavan Deolasee > wrote: >> >> On Fri, Mar 24, 2017 at 6:46 PM, Amit Kapila >> wrote: >>> > >> While looking at this problem, it

Re: [HACKERS] patch proposal

2017-03-27 Thread David Steele
On 3/26/17 7:34 PM, Venkata B Nagothi wrote: > Hi David, > > On Thu, Mar 23, 2017 at 4:21 AM, David Steele > wrote: > > On 3/21/17 8:45 PM, Venkata B Nagothi wrote: > > On Tue, Mar 21, 2017 at 8:46 AM, David Steele >

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

2017-03-27 Thread Fabien COELHO
0001+0002 patch primarily for ease of review. will be following with a single v28 patch shortly. Applies cleanly. Make check ok. I think it behaves as committers required last. Let us try again with them... -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

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

2017-03-27 Thread Andres Freund
Hi, On 2017-03-28 00:19:29 +0300, Stas Kelvich wrote: > Ok, here it is. On a very quick skim, this doesn't seem to solve the issues around deadlocks of prepared transactions vs. catalog tables. What if the prepared transaction contains something like LOCK pg_class; (there's a lot more realistic

[HACKERS] O(1) DSM handle operations

2017-03-27 Thread Thomas Munro
Hi hackers, This is just a thought for discussion, no patch attached... DSM operations dsm_create(), dsm_attach(), dsm_unpin_segment() perform linear searches of the dsm_control->item array for either a free slot or a slot matching a given handle. Maybe no one thinks this is a problem, because

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

2017-03-27 Thread Stas Kelvich
> On 27 Mar 2017, at 16:29, Craig Ringer wrote: > > On 27 March 2017 at 17:53, Stas Kelvich wrote: > >> I’m heavily underestimated amount of changes there, but almost finished >> and will send updated patch in several hours. > > Oh, brilliant!

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-27 Thread Robert Haas
On Thu, Mar 23, 2017 at 8:54 PM, Amit Langote wrote: > On 2017/03/23 23:47, Amit Langote wrote: >> On Thu, Mar 23, 2017 at 11:27 PM, Maksim Milyutin >> wrote: >>> Hi! >>> >>> I have noticed that there is scheduled unlinking of nonexistent

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-03-27 Thread Robert Haas
On Fri, Feb 17, 2017 at 3:23 AM, Amit Langote wrote: > In certain cases, pg_dump's dumpTableSchema() emits a separate ALTER TABLE > command for those schema elements of a table that could not be included > directly in the CREATE TABLE command for the table. > > For

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

2017-03-27 Thread Fabien COELHO
Hello, I think that you could use another pattern where you init the PQExpBufferData structure instead of create it, so that only the string is malloced. In v26, I have the functions return PQExpBuffer. The two calling functions then free it, which should solve any leak. Yep, it works as

Re: [HACKERS] rename pg_log directory?

2017-03-27 Thread Peter Eisentraut
On 3/6/17 18:01, Andreas Karlsson wrote: > 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

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-03-27 Thread Robert Haas
On Thu, Mar 9, 2017 at 7:20 PM, Amit Langote wrote: > On 2017/03/10 9:10, Amit Langote wrote: >> On 2017/03/09 23:25, Robert Haas wrote: >>> On Fri, Feb 17, 2017 at 1:47 AM, Amit Langote wrote: I updated the patch. Now it's reduced to simply removing the check

Re: [HACKERS] rename pg_log directory?

2017-03-27 Thread Andreas Karlsson
On 03/27/2017 04:38 PM, Peter Eisentraut wrote: Committed. Thanks! While digging around a bit, I found in release-old.sgml that before PostgreSQL 7.2, pg_clog was called pg_log. Go figure. Yeah, I noticed that too when writing the patch. :) Andreas -- Sent via pgsql-hackers mailing

  1   2   >