Re: [HACKERS] Declarative partitioning - another take

2017-01-05 Thread Amit Langote
Hi Keith, On 2017/01/06 2:16, Keith Fiske wrote: > Could we get some clarification on the partition_bound_spec portion of the > PARTITION OF clause? Just doing some testing it seems it's inclusive of the > FROM value but exclusive of the TO value. I don't see mention of this in > the docs as of

Re: [HACKERS] Group clear xid can leak semaphore count

2017-01-05 Thread Amit Kapila
On Fri, Jan 6, 2017 at 1:13 AM, Robert Haas wrote: > On Sat, Dec 31, 2016 at 12:44 AM, Amit Kapila wrote: >> During the review of Group update Clog patch [1], Dilip noticed an >> issue with the patch where it can leak the semaphore count in one of

Re: [HACKERS] merging some features from plpgsql2 project

2017-01-05 Thread Pavel Stehule
2017-01-05 18:36 GMT+01:00 Merlin Moncure : > On Thu, Jan 5, 2017 at 11:03 AM, Robert Haas > wrote: > > Now, that's not to say we should never break backward compatibility. > > Sometimes we should. I think the problem with PL/pgsql is that many > > of

[HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-05 Thread Ryan Murphy
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed (Though I could not check "make installcheck-world" as

Re: [HACKERS] pageinspect: Hash index support

2017-01-05 Thread Ashutosh Sharma
> The previous patch was using pageinspect--1.5.sql as a base, and then uses > pageinspect--1.5-1.6.sql to upgrade to version 1.6. > > Removing pageinspect--1.5.sql, and adding pageinspect--1.6.sql with the > current interface will use pageinspect--1.6.sql directly where as existing >

Re: [HACKERS] Cache Hash Index meta page.

2017-01-05 Thread Amit Kapila
On Thu, Jan 5, 2017 at 11:38 AM, Mithun Cy wrote: > On Wed, Jan 4, 2017 at 5:21 PM, Mithun Cy wrote: > I have re-based the patch to fix one compilation warning > @_hash_doinsert where variable bucket was only used for Asserting but > was

Re: [HACKERS] increasing the default WAL segment size

2017-01-05 Thread Michael Paquier
On Thu, Jan 5, 2017 at 8:39 PM, Beena Emerson wrote: > On Tue, Jan 3, 2017 at 5:46 PM, Michael Paquier > wrote: >> Actually, why not just having an equivalent of the SQL >> command and be able to query parameter values? > > This patch only

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Pavel Stehule
2017-01-06 7:01 GMT+01:00 Pavel Stehule : > > >> >>> >>> Thank you for your work on this topic. >>> >>> Unfortunately, there is significant disagreement in this topic between >>> us. I see a schema based persistent metadata a catalog based security as >>> fundamental

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Pavel Stehule
> >> >> Thank you for your work on this topic. >> >> Unfortunately, there is significant disagreement in this topic between >> us. I see a schema based persistent metadata a catalog based security as >> fundamental feature. Editing config file is not acceptable in any view. >> > > I generally

Re: [HACKERS] Logical decoding on standby

2017-01-05 Thread Michael Paquier
On Fri, Jan 6, 2017 at 1:07 PM, Craig Ringer wrote: > On 5 January 2017 at 13:12, Michael Paquier wrote: >> On Thu, Jan 5, 2017 at 10:21 AM, Craig Ringer wrote: >>> On 5 January 2017 at 09:19, Craig Ringer

Re: [HACKERS] Microvacuum support for Hash Index

2017-01-05 Thread Ashutosh Sharma
Hi, > using pgbench -M prepared -c 10 -j 10 -T 600 -f test.sql test > > crashes after a few minutes with > > TRAP: FailedAssertion("!(LWLockHeldByMeInMode(((LWLock*) > (&(bufHdr)->content_lock)), LW_EXCLUSIVE))", File: "bufmgr.c", Line: 3781) Attached v4 patch fixes this assertion failure. >

Re: [HACKERS] Parallel bitmap heap scan

2017-01-05 Thread Amit Khandekar
Sorry for the delay in my next response. I still haven't exhaustively gone through all changes, but meanwhile, below are some more points. On 26 November 2016 at 18:18, Dilip Kumar wrote: > On Tue, Nov 22, 2016 at 9:05 AM, Dilip Kumar wrote: >> On

Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support

2017-01-05 Thread Vitaly Burovoy
On 1/4/17, Haribabu Kommi wrote: > On Tue, Nov 29, 2016 at 8:36 PM, Haribabu Kommi > wrote: >> Updated patch attached with added cast function from macaddr8 to >> macaddr. >> >> Currently there are no support for cross operators. Is this

Re: [HACKERS] pg_stat_activity.waiting_start

2017-01-05 Thread Joel Jacobson
On Thu, Jan 5, 2017 at 4:59 PM, Bruce Momjian wrote: > Agreed. No need in adding overhead for short-lived locks because the > milli-second values are going to be meaningless to users. I would be > happy if we could find some weasel value for non-heavyweight locks. To avoid a

Re: [HACKERS] Supporting huge pages on Windows

2017-01-05 Thread Amit Kapila
On Thu, Jan 5, 2017 at 8:42 AM, Tsunakawa, Takayuki wrote: >> Your version of the patch looks better than the previous one. Don't you >> need to consider MEM_LARGE_PAGES in VirtualAllocEx call (refer >> pgwin32_ReserveSharedMemoryRegion)? At least that is what is

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

2017-01-05 Thread Craig Ringer
On 5 January 2017 at 20:43, Stas Kelvich wrote: > Anyway, I can measure WAL space overhead introduced by the GID’s inside > commit records > to know exactly what will be the cost of such approach. Sounds like a good idea, especially if you remove any attempt to work

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Craig Ringer
On 6 January 2017 at 08:44, Jim Nasby wrote: >>(1) private/public visibility (as Oracle does with package vars). >>this point is enough to implement the presented use case. Agreed. >>(2) typing (casting is a pain) We already have typed

Re: [HACKERS] Logical decoding on standby

2017-01-05 Thread Craig Ringer
On 5 January 2017 at 13:12, Michael Paquier wrote: > On Thu, Jan 5, 2017 at 10:21 AM, Craig Ringer wrote: >> On 5 January 2017 at 09:19, Craig Ringer wrote: >> >>> so here's a rebased series on top of master. No other

Re: [HACKERS] Faster methods for getting SPI results

2017-01-05 Thread Jim Nasby
On 12/28/16 3:14 AM, Craig Ringer wrote: On 28 December 2016 at 12:32, Jim Nasby wrote: On 12/27/16 9:10 PM, Craig Ringer wrote: On 28 December 2016 at 09:58, Jim Nasby wrote: I've looked at this some more, and ITSM that the only way to

[HACKERS] Hash support for grouping sets

2017-01-05 Thread Andrew Gierth
Herewith a patch for doing grouping sets via hashing or mixed hashing and sorting. The principal objective is to pick whatever combination of grouping sets has an estimated size that fits in work_mem, and minimizes the number of sorting passes we need to do over the data, and hash those. (Yes,

Re: [HACKERS] Supporting huge pages on Windows

2017-01-05 Thread Tsunakawa, Takayuki
From: Thomas Munro [mailto:thomas.mu...@enterprisedb.com] > In the Microsoft documentation I've seen, the privilege's name is always > written as "Lock Pages in Memory" (note: "Pages" plural, and with initial > capital letters). It's quite hard to parse the sentence otherwise! How > about this?

Re: [HACKERS] pg_stat_activity.waiting_start

2017-01-05 Thread Bruce Momjian
On Mon, Dec 26, 2016 at 03:36:39PM -0500, Tom Lane wrote: > In practice, there should never be waits on LWLocks (much less spinlocks) > that exceed order-of-milliseconds; if there are, either we chose the wrong > lock type or the system is pretty broken in general. So maybe it's > sufficient if

Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Vitaly Burovoy
On 1/5/17, Tom Lane wrote: > Vitaly Burovoy writes: >> On 1/5/17, Tom Lane wrote: >>> My point is that ideally, any value that can physically fit into struct >>> Interval ought to be considered valid. The fact that interval_out

Re: [HACKERS] T_Float morph to T_Integer after nodeRead

2017-01-05 Thread Kouhei Kaigai
> Kouhei Kaigai writes: > > Simplified description of what I did is: > > fval = makeFloat(psprintf("%.0f", plan_nrows)); > > custom_scan->custom_private = list_make1(fval); > > So don't do that. The lexer would never produce T_Float for an > integer-looking string, so

Re: [HACKERS] Indirect indexes

2017-01-05 Thread Bruce Momjian
On Fri, Dec 30, 2016 at 07:35:30PM -0300, Alvaro Herrera wrote: > Attached is v4, which fixes a couple of relatively minor bugs. There > are still things to tackle before this is committable, but coding review > of the new executor node would be welcome. > > The big remaining item is still

Re: [HACKERS] T_Float morph to T_Integer after nodeRead

2017-01-05 Thread Tom Lane
Kouhei Kaigai writes: > Simplified description of what I did is: > fval = makeFloat(psprintf("%.0f", plan_nrows)); > custom_scan->custom_private = list_make1(fval); So don't do that. The lexer would never produce T_Float for an integer-looking string, so I think it's

Re: [HACKERS] Reporting planning time with EXPLAIN

2017-01-05 Thread Tom Lane
Andres Freund writes: > On 2016-12-28 10:29:48 -0500, Tom Lane wrote: >> How about just saying that the existing TIMING option turns this on, > I don't like this much - I'd like (as previously stated in [1]) to be > able to have an actual EXPLAIN ANALYZE (COSTS off, TIMING

Re: [HACKERS] DROP FUNCTION of multiple functions

2017-01-05 Thread Jim Nasby
Forwarding some comments I neglected to send to the list... On 1/3/17 9:16 AM, Peter Eisentraut wrote: > On 1/2/17 1:04 PM, Jim Nasby wrote: On 12/31/16 10:17 AM, Peter Eisentraut wrote: --- a/src/test/regress/expected/event_trigger.out +++ b/src/test/regress/expected/event_trigger.out @@

[HACKERS] T_Float morph to T_Integer after nodeRead

2017-01-05 Thread Kouhei Kaigai
I noticed a strange behavior when T_Float value is serialized, then deserialized on the worker process for cpu parallel execution. Simplified description of what I did is: fval = makeFloat(psprintf("%.0f", plan_nrows)); custom_scan->custom_private = list_make1(fval); This string expression

Re: [HACKERS] [PATCH] guc-ify the formerly hard-coded MAX_SEND_SIZE to max_wal_send

2017-01-05 Thread Jonathon Nelson
On Thu, Jan 5, 2017 at 1:01 PM, Andres Freund wrote: > Hi, > > On 2017-01-05 12:55:44 -0600, Jonathon Nelson wrote: > > Attached please find a patch for PostgreSQL 9.4 which changes the maximum > > amount of data that the wal sender will send at any point in time from > the >

Re: [HACKERS] Reporting planning time with EXPLAIN

2017-01-05 Thread Andres Freund
On 2016-12-28 10:29:48 -0500, Tom Lane wrote: > How about just saying that the existing TIMING option turns this on, > if it's specified without ANALYZE? Right now that combination draws > an error: > > regression=# explain (timing on) select 1; > ERROR: EXPLAIN option TIMING

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Jim Nasby
On 1/5/17 4:59 AM, Pavel Stehule wrote: - Personnaly, I'm not convinced that a NEW type of session variable is a good thing as pg already has one, and two is one too many. I would find it more useful to enhance existing dynamic session variables with, by order of

Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal

2017-01-05 Thread Michael Paquier
On Fri, Jan 6, 2017 at 1:31 AM, Vladimir Rusinov wrote: > Attaching a patch that renames all 'xlog' functions, keeping aliases for old > ones (since it looks like majority vote is for keeping them). OK. > - OIDs - where do I get numbers from? I was kinda choosing them at

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Thomas Munro
On Fri, Jan 6, 2017 at 11:07 AM, Tom Lane wrote: > So, um, how do we know that backend A and backend B have the same idea > about what tranche id 37 means? [butting in] In the particular case of dsa.c, the client has to supply a tranche ID when creating the DSA area, and

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Peter Eisentraut
On 1/5/17 11:56 AM, Stephen Frost wrote: > I've seen complaints about it and have seen people changing the > permissions to be root/root on the .auto.conf file to disallow 'regular' > superusers from doing ALTER SYSTEM. It's not exactly elegant but it's a > way to avoid the risk of someone

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Tom Lane
Robert Haas writes: > On Thu, Jan 5, 2017 at 4:33 PM, Tom Lane wrote: >> Better documentation seems required, but really the whole design seems >> rather wacko. Backends must agree on numeric tranche IDs, but every >> backend has its own copy of the

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 4:33 PM, Tom Lane wrote: > Robert Haas writes: >> I suspect you're going to tell me this all needs to be better >> documented, which is probably a valid criticism. Suggestions as to >> where such documentation should be added -

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Michael Banck
On Mon, Jan 02, 2017 at 10:21:41AM +0100, Magnus Hagander wrote: > On Mon, Jan 2, 2017 at 10:17 AM, Simon Riggs wrote: > > On 31 December 2016 at 15:00, Magnus Hagander wrote: > > > max_wal_senders=10 > > > max_replication_slots=20 [...] > > >

Re: [HACKERS] Group clear xid can leak semaphore count

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 4:48 PM, Tom Lane wrote: > Robert Haas writes: >> I think we have run into this kind of issue before. I wonder if >> there's any way to insert some kind of a guard - e.g. detect at >> backend startup time that the semaphore has a

Re: [HACKERS] Group clear xid can leak semaphore count

2017-01-05 Thread Tom Lane
Robert Haas writes: > I think we have run into this kind of issue before. I wonder if > there's any way to insert some kind of a guard - e.g. detect at > backend startup time that the semaphore has a non-zero value and fix > it, issuing a warning along the way... maybe

Re: [HACKERS] Supporting huge pages on Windows

2017-01-05 Thread Thomas Munro
On Thu, Jan 5, 2017 at 4:12 PM, Tsunakawa, Takayuki wrote: > [win_large_pages_v4.patch] Just a small suggestion about the wording in this patch: +This feature uses the large-page support on Windows. To use the large-page +support, you need to

Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Tom Lane
Vitaly Burovoy writes: > On 1/5/17, Tom Lane wrote: >> My point is that ideally, any value that can physically fit into struct >> Interval ought to be considered valid. The fact that interval_out can't >> cope is a bug in interval_out, which ideally

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Tom Lane
Robert Haas writes: > I suspect you're going to tell me this all needs to be better > documented, which is probably a valid criticism. Suggestions as to > where such documentation should be added - either as code comments or > in a README somewhere or in doc/src/sgml -

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Tomas Vondra
On 01/05/2017 05:37 PM, Stephen Frost wrote: Tomas, * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: On 01/05/2017 02:23 PM, Magnus Hagander wrote: It's easy enough to construct a benchmark specifically to show the difference, but of any actual "normal workload" for it. Typically the

Re: [HACKERS] Replication slot xmin is not reset if HS feedback is turned off while standby is shut down

2017-01-05 Thread Ants Aasma
On 5 Jan 2017 2:54 a.m., "Craig Ringer" wrote: On 2 January 2017 at 22:24, Craig Ringer wrote: > > > On 2 Jan. 2017 20:20, "Simon Riggs" wrote: > > On 21 December 2016 at 13:23, Simon Riggs wrote: > >>

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 1:15 PM, Tom Lane wrote: > Robert Haas writes: >> No, I think backend-lifetime is right. The tranche registrations are >> all backend-local state, so there's no problem with backend A >> registering a string at one address and

Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal

2017-01-05 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: > On 2017-01-04 09:38:42 -0500, Stephen Frost wrote: > > * Andres Freund (and...@anarazel.de) wrote: > > > On 2017-01-03 10:37:08 -0500, Stephen Frost wrote: > > > > * Vladimir Rusinov (vrusi...@google.com) wrote: > > > > > I think I +1 on this.

Re: [HACKERS] Group clear xid can leak semaphore count

2017-01-05 Thread Robert Haas
On Sat, Dec 31, 2016 at 12:44 AM, Amit Kapila wrote: > During the review of Group update Clog patch [1], Dilip noticed an > issue with the patch where it can leak the semaphore count in one of > the corner case. I have checked and found that similar issue exists > for

Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Vitaly Burovoy
On 1/5/17, Tom Lane wrote: > Vitaly Burovoy writes: >> On 1/5/17, Tom Lane wrote: >>> We could think about replacing interval2tm's output format with some >>> other struct that uses a TimeOffset for hours and so cannot overflow.

Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal

2017-01-05 Thread Andres Freund
On 2017-01-04 09:38:42 -0500, Stephen Frost wrote: > Andres, > > * Andres Freund (and...@anarazel.de) wrote: > > On 2017-01-03 10:37:08 -0500, Stephen Frost wrote: > > > * Vladimir Rusinov (vrusi...@google.com) wrote: > > > > I think I +1 on this. > > > > I've did a github search on these

Re: [HACKERS] [PATCH] guc-ify the formerly hard-coded MAX_SEND_SIZE to max_wal_send

2017-01-05 Thread Andres Freund
Hi, On 2017-01-05 12:55:44 -0600, Jonathon Nelson wrote: > Attached please find a patch for PostgreSQL 9.4 which changes the maximum > amount of data that the wal sender will send at any point in time from the > hard-coded value of 128KiB to a user-controllable value up to 16MiB. It has > been

[HACKERS] [PATCH] guc-ify the formerly hard-coded MAX_SEND_SIZE to max_wal_send

2017-01-05 Thread Jonathon Nelson
Attached please find a patch for PostgreSQL 9.4 which changes the maximum amount of data that the wal sender will send at any point in time from the hard-coded value of 128KiB to a user-controllable value up to 16MiB. It has been primarily tested under 9.4 but there has been some testing with 9.5.

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Euler Taveira
On 04-01-2017 17:30, Tom Lane wrote: > Simon Riggs writes: >> My next thought is ALTER SYSTEM support for pg_hba.conf, especially >> since that would make it easier to do a formal test of Haribabu's >> pg_hba view patch by adding each of the options one by one and then >>

Re: [HACKERS] [PATCH] Add GUCs for predicate lock promotion thresholds

2017-01-05 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: >> One thing I don't like about this patch is that if a user has increased >> max_pred_locks_per_transaction, they need to set >> max_pred_locks_per_relation to half of that

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Tom Lane
Robert Haas writes: > No, I think backend-lifetime is right. The tranche registrations are > all backend-local state, so there's no problem with backend A > registering a string at one address and backend B registering a string > at a different address. It's just

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Joe Conway
On 01/05/2017 08:27 AM, Robert Haas wrote: > There's also the question of whether opening up the ability to do > this sort of thing from the SQL level is a security hazard, It unquestionably is. > but we've already gone fairly far down the path of assuming that > there's not a tremendous amount

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 1:02 PM, Tom Lane wrote: > Robert Haas writes: >> Not that you mention it, I think I mis-stated the problem in the >> commit message: the problem is not if the tranche is unregistered, but >> rather if it is registered but the

Re: [HACKERS] [PATCH] Add GUCs for predicate lock promotion thresholds

2017-01-05 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > One thing I don't like about this patch is that if a user has increased > max_pred_locks_per_transaction, they need to set > max_pred_locks_per_relation to half of that to retain the current > behaviour, or they'll suddenly find themselves

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Tom Lane
Robert Haas writes: > Not that you mention it, I think I mis-stated the problem in the > commit message: the problem is not if the tranche is unregistered, but > rather if it is registered but the pointer references an address that > is no longer valid. Registering the

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 12:37 PM, Tom Lane wrote: > Robert Haas writes: >> With the old code, a backend that read pg_stat_activity without ever >> having executed a parallel query might see a backend in the midst of >> executing one waiting on a DSA

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-01-05 Thread Robert Haas
On Wed, Jan 4, 2017 at 3:21 AM, Masahiko Sawada wrote: > Hi and happy new year. > > The lazy vacuum calls lazy_cleanup_index to update statistics of > indexes on a table such as relpages, reltuples at the end of the > lazy_scan_heap. In all type of indexes the

Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

2017-01-05 Thread Tom Lane
Robert Haas writes: > With the old code, a backend that read pg_stat_activity without ever > having executed a parallel query might see a backend in the midst of > executing one waiting on a DSA LWLock, resulting in a crash. The > solution is for backends to register the

Re: [HACKERS] use strict in all Perl programs

2017-01-05 Thread Peter Eisentraut
On 12/31/16 1:34 AM, Michael Paquier wrote: > On Sat, Dec 31, 2016 at 3:07 PM, Peter Eisentraut > wrote: >> Here is a patch to add 'use strict' to all Perl programs (that I could >> find), or move it to the right place where it was already there. I >> think that

Re: [HACKERS] merging some features from plpgsql2 project

2017-01-05 Thread Merlin Moncure
On Thu, Jan 5, 2017 at 11:03 AM, Robert Haas wrote: > Now, that's not to say we should never break backward compatibility. > Sometimes we should. I think the problem with PL/pgsql is that many > of the compatibility breaks that people want are likely to lead to > subtle

Re: [HACKERS] Microvacuum support for Hash Index

2017-01-05 Thread Jesper Pedersen
Hi Ashutosh, On 01/04/2017 06:13 AM, Ashutosh Sharma wrote: Attached is the v3 patch rebased on postgreSQL HEAD and WAL v7 patch. It also takes care of all the previous comments from Jesper - [1]. With an --enable-cassert build (master / WAL v7 / MV v3) and -- ddl.sql -- CREATE TABLE test

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 12:28 PM, Stephen Frost wrote: > Generally speaking, an ALTER DATABASE is unlikely to make the cluster > fail to start. To be clear, I've only seen 1 or 2 cases and I'm not > sure if, in those cases, they even fully understood how much can be > changed

Re: [HACKERS] [sqlsmith] Crash reading pg_stat_activity

2017-01-05 Thread Robert Haas
On Wed, Jan 4, 2017 at 5:03 PM, Thomas Munro wrote: > The way I proposed makes it a lot easier to work with dynamic names so > you can differentiate variable numbers of areas; the names would have > exactly the right extent and they'd get unregistered in each

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Jan 5, 2017 at 11:56 AM, Stephen Frost wrote: > >> One thing I'm kind of happy about is that, as far as I can see, there > >> hasn't been much backlash against the existing ALTER SYSTEM, either > >> from a security point

Re: [HACKERS] generating fmgr prototypes automatically

2017-01-05 Thread Pavel Stehule
Hi 2017-01-04 21:09 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 1/3/17 2:16 PM, Pavel Stehule wrote: > > patch 0001 .. trivial cleaning > > patch 0002 .. renaming lo_* to be_lo_* -- the prefix "be" is not what I > > expect - maybe "pg" instead. More because the

Re: [HACKERS] Declarative partitioning - another take

2017-01-05 Thread Keith Fiske
Could we get some clarification on the partition_bound_spec portion of the PARTITION OF clause? Just doing some testing it seems it's inclusive of the FROM value but exclusive of the TO value. I don't see mention of this in the docs as of commit 18fc5192a631441a73e6a3b911ecb14765140389 yesterday.

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Andres Freund
On 2017-01-05 09:12:49 -0800, Andres Freund wrote: > On 2017-01-05 18:08:36 +0100, Magnus Hagander wrote: > > On Thu, Jan 5, 2017 at 6:01 PM, Andres Freund wrote: > > > > > On 2017-01-05 08:38:32 -0500, Peter Eisentraut wrote: > > > > I also suggest making the defaults for

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Andres Freund
On 2017-01-05 18:08:36 +0100, Magnus Hagander wrote: > On Thu, Jan 5, 2017 at 6:01 PM, Andres Freund wrote: > > > On 2017-01-05 08:38:32 -0500, Peter Eisentraut wrote: > > > I also suggest making the defaults for both 20 instead of 10. That > > > leaves enough room that

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 11:56 AM, Stephen Frost wrote: > Greetings, > > If we keep it to superusers then we aren't changing anything, from my > point of view at least. That does bring up the question of if it'd be > useful for a non-superuser to be able to control. I'm on the

Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Tom Lane
Vitaly Burovoy writes: > On 1/5/17, Tom Lane wrote: >> We could think about replacing interval2tm's output format with some >> other struct that uses a TimeOffset for hours and so cannot overflow. >> I'm not sure though how far the effects would

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Magnus Hagander
On Thu, Jan 5, 2017 at 6:01 PM, Andres Freund wrote: > On 2017-01-05 08:38:32 -0500, Peter Eisentraut wrote: > > I also suggest making the defaults for both 20 instead of 10. That > > leaves enough room that almost nobody ever has to change them, whereas > > 10 can be a bit

Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Vitaly Burovoy
On 1/5/17, Tom Lane wrote: > Vitaly Burovoy writes: >>> I've written a patch which fixes that bug (in attachment). >>> Should it be registered in the CF? > >> Oops. Forgot to attach the patch. Fixed. > > I suspect that many of these SAMESIGN() tests

Re: [HACKERS] merging some features from plpgsql2 project

2017-01-05 Thread Robert Haas
On Wed, Dec 28, 2016 at 2:25 PM, Jim Nasby wrote: > That's my whole point of why this needs to be settable at a global level: so > that people with a lot of legacy code can set the OLD behavior at a global > level, and deal with the old code over time. This has the same

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Andres Freund
On 2017-01-05 08:38:32 -0500, Peter Eisentraut wrote: > I also suggest making the defaults for both 20 instead of 10. That > leaves enough room that almost nobody ever has to change them, whereas > 10 can be a bit tight for some not-outrageous installations (8 standbys > plus backup?). I'm

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jan 4, 2017 at 3:30 PM, Tom Lane wrote: > > Simon Riggs writes: > >> My next thought is ALTER SYSTEM support for pg_hba.conf, especially > >> since that would make it easier to do a

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2017-01-05 Thread Tom Lane
Robert Haas writes: > Of course, if there's some sort of commonly-used library out there for > this sort of thing where we can just link against it and call whatever > APIs it exposes, that might be a better alternative, or something to > support in addition, but I don't

Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Tom Lane
Vitaly Burovoy writes: >> I've written a patch which fixes that bug (in attachment). >> Should it be registered in the CF? > Oops. Forgot to attach the patch. Fixed. I suspect that many of these SAMESIGN() tests you've added are not actually adequate/useful. That's

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Stephen Frost
Tomas, * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: > On 01/05/2017 02:23 PM, Magnus Hagander wrote: > >It's easy enough to construct a benchmark specifically to show the > >difference, but of any actual "normal workload" for it. Typically the > >optimization applies to things like bulk

Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal

2017-01-05 Thread Vladimir Rusinov
Attaching a patch that renames all 'xlog' functions, keeping aliases for old ones (since it looks like majority vote is for keeping them). Following functions have been renamed: Name| Replaced by

Re: [HACKERS] ALTER SYSTEM for pg_hba.conf

2017-01-05 Thread Robert Haas
On Wed, Jan 4, 2017 at 3:30 PM, Tom Lane wrote: > Simon Riggs writes: >> My next thought is ALTER SYSTEM support for pg_hba.conf, especially >> since that would make it easier to do a formal test of Haribabu's >> pg_hba view patch by adding each of the

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Tomas Vondra
On 01/05/2017 02:23 PM, Magnus Hagander wrote: On Thu, Jan 5, 2017 at 12:44 AM, Tomas Vondra > wrote: On 01/03/2017 11:56 PM, Tomas Vondra wrote: Hi, ... I'll push results for larger ones once those

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2017-01-05 Thread Robert Haas
On Wed, Jan 4, 2017 at 11:49 AM, Stephen Frost wrote: >> systemd has support for getting passwords to services without tty. > > Oh, that's interesting, I wasn't aware of that. > >> So if someone is interested, there is some room for enhancement here. > > Agreed. The first

[HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Vitaly Burovoy
On 1/5/17, Vitaly Burovoy wrote: > On 1/4/17, Pantelis Theodosiou wrote: >> On Wed, Jan 4, 2017 at 3:03 PM, wrote: >> >>> The following bug has been logged on the website: >>> >>> Bug reference: 14486 >>> Logged by:

[HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

2017-01-05 Thread Vitaly Burovoy
On 1/4/17, Pantelis Theodosiou wrote: > On Wed, Jan 4, 2017 at 3:03 PM, wrote: > >> The following bug has been logged on the website: >> >> Bug reference: 14486 >> Logged by: Per Modin >> Email address: web+postgre...@modin.io >>

Re: [HACKERS] UNDO and in-place update

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 6:51 AM, Amit Kapila wrote: > UNDO has to be kept till heap page is marked as all visible. This is > required to check the visibility of index. Now, I think the page can > be marked as all visible when we removed corresponding dead entries in >

Re: [HACKERS] UNDO and in-place update

2017-01-05 Thread Robert Haas
On Wed, Jan 4, 2017 at 6:05 AM, Amit Kapila wrote: > Okay, so this optimization can work only after all the active > transactions operating on a page are finished. If that is true, in > some cases such a design can consume a lot of CPU traversing all the > tuples in a

Re: [HACKERS] increasing the default WAL segment size

2017-01-05 Thread Robert Haas
On Thu, Jan 5, 2017 at 6:39 AM, Beena Emerson wrote: > This patch only needed the wal_segment_size and hence I made this specific > command. > How often and why would we need other parameter values in the replication > connection? > Making it a more general command to

Re: [HACKERS] generating fmgr prototypes automatically

2017-01-05 Thread Pavel Stehule
2017-01-04 22:17 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 1/4/17 3:35 PM, Pavel Stehule wrote: > > On 1/3/17 2:16 PM, Pavel Stehule wrote: > > > patch 0001 .. trivial cleaning > > > patch 0002 .. renaming lo_* to be_lo_* -- the prefix "be" is not > what I >

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Fabien COELHO
Good. So we seem to agree that GUCS are transactional? I'm surprised, I never knew this. I must admit that it was also a (good) surprise for me. The documentation says it: """ If SET (or equivalently SET SESSION) is issued within a transaction that is later aborted, the effects of the

Re: pg_authid.rolpassword format (was Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol)

2017-01-05 Thread Michael Paquier
On Thu, Jan 5, 2017 at 10:31 PM, Peter Eisentraut wrote: > On 1/3/17 9:09 AM, Heikki Linnakangas wrote: >> Since not everyone agrees with this approach, I split this patch into >> two. The first patch refactors things, replacing the isMD5() function >> with

Re: [HACKERS] ALTER TABLE .. ALTER COLUMN .. ERROR: attribute .. has wrong type

2017-01-05 Thread Alvaro Herrera
Tom Lane wrote: > We could probably fix the specific issue being seen here by passing the > expression tree through a suitable attno remapping, Here's a first attempt at fixing this. It makes the test pass, but I have the feeling that more complex ones might need more work. Have to leave for a

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Peter Eisentraut
On 1/4/17 2:44 PM, Peter Eisentraut wrote: > On 1/4/17 9:46 AM, Magnus Hagander wrote: >> How about we default max_replication_slots to -1, which means to use the >> same value as max_wal_senders? > >> But you don't necessarily want to adjust them together, do you? They are >> both capped

Re: pg_authid.rolpassword format (was Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol)

2017-01-05 Thread Peter Eisentraut
On 1/3/17 9:09 AM, Heikki Linnakangas wrote: > Since not everyone agrees with this approach, I split this patch into > two. The first patch refactors things, replacing the isMD5() function > with get_password_type(), without changing the representation of > pg_authid.rolpassword. That is

Re: [HACKERS] pageinspect: Hash index support

2017-01-05 Thread Jesper Pedersen
Hi Ashutosh, On 01/05/2017 07:13 AM, Ashutosh Sharma wrote: * Readded pageinspect--1.6.sql In order to have the latest pageinspect interface in 1 file, as we need something to install from. I think there should be no problem even if we simply add pageinspect--1.5--1.6.sql file instead of

Re: [HACKERS] Replication/backup defaults

2017-01-05 Thread Magnus Hagander
On Thu, Jan 5, 2017 at 12:44 AM, Tomas Vondra wrote: > On 01/03/2017 11:56 PM, Tomas Vondra wrote: > >> Hi, >> >> ... > >> I'll push results for larger ones once those tests complete (possibly >> tomorrow). >> >> > I just pushed additional results (from the

Re: [HACKERS] rewrite HeapSatisfiesHOTAndKey

2017-01-05 Thread Pavan Deolasee
On Thu, Jan 5, 2017 at 6:15 PM, Amit Kapila wrote: > > Your test and results look good, what kind of m/c you have used to > test this. I ran it on my Macbook Pro, so nothing fancy. The code was compiled with simple ./confgure and with no special flags. The only

  1   2   >