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

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

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

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

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

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

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

Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.

2017-01-05 Thread Kuntal Ghosh
On Wed, Dec 21, 2016 at 7:22 PM, Ashutosh Sharma wrote: > Hi All, > > I have introduced a new function 'pgstathashindex()' inside pgstatuple > extension to view the statistics related to hash index table. > I think this feature is going to be helpful. I've some initial

Re: [HACKERS] Declarative partitioning - another take

2017-01-05 Thread Amit Langote
On 2016/12/14 12:14, Venkata B Nagothi wrote: > Loading the data into a normal table is not an issue (infact the csv is > generated from the table itself) > > The issue is occurring only when i am trying to load the data from CSV file > into a partitioned table - > > db01=# CREATE TABLE

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

2017-01-05 Thread Fabien COELHO
Hello Tom, Please look at changing \into to be a SQL-command-ending backslash command as we previously discussed. Hmmm. I do want storing results & compound command ending to be orthogonal. In order to keep this feature, I think that I can move the "into/ginto/gset/..." at the end of the

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Pavel Stehule
2017-01-05 10:59 GMT+01:00 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

Re: [HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2017-01-05 Thread Etsuro Fujita
On 2017/01/03 15:57, Ashutosh Bapat wrote: The patch looks good to me, but I feel there are too many testscases. Now that we have changed the approach to invalidate caches in all cases, should we just include cases for SELECT or UPDATE or INSERT or DELETE instead of each statement? I don't

Re: [HACKERS] Odd behavior with PG_TRY

2017-01-05 Thread Amit Kapila
On Thu, Jan 5, 2017 at 4:18 AM, Jim Nasby wrote: > On 1/3/17 9:20 PM, Amit Kapila wrote: >> >> >> Good to know that it worked, but what is the theory? From your >> experiment, it appears that in some cases accessing local pointer >> variables is okay and in other cases,

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

2017-01-05 Thread Stas Kelvich
Thank you for looking into this. > On 5 Jan 2017, at 09:43, Simon Riggs wrote: >> >> GID is now variable sized. You seem to have added this to every >> commit, not just 2PC > Hm, didn’t realise that, i’ll fix. > I've just realised that you're adding GID because it

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Fabien COELHO
Hello Pavel, There are more reasons, why I would not to use GUC 0. it is not designed be secure - there is different security model - readonly, superuser, others Sure, GUCs as is are not enough, but the model can be extended instead of re-inventing the wheel with a new kind of variable.

Re: [HACKERS] increasing the default WAL segment size

2017-01-05 Thread Beena Emerson
Hello, Thank you for your review. On Tue, Jan 3, 2017 at 2:53 AM, Jim Nasby wrote: > The following review has been posted through the commitfest application: > make installcheck-world: not tested > Implements feature: not tested > Spec compliant: not

Re: [HACKERS] increasing the default WAL segment size

2017-01-05 Thread Beena Emerson
Hello, On Tue, Jan 3, 2017 at 5:46 PM, Michael Paquier wrote: > On Tue, Jan 3, 2017 at 6:23 AM, Jim Nasby > wrote: > > + /* Check if wal_segment_size is in the power of 2 */ > > + for (i = 0;; i++, pow2 = pow(2,

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

2017-01-05 Thread Simon Riggs
On 5 January 2017 at 10:21, Stas Kelvich wrote: > Thank you for looking into this. > >> On 5 Jan 2017, at 09:43, Simon Riggs wrote: >>> >>> GID is now variable sized. You seem to have added this to every >>> commit, not just 2PC >> > > Hm, didn’t

Re: [HACKERS] proposal: session server side variables

2017-01-05 Thread Pavel Stehule
2017-01-05 11:39 GMT+01:00 Fabien COELHO : > > Hello Pavel, > > There are more reasons, why I would not to use GUC >> > > 0. it is not designed be secure - there is different security model - >> readonly, superuser, others >> > > Sure, GUCs as is are not enough, but the model

Re: [HACKERS] UNDO and in-place update

2017-01-05 Thread Amit Kapila
On Wed, Jan 4, 2017 at 8:35 PM, Dilip Kumar wrote: > On Wed, Jan 4, 2017 at 4:35 PM, Amit Kapila wrote: >> In this new system, I >> think we can't remove undo entries of heap page till we clear >> corresponding index entries. I think we need to

Re: [HACKERS] Push down more full joins in postgres_fdw

2017-01-05 Thread Etsuro Fujita
On 2017/01/03 17:28, Ashutosh Bapat wrote: I wrote: I updated the patch a bit further: simplified the function name (s/build_subquery_rel_tlists/build_subquery_tlists/), and revised comments a little bit. Attached is an updated version (postgres-fdw-subquery-support-v14.patch). Few comments

Re: [HACKERS] Push down more full joins in postgres_fdw

2017-01-05 Thread Ashutosh Bapat
On Thu, Jan 5, 2017 at 5:51 PM, Etsuro Fujita wrote: > On 2017/01/05 21:11, Ashutosh Bapat wrote: >> >> On Thu, Jan 5, 2017 at 5:14 PM, Etsuro Fujita >> wrote: >>> >>> On 2017/01/03 17:28, Ashutosh Bapat wrote: In

Re: [HACKERS] pageinspect: Hash index support

2017-01-05 Thread Ashutosh Sharma
Hi Jesper, > * Rename convert_ovflblkno_to_bitno to _hash_ovflblkno_to_bitno > > Such that there is only 1 method, which is exposed Okay, Thanks. It makes sense. > > * Readded pageinspect--1.6.sql > > In order to have the latest pageinspect interface in 1 file, as we need > something to install

Re: [HACKERS] Push down more full joins in postgres_fdw

2017-01-05 Thread Etsuro Fujita
On 2017/01/05 21:11, Ashutosh Bapat wrote: On Thu, Jan 5, 2017 at 5:14 PM, Etsuro Fujita wrote: On 2017/01/03 17:28, Ashutosh Bapat wrote: In build_subquery_tlists(), why don't we handle base relations? + if (foreignrel->reloptkind != RELOPT_JOINREL) +

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

2017-01-05 Thread Stas Kelvich
> On 5 Jan 2017, at 13:49, Simon Riggs wrote: > > Surely in this case the master server is acting as the Transaction > Manager, and it knows the mapping, so we are good? > > I guess if you are using >2 nodes then you need to use full 2PC on each node. > > Please explain

Re: [HACKERS] proposal: session server side variables (fwd)

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

Re: [HACKERS] Push down more full joins in postgres_fdw

2017-01-05 Thread Ashutosh Bapat
On Thu, Jan 5, 2017 at 5:14 PM, Etsuro Fujita wrote: > On 2017/01/03 17:28, Ashutosh Bapat wrote: > > I wrote: >>> >>> I updated the patch a bit further: simplified the function name >>> (s/build_subquery_rel_tlists/build_subquery_tlists/), and revised >>> comments a

Re: [HACKERS] rewrite HeapSatisfiesHOTAndKey

2017-01-05 Thread Amit Kapila
On Wed, Jan 4, 2017 at 11:45 PM, Pavan Deolasee wrote: > > > On Tue, Jan 3, 2017 at 9:33 PM, Robert Haas wrote: >> >> On Mon, Jan 2, 2017 at 1:36 AM, Amit Kapila >> wrote: >> > Okay, but I think if we know how much is 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

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

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

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

  1   2   >