Re: [HACKERS] Statement-level rollback

2017-03-07 Thread legrand legrand
Hello, EDB Oracle compatibility proposes edb_stmt_level_tx parameter, psql uses ON_ERROR_ROLLBACK = 'on', ODBC has a parameter for this JDBC has nothing and developers has to play with savepoint as described http://blog.endpoint.com/2015/02/postgres-onerrorrollback-explained.html This feature

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

2017-03-07 Thread Peter Eisentraut
On 2/7/17 03:11, Okano, Naoki wrote: > I tried to cretae a patch for CREATE OR REPLACE TRIGGER. I have a feeling that this was proposed a few times in the ancient past but did not go through because of locking issues. I can't find any emails about it through. Does anyone remember? Have you

Re: [HACKERS] Small fix to postgresql.conf.sample's comment on max_parallel_workers

2017-03-07 Thread David Rowley
On 8 March 2017 at 09:32, Robert Haas wrote: > Committed. Thanks! -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 9:07 AM, Rafia Sabih wrote: > I have split the patch into two, one is to allow optimiser to select a > parallel plan for queries in PL functions > (pl_parallel_opt_support_v1.patch), wherein CURSOR_OPT_PARALLEL_OK is passed > at required

Re: [HACKERS] Small fix to postgresql.conf.sample's comment on max_parallel_workers

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 7:42 AM, Amit Kapila wrote: > On Tue, Mar 7, 2017 at 8:02 AM, David Rowley > wrote: >> On 7 March 2017 at 15:21, Amit Kapila wrote: >>> +1. How about changing the description of >>>

Re: [HACKERS] Allow interrupts on waiting standby

2017-03-07 Thread Peter Eisentraut
On 1/30/17 20:34, Michael Paquier wrote: > On Fri, Jan 27, 2017 at 10:17 PM, Michael Paquier > wrote: >> Two things I forgot in this patch: >> - documentation for the new wait event >> - the string for the wait event or this would show up as "???" in >>

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

2017-03-07 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Mar 3, 2017 at 6:06 PM, Stephen Frost wrote: > > * Andres Freund (and...@anarazel.de) wrote: > >> On 2017-02-28 19:12:03 +0530, Pavan Deolasee wrote: > >> > Since VM bits are only set during VACUUM which conflicts

Re: [HACKERS] ANALYZE command progress checker

2017-03-07 Thread Robert Haas
On Wed, Mar 1, 2017 at 1:25 PM, Andres Freund wrote: > On 2017-03-01 10:20:41 -0800, David Fetter wrote: >> On Wed, Mar 01, 2017 at 09:45:40AM -0500, Peter Eisentraut wrote: >> > On 2/28/17 04:24, vinayak wrote: >> > > The view provides the information of analyze command

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

2017-03-07 Thread Robert Haas
On Fri, Mar 3, 2017 at 6:06 PM, Stephen Frost wrote: > * Andres Freund (and...@anarazel.de) wrote: >> On 2017-02-28 19:12:03 +0530, Pavan Deolasee wrote: >> > Since VM bits are only set during VACUUM which conflicts with CIC on the >> > relation lock, I don't see any risk of

Re: [HACKERS] adding an immutable variant of to_date

2017-03-07 Thread Sven R. Kunze
On 07.03.2017 03:21, Andreas Karlsson wrote: 1) I do not think we currently allow setting the locale like this anywhere, so this will introduce a new concept to PostgreSQL. And you will probably need to add support for caching per locale. Good to know. Could you explain what you mean by

Re: [HACKERS] Statement-level rollback

2017-03-07 Thread Michael Banck
On Tue, Mar 07, 2017 at 01:49:29PM -0700, legrand legrand wrote: > JDBC has nothing and developers has to play with savepoint as described > http://blog.endpoint.com/2015/02/postgres-onerrorrollback-explained.html JDBC has it since 9.4.1210 (2016-09-07), unless I am mistaken:

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-07 Thread Oleg Bartunov
On Fri, Mar 3, 2017 at 11:49 PM, David Steele wrote: > Hi Oleg, > > On 2/28/17 2:55 PM, Pavel Stehule wrote: > > 2017-02-28 20:08 GMT+01:00 Oleg Bartunov > > > Attached patch is an implementation of SQL/JSON data model from > > SQL-2016

Re: [HACKERS] Proposal : Parallel Merge Join

2017-03-07 Thread Dilip Kumar
On Tue, Mar 7, 2017 at 5:21 AM, Robert Haas wrote: > +/* Can't do anything else if inner path needs to be unique'd */ > +if (save_jointype == JOIN_UNIQUE_INNER) > +return; > > Right after this, you should try_partial_mergejoin_path() with the > result of

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

2017-03-07 Thread Amit Langote
Hi Kuntal, Patches apply and compile fine. Works as advertised. Some minor comments on the patches themselves. In 0001: - * pgstat_bestart() - + * pgstat_procstart() - + * + * Initialize this process's entry in the PgBackendStatus array. + * Called from InitPostgres and

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

2017-03-07 Thread Simon Riggs
On 7 March 2017 at 10:01, David Rowley wrote: > On 2 March 2017 at 16:06, Amit Kapila wrote: >> On Wed, Mar 1, 2017 at 5:32 PM, David Rowley >> wrote: >>> Hackers, >>> >>> I've attached a small patch which aims

Re: [HACKERS] dump a comment of a TSDictionary

2017-03-07 Thread Giuseppe Broccolo
Hi, 2017-03-07 1:40 GMT+01:00 Tom Lane : > > This is actually a problem if a new TSDictionary is created, in a > different > > schema specified by the dumped search_path setting. > > Just out of curiosity, do you have a concrete test case where it failed > that way? AFAICS

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

2017-03-07 Thread David Rowley
On 7 March 2017 at 17:31, David Rowley wrote: > On 2 March 2017 at 16:06, Amit Kapila wrote: >> Few comments on the patch: >> 1. >> +/* >> + * Number of buckets to split RecoveryLockTable into. >> + * This must be a power of two. >> + */ >>

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

2017-03-07 Thread David Rowley
On 7 March 2017 at 23:20, Simon Riggs wrote: > On 7 March 2017 at 10:01, David Rowley wrote: >> On 2 March 2017 at 16:06, Amit Kapila wrote: >>> On Wed, Mar 1, 2017 at 5:32 PM, David Rowley >>>

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-03-07 Thread Ivan Kartyshov
Rebase done. Meanwhile I made some more changes. Changes === 1) WAITLSN is now implemented as an extension called "pg_waitlsn" 2) Call new hook "lsn_updated_hook" right after xact_redo_commit (xlog.c) 3) Corresponding functions: pg_waitlsn('0/693FF800', 1) - wait 10 seconds

Re: [HACKERS] SCRAM authentication, take three

2017-03-07 Thread Heikki Linnakangas
On 02/20/2017 01:51 PM, Aleksander Alekseev wrote: Currently I don't see any significant flaws in these patches. However I would like to verify that implemented algorithms are compatible with algorithms implemented by third party. Yes, that's very important. For instance, for user 'eax' and

Re: [HACKERS] SCRAM authentication, take three

2017-03-07 Thread Heikki Linnakangas
On 03/02/2017 08:50 AM, Michael Paquier wrote: Attached is a new patch set. I have combined SASLprep with the rest and fixed some conflicts. At the same time when going through NFKC this morning I have noticed that the implementation was doing the canonical decomposition and reordered the

Re: [HACKERS] foreign partition DDL regression tests

2017-03-07 Thread Ashutosh Bapat
Hi Amit, Thanks for adding testcases. Overall the testcases look good. The testcase is using ALTER TABLE to modify foreign table schema. Though this works, I think a better option is to use ALTER FOREIGN TABLE. Something not related to this patch but -- no attach partition validation occurs for

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

2017-03-07 Thread Simon Riggs
On 7 March 2017 at 19:22, David Rowley wrote: >>> That may need tweaking. Likely it could be smaller if we had some sort >>> of bloom filter to mark if the transaction had obtained any AEL locks, >>> that way it could skip. Initially I really didn't want to make the

Re: [HACKERS] Two phase commit in ECPG

2017-03-07 Thread Masahiko Sawada
On Sat, Mar 4, 2017 at 4:11 AM, Michael Meskes wrote: > Dear Sawada-san, > >> This cause is that the "begin transaction" is issued automatically >> before executing COMMIT PREPARED if we're not in auto commit. The >> Commit 816b008eaf1a1ff1069f3bafff363a9a8bf04a21 fixed bug

Re: [HACKERS] BRIN de-summarize ranges

2017-03-07 Thread Simon Riggs
On 28 February 2017 at 12:56, Alvaro Herrera wrote: > Here's a small patch to make a BRIN page range unsummarized. This is > useful if data has been deleted, and the heap pages are now used for > completely different data. We currently have a manual interface for

Re: [HACKERS] Logical decoding on standby

2017-03-07 Thread Simon Riggs
On 24 January 2017 at 06:37, Craig Ringer wrote: > Rebased series attached, on top of current master (which includes > logical replicaiton). > > I'm inclined to think I should split out a few of the changes from > 0005, roughly along the lines of the bullet points in its

Re: [HACKERS] Proposal : Parallel Merge Join

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 5:16 AM, Dilip Kumar wrote: > I am confused about whether to call > "get_cheapest_parallel_safe_total_inner" with > innerrel->cheapest_parameterized_paths like we do in case of > hash_inner_and_outer or with > innerrel->pathlist. The reason behind I

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

2017-03-07 Thread Tomas Vondra
On 03/07/2017 12:19 AM, Andres Freund wrote: 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

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

2017-03-07 Thread Daniel Verite
Christoph Berg wrote: > Both fixed, thanks for the review! Version 3 attached. It looks good to me. Stephen Frost is also reviewer on the patch, so I'm moving the status back to "Needs review" at https://commitfest.postgresql.org/13/973/ and let him proceed. Best regards, -- Daniel

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

2017-03-07 Thread Dagfinn Ilmari Mannsåker
Simon Riggs writes: > On 7 March 2017 at 20:36, Alvaro Herrera wrote: > >> FWIW, +1 on improving matters here. > > +1 also. > > I don't see what's wrong with relying on buildfarm though; testing is > exactly what its there for. > > If we had a

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

2017-03-07 Thread Alvaro Herrera
FWIW, +1 on improving matters here. Andres Freund wrote: > The best I can come up so far is a toplevel target that creates the temp > install, starts a cluster and then runs the 'installcheck-or-check' > target on all the subdirectories via recursion. Individual makefiles can > either use the

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

2017-03-07 Thread Stephen Frost
* Daniel Verite (dan...@manitou-mail.org) wrote: > Christoph Berg wrote: > > > Both fixed, thanks for the review! Version 3 attached. > > It looks good to me. > > Stephen Frost is also reviewer on the patch, so I'm moving the > status back to "Needs review" at >

Re: [HACKERS] SCRAM authentication, take three

2017-03-07 Thread Michael Paquier
On Tue, Mar 7, 2017 at 9:36 PM, Heikki Linnakangas wrote: > I've now committed the bulk of these patches. Many thanks to everyone > involved, and especially you, Michael, for your persistence! Thanks! > There are a bunch of loose ends, like the SASLprep thing. But the core of >

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-03-07 Thread Masahiko Sawada
On Tue, Mar 7, 2017 at 8:48 PM, Ivan Kartyshov wrote: > Rebase done. Thank you for updating the patch. > > Meanwhile I made some more changes. > > Changes > === > 1) WAITLSN is now implemented as an extension called "pg_waitlsn" I've read the discussion so far

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

2017-03-07 Thread Simon Riggs
On 7 March 2017 at 20:36, Alvaro Herrera wrote: > FWIW, +1 on improving matters here. +1 also. I don't see what's wrong with relying on buildfarm though; testing is exactly what its there for. If we had a two-stage process, where committers can issue "trial commits"

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-07 Thread Rafia Sabih
On Sun, Feb 26, 2017 at 7:09 PM, Robert Haas wrote: > > I think I see the problem that you're trying to solve, but I agree > that this doesn't seem all that elegant. The reason why we have that > numberTuples check is because we're afraid that we might be in a > context

Re: [HACKERS] Small fix to postgresql.conf.sample's comment on max_parallel_workers

2017-03-07 Thread Amit Kapila
On Tue, Mar 7, 2017 at 8:02 AM, David Rowley wrote: > On 7 March 2017 at 15:21, Amit Kapila wrote: >> +1. How about changing the description of >> max_parallel_workers_per_gather to "taken from max_worker_processes, >> limited by

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

2017-03-07 Thread Peter Eisentraut
I think we have consensus to go ahead with this, and the patches are mostly mechanical, so I only have a few comments on style and one possible bug below: 0001-Move-contrib-seg-to-only-use-V1-calling-conventions.patch static int restore(char *s, float val, int n); -

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

2017-03-07 Thread Robert Haas
On Mon, Mar 6, 2017 at 9:45 AM, Rader, David wrote: > Revised doc patch attached with various parameters. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list

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

2017-03-07 Thread Andrew Dunstan
On 03/07/2017 07:58 AM, Simon Riggs wrote: > On 7 March 2017 at 20:36, Alvaro Herrera wrote: > >> FWIW, +1 on improving matters here. > +1 also. > > I don't see what's wrong with relying on buildfarm though; testing is > exactly what its there for. > > If we had a

Re: [HACKERS] Reporting planning time with EXPLAIN

2017-03-07 Thread Stephen Frost
Ashutosh, * Ashutosh Bapat (ashutosh.ba...@enterprisedb.com) wrote: > Here are patches for follwing > 1. pg_explain_plan_time_v3 adds SUMMARY option which behaves as: > SUMMARY when ON prints planning time. With ANALYZE ON, it also prints > execution time. When user explicitly uses SUMMARY OFF,

[HACKERS] ALTER PUBLICATION and segmentation fault

2017-03-07 Thread Fujii Masao
Hi, When I logged in PostgreSQL as non-superuser and ran ALTER PUBLICATION command, I got a segmentation fault. The code checking the owner of publication might have a bug. =# CREATE ROLE foo NOSUPERUSER LOGIN =# \c - foo => \dRp List of publications Name | Owner | Inserts |

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-07 Thread Robert Haas
On Mon, Mar 6, 2017 at 10:01 PM, Andres Freund wrote: > My benchmarking script first prewarms the whole database, then runs the > tpch queries in sequence, repeated three times, and compares the shortes > execution time: Those numbers are stupendous. -- Robert Haas

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

2017-03-07 Thread Robert Haas
On Mon, Mar 6, 2017 at 9:09 PM, Amit Kapila wrote: > Sure, if you think both Writes and Reads at OS level can have some > chance of blocking in obscure cases, then we should add a wait event > for them. I think writes have a chance of blocking in cases even in cases that

Re: [HACKERS] Parallel bitmap heap scan

2017-03-07 Thread Dilip Kumar
On Tue, Mar 7, 2017 at 9:34 PM, Robert Haas wrote: > > + if (DsaPointerIsValid(node->pstate->tbmiterator)) > + tbm_free_shared_area(dsa, node->pstate->tbmiterator); > + > + if

Re: [HACKERS] Parallel bitmap heap scan

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 11:09 AM, Dilip Kumar wrote: > On Tue, Mar 7, 2017 at 9:34 PM, Robert Haas wrote: >> >> + if (DsaPointerIsValid(node->pstate->tbmiterator)) >> + tbm_free_shared_area(dsa,

Re: [HACKERS] Parallel bitmap heap scan

2017-03-07 Thread Dilip Kumar
On Tue, Mar 7, 2017 at 9:44 PM, Robert Haas wrote: > I mean, IIUC, the call to PrefetchBuffer() is not done under any lock. > And that's the slow part. The tiny amount of time we spend updating > the prefetch information under the mutex should be insignificant > compared

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

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 1:43 AM, Amit Langote wrote: > On 2017/03/07 14:04, Tom Lane wrote: >> Amit Langote writes: >>> Also, I found out that alter_table.sql mistakenly forgot to drop >>> partitioned table "p1". Patch 0002 takes care

Re: [HACKERS] Parallel bitmap heap scan

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 11:27 AM, Dilip Kumar wrote: > On Tue, Mar 7, 2017 at 9:44 PM, Robert Haas wrote: >> I mean, IIUC, the call to PrefetchBuffer() is not done under any lock. >> And that's the slow part. The tiny amount of time we spend updating

Re: [HACKERS] Parallel bitmap heap scan

2017-03-07 Thread Robert Haas
On Mon, Mar 6, 2017 at 12:35 AM, Dilip Kumar wrote: > On Thu, Mar 2, 2017 at 6:52 PM, Robert Haas wrote: >> 0002 wasn't quite careful enough about the placement of #ifdef >> USE_PREFETCH, but otherwise looks OK. Committed after changing that >> and

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

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 11:08 AM, Peter Eisentraut wrote: > On 3/6/17 17:16, Robert Haas wrote: >> What if we told pg_receivewal (or pg_receivexlog, whatever that is) a >> maximum number of segments to retain before removing old ones? Like >> pg_receivewal

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-07 Thread Robert Haas
On Thu, Mar 2, 2017 at 8:02 PM, Amit Langote wrote: > Thanks. I noticed that 'and' is duplicated in a line added by the commit > to analyze.sgml. Attached 0001 fixes that. 0002 and 0003 same as the > last version. Oh, rats. Thanks for noticing. Committed 0001.

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

2017-03-07 Thread Keith Fiske
On Thu, Mar 2, 2017 at 9:40 PM, Robert Haas wrote: > On Wed, Mar 1, 2017 at 6:29 AM, Rahila Syed > wrote: > > 3. Handling adding a new partition to a partitioned table > >with default partition. > >This will require moving tuples from

Re: [HACKERS] Logical replication existing data copy

2017-03-07 Thread Peter Eisentraut
On 3/4/17 01:46, Robert Haas wrote: >> So I think we should do it, but it needs to be configurable, my original >> patch added GUC for it, Peter wanted it to be configurable per >> subscription. I guess we could add it as another option to the list of >> WITH (...) options for CREATE and ALTER

Re: [HACKERS] Proposal : Parallel Merge Join

2017-03-07 Thread Dilip Kumar
On Tue, Mar 7, 2017 at 7:47 PM, Robert Haas wrote: > You're right to be confused, because that seems to be a bug in the > existing code. There seems to be no guarantee that the cheapest > parallel-safe path will be in the cheapest_parameterized_paths list. > I'll go fix

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-03-07 Thread Peter Geoghegan
On Sat, Mar 4, 2017 at 1:30 AM, Amit Kapila wrote: >> While I can't see this explained anywhere, I'm >> pretty sure that that's supposed to be impossible, which this patch >> changes. >> > > What makes you think that patch will allow pg_class.relfrozenxid to be > advanced

Re: [HACKERS] Logical replication existing data copy

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 11:39 AM, Peter Eisentraut wrote: > On 3/4/17 01:46, Robert Haas wrote: >>> So I think we should do it, but it needs to be configurable, my original >>> patch added GUC for it, Peter wanted it to be configurable per >>> subscription. I

Re: [HACKERS] Parallel bitmap heap scan

2017-03-07 Thread Dilip Kumar
On Tue, Mar 7, 2017 at 10:07 PM, Robert Haas wrote: > It's not about speed. It's about not forgetting to prefetch. Suppose > that worker 1 becomes the prefetch worker but then doesn't return to > the Bitmap Heap Scan node for a long time because it's busy in some > other

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

2017-03-07 Thread Daniel Verite
Vaishnavi Prabakaran wrote: > Yes, I have created a new patch entry into the commitfest 2017-03 and > attached the latest patch with this e-mail. Please find attached a companion patch implementing the batch API in pgbench, exposed as \beginbatch and \endbatch meta-commands (without

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

2017-03-07 Thread Peter Eisentraut
On 3/6/17 17:16, Robert Haas wrote: > What if we told pg_receivewal (or pg_receivexlog, whatever that is) a > maximum number of segments to retain before removing old ones? Like > pg_receivewal --limit-retained-segments=50GB, or something like that. That would be doable, but would it solve

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

2017-03-07 Thread Peter Eisentraut
On 3/6/17 16:33, Tomas Vondra wrote: >> I think it would be better not to maintain so much duplicate code >> between bt_page_items(text, int) and bt_page_items(bytea). How about >> just redefining bt_page_items(text, int) as an SQL-language function >> calling bt_page_items(get_raw_page($1, $2))?

Re: [HACKERS] Parallel bitmap heap scan

2017-03-07 Thread Robert Haas
(On Tue, Feb 28, 2017 at 10:48 AM, Dilip Kumar wrote: > 0001- same as previous with some changes for freeing the shared memory stuff. +if (--ptbase->refcount == 0) +dsa_free(dsa, istate->pagetable); + +if (istate->spages) +{ +ptpages =

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

2017-03-07 Thread David Fetter
On Fri, Mar 03, 2017 at 08:10:52AM +0530, Robert Haas wrote: > On Wed, Mar 1, 2017 at 6:29 AM, Rahila Syed wrote: > > 3. Handling adding a new partition to a partitioned table > >with default partition. > >This will require moving tuples from existing default

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

2017-03-07 Thread Robert Haas
On Mon, Mar 6, 2017 at 10:28 PM, Amit Kapila wrote: > I also think that commit didn't intend to change the behavior, > however, the point is how sensible is it to keep such behavior after > Parallel Append. I am not sure if this is the right time to consider > it or

Re: [HACKERS] ALTER PUBLICATION and segmentation fault

2017-03-07 Thread Masahiko Sawada
On Wed, Mar 8, 2017 at 12:45 AM, Fujii Masao wrote: > Hi, > > When I logged in PostgreSQL as non-superuser and ran > ALTER PUBLICATION command, I got a segmentation fault. > The code checking the owner of publication might have a bug. > > =# CREATE ROLE foo NOSUPERUSER

Re: [HACKERS] Proposal : Parallel Merge Join

2017-03-07 Thread Dilip Kumar
On Tue, Mar 7, 2017 at 10:28 PM, Robert Haas wrote: >> Apart from this, there was one problem in match_unsorted_outer (in >> v10), Basically, if inner_cheapest_total was not parallel_safe then I >> was always getting parallel safe inner. But, we should not do anything >> if

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 12:11 AM, Ashutosh Bapat wrote: > I see that all the changes by Amit and myself to what was earlier 0003 > patch are now part of 0002 patch. The patch looks ready for committer. Reviewing 0002: This patch seems to have falsified the header

Re: [HACKERS] Proposal : Parallel Merge Join

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 11:38 AM, Dilip Kumar wrote: > On Tue, Mar 7, 2017 at 7:47 PM, Robert Haas wrote: >> You're right to be confused, because that seems to be a bug in the >> existing code. There seems to be no guarantee that the cheapest >>

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

2017-03-07 Thread Andres Freund
Hi, On 2017-03-08 00:15:05 +1300, David Rowley wrote: > -static List *RecoveryLockList; > +/* > + * RecoveryLockTable is a poor man's hash table that allows us to partition > + * the stored locks. Which partition a lock is stored in is determined by the > + * xid which the lock belongs to. The

Re: [HACKERS] Poor memory context performance in large hash joins

2017-03-07 Thread Tom Lane
Andres Freund writes: >>> On 2017-02-24 18:04:18 -0500, Tom Lane wrote: Concretely, something like the attached. This passes regression tests but I've not pushed on it any harder than that. > I think we should go forward with something like this patch in all >

Re: [HACKERS] Statement-level rollback

2017-03-07 Thread legrand legrand
Thanks ! that's a very good new ! I'm still receiving the famous "current transaction is aborted" error when usingversion 42.0.0 with jdbc:postgresql://localhost:5432/postgres?autosave=always But I will see that with pgjdbc team ;o) Regards PAscal -- View this message in

Re: [HACKERS] Statement-level rollback

2017-03-07 Thread Vladimir Sitnikov
Please disregard my previous message. pgjdbc is already doing upcase conversion, so I would like to see a test case that reproduces the error. Alternatively, could you please capture and share TRACE log? ( https://jdbc.postgresql.org/documentation/head/logging.html#configuration ) Vladimir ср,

Re: [HACKERS] cast result of copyNode()

2017-03-07 Thread Mark Dilger
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi Peter, I like the patch so far, and it passes all the regression

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-07 Thread Andres Freund
On 2017-03-07 21:48:23 -0500, Robert Haas wrote: > On Sun, Mar 5, 2017 at 7:13 PM, Andreas Karlsson wrote: > > And I would argue that his feature is useful for quite many, based on my > > experience running a semi-large database. Index bloat happens and without > > REINDEX

Re: [HACKERS] Protect syscache from bloating with negative cache entries

2017-03-07 Thread David Steele
On 3/3/17 4:54 PM, David Steele wrote: On 2/1/17 1:25 AM, Kyotaro HORIGUCHI wrote: Hello, thank you for moving this to the next CF. At Wed, 1 Feb 2017 13:09:51 +0900, Michael Paquier wrote in

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-03-07 Thread Haribabu Kommi
On Wed, Mar 1, 2017 at 12:59 PM, Haribabu Kommi wrote: > > Patch attached. Still some more docs needs to be added. > Updated patch attached to resolve the conflicts with following commit. commit 9a83d56b38c870ce47b7651385ff2add583bf136 Author: Simon Riggs

Re: [HACKERS] SCRAM authentication, take three

2017-03-07 Thread Magnus Hagander
On Tue, Mar 7, 2017 at 4:36 AM, Heikki Linnakangas wrote: > On 03/02/2017 08:50 AM, Michael Paquier wrote: > >> Attached is a new patch set. I have combined SASLprep with the rest >> and fixed some conflicts. At the same time when going through NFKC >> this morning I have

Re: [HACKERS] New SQL counter statistics view (pg_stat_sql)

2017-03-07 Thread Haribabu Kommi
On Wed, Feb 1, 2017 at 3:13 PM, Michael Paquier wrote: > On Fri, Jan 27, 2017 at 10:26 AM, Haribabu Kommi > wrote: > > Thanks for the review. > > Let's wait for the committer's opinion. > > I have moved this patch to CF 2017-03 to wait for

Re: [HACKERS] ALTER PUBLICATION and segmentation fault

2017-03-07 Thread Peter Eisentraut
On 3/7/17 11:56, Masahiko Sawada wrote: > This issue happen even ALTER SUBSCRIPTION. I guess the main cause is > that acl_kind of pg_publication and pg_subscription of ObjectProperty > array are not correct. These values should be set ACL_KIND_PUBLICATION > and ACL_KIND_SUBSCRIPTION instead of -1.

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

2017-03-07 Thread Magnus Hagander
On Tue, Mar 7, 2017 at 7:24 AM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > On 03/07/2017 07:58 AM, Simon Riggs wrote: > > On 7 March 2017 at 20:36, Alvaro Herrera > wrote: > > > >> FWIW, +1 on improving matters here. > > +1 also. > > > > I don't see

Re: [HACKERS] Bizarre choice of case for RELKIND_PARTITIONED_TABLE

2017-03-07 Thread Amit Langote
On 2017/03/08 2:55, Tom Lane wrote: > Is there a good reason why RELKIND_PARTITIONED_TABLE is 'P' not 'p'? > It looks rather out of place considering that seven of the eight > pre-existing relkind codes are lower case. (And no, I don't especially > approve of RELKIND_SEQUENCE being 'S' either,

Re: [HACKERS] [NOVICE] opr_charset rule in gram.y

2017-03-07 Thread Neha Khatri
I see it is already addressed in master. Thanks. Regards, Neha

Re: [HACKERS] Bizarre choice of case for RELKIND_PARTITIONED_TABLE

2017-03-07 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 7, 2017 at 6:03 PM, Tom Lane wrote: >> Hm, one would hope that the vast majority of code references are neither >> of those, but rather "RELKIND_PARTITIONED_TABLE". > For reasons which must've seemed good to whoever

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-07 Thread Andres Freund
Hi, On 2017-03-07 18:46:31 -0500, Peter Eisentraut wrote: > I looked over > 0001-Add-expression-dependencies-on-composite-type-whole-.patch. That > seems useful independent of the things you have following. > > Even though it is presented more as a preparatory change, it appears to > have

Re: [HACKERS] Avoiding OOM in a hash join with many duplicate inner keys

2017-03-07 Thread Tom Lane
Thomas Munro writes: > I have been wondering about a couple of different worst case execution > strategies that would be better than throwing our hands up and > potentially exploding memory once we detect that further partitioning > is not going to help, if we still

Re: [HACKERS] Statement-level rollback

2017-03-07 Thread legrand legrand
There was a mistake in my driver definition, this works fine with autosave=always (but not with autoSave ...) Thanks Again De : Vladimir Sitnikov [via PostgreSQL] Envoyé : mardi 7 mars 2017 22:32:27 À : legrand

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

2017-03-07 Thread Tom Lane
Andres Freund writes: > +++ b/src/include/storage/barrier.h > +#include "postgres.h" > Huh, that normally shouldn't be in a header. I see you introduced that > in a bunch of other places too - that really doesn't look right to me. That is absolutely not project style and is

Re: [HACKERS] delta relations in AFTER triggers

2017-03-07 Thread Kevin Grittner
On Mon, Feb 20, 2017 at 7:44 PM, Thomas Munro wrote: > Was it intentional that this test doesn't include any statements that > reach the case where the trigger does RAISE EXCEPTION 'RI error'? > From the output generated there doesn't seem to be any evidence that >

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-07 Thread Peter Eisentraut
I looked over 0001-Add-expression-dependencies-on-composite-type-whole-.patch. That seems useful independent of the things you have following. Even though it is presented more as a preparatory change, it appears to have noticeable user-facing impact, which we should analyze. For example, in the

Re: [HACKERS] Logical replication existing data copy

2017-03-07 Thread Erik Rijkers
On 2017-03-06 11:27, Petr Jelinek wrote: 0001-Reserve-global-xmin-for-create-slot-snasphot-export.patch + 0002-Don-t-use-on-disk-snapshots-for-snapshot-export-in-l.patch+ 0003-Prevent-snapshot-builder-xmin-from-going-backwards.patch + 0004-Fix-xl_running_xacts-usage-in-snapshot-builder.patch

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 5:08 PM, Robert Haas wrote: > On Wed, Mar 1, 2017 at 4:18 AM, Robert Haas wrote: >> On Tue, Feb 28, 2017 at 7:31 PM, Amit Kapila wrote: >>> Yeah, actually those were added later in Enable-WAL-for-Hash*

Re: [HACKERS] Statement-level rollback

2017-03-07 Thread Dave Cramer
You have to turn it on using the autosave parameter. it's not on by default, and apparently not documented Dave Cramer da...@postgresintl.com www.postgresintl.com On 7 March 2017 at 17:15, legrand legrand wrote: > Thanks ! > > that's a very good new ! > > > I'm

Re: [HACKERS] Statement-level rollback

2017-03-07 Thread Vladimir Sitnikov
legrand>when usingversion 42.0.0 with legrand> jdbc:postgresql://localhost:5432/postgres?autosave=always The pitfall there is the value should be written with upper case like autosave=ALWAYS. I've filed https://github.com/pgjdbc/pgjdbc/issues/769 to improve that at some point. Vladimir

Re: [HACKERS] Bizarre choice of case for RELKIND_PARTITIONED_TABLE

2017-03-07 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 7, 2017 at 12:55 PM, Tom Lane wrote: >> Is there a good reason why RELKIND_PARTITIONED_TABLE is 'P' not 'p'? > I can't muster a lot of outrage about this one way or another. One > possible advantage of 'P' is that

Re: [HACKERS] [NOVICE] opr_charset rule in gram.y

2017-03-07 Thread Neha Khatri
On Tue, Mar 7, 2017 at 4:30 PM, Tom Lane wrote: > Neha Khatri writes: > > I was going through the grammer rule for Character types in gram.y and > > found an optional sub rule in is "opt_charset" > > This question seems quite off-topic for

Re: [HACKERS] Bizarre choice of case for RELKIND_PARTITIONED_TABLE

2017-03-07 Thread Peter Eisentraut
On 3/7/17 12:55, Tom Lane wrote: > Is there a good reason why RELKIND_PARTITIONED_TABLE is 'P' not 'p'? I was confused about this too. If there is no argument against it, I would favor changing it. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7

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

2017-03-07 Thread Josh Berkus
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. >>> FWIW, my only complain is about the removal of trigger_file, this is >>>

Re: [HACKERS] cast result of copyNode()

2017-03-07 Thread Tom Lane
Mark Dilger writes: > You appear to be using a #define macro to wrap a function of the same name > with the code: > #define copyObject(obj) ((typeof(obj)) copyObject(obj)) > I don't necessarily have a problem with that, but it struck me as a bit odd, > and > grep'ing

Re: [HACKERS] Bizarre choice of case for RELKIND_PARTITIONED_TABLE

2017-03-07 Thread Robert Haas
On Tue, Mar 7, 2017 at 6:03 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Mar 7, 2017 at 12:55 PM, Tom Lane wrote: >>> Is there a good reason why RELKIND_PARTITIONED_TABLE is 'P' not 'p'? > >> I can't muster a lot of outrage

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

2017-03-07 Thread Andres Freund
Hi, 0001: Do hash join work_mem accounting in chunks. Don't think there's much left to say. 0002: Check hash join work_mem usage at the point of chunk allocation. Modify the existing hash join code to detect work_mem exhaustion at the point where chunks are allocated, instead of checking after

  1   2   >