Re: [HACKERS] Unused variable scanned_tuples in LVRelStats

2017-08-03 Thread Masahiko Sawada
On Fri, Aug 4, 2017 at 3:01 AM, Robert Haas wrote: > On Thu, Aug 3, 2017 at 1:10 AM, Masahiko Sawada wrote: >> So we can remove scanned_tuples from LVRelStats struct and change the >> variable name num_tuples to scanned_tuples. Attached updated

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-08-03 Thread Tom Lane
Shay Rojansky writes: > I tested the patch. Thanks! > Doing SSL_CTX_set_session_cache_mode(context, SSL_SESS_CACHE_OFF) doesn't > have any effect whatsoever - I still have the same issue (session id > context uninitialized). I suspect session caching is an entirely different >

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-08-03 Thread Andres Freund
On 2017-08-04 07:22:42 +0300, Shay Rojansky wrote: > I'm still not convinced of the risk/problem of simply setting the session > id context as I explained above (rather than disabling the optimization), > but of course either solution resolves my problem. How would that do anything? Each backend

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-08-03 Thread Shay Rojansky
I tested the patch. Doing SSL_CTX_set_session_cache_mode(context, SSL_SESS_CACHE_OFF) doesn't have any effect whatsoever - I still have the same issue (session id context uninitialized). I suspect session caching is an entirely different feature from session tickets/RFC5077 (although it might

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Masahiko Sawada
On Fri, Aug 4, 2017 at 10:48 AM, Stephen Frost wrote: > Michael, > > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> On Wed, Aug 2, 2017 at 7:58 PM, Stephen Frost wrote: >> > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> >> Do you need a

Re: [HACKERS] pgsql 10: hash indexes testing

2017-08-03 Thread Amit Kapila
On Wed, Aug 2, 2017 at 9:04 PM, Robert Haas wrote: > On Wed, Jul 12, 2017 at 1:10 AM, Amit Kapila wrote: Yes, I also think the same idea can be used, in fact, I have mentioned it [1] as soon as you have committed that patch. Do we want

Re: [HACKERS] Update comments in nodeModifyTable.c

2017-08-03 Thread Etsuro Fujita
On 2017/08/04 1:52, Robert Haas wrote: On Thu, Aug 3, 2017 at 5:55 AM, Etsuro Fujita wrote: I updated the patch that way. Attached is a new version of the patch. Committed. Thanks again. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-03 Thread Etsuro Fujita
On 2017/08/04 10:00, Amit Langote wrote: On 2017/08/04 1:06, Robert Haas wrote: On Thu, Aug 3, 2017 at 4:40 AM, Etsuro Fujita wrote: On 2017/08/03 17:12, Amit Langote wrote: Attached updated patches. Thanks for the patch! That looks good to me. Committed

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2017-08-03 Thread Mithun Cy
On 3 Aug 2017 2:16 am, "Andres Freund" wrote: Hi Andres thanks for detailed review. I agree with all of the comments. I am going for a vacation. Once I come back I will fix those comments and will submit a new patch.

Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y

2017-08-03 Thread Peter Eisentraut
On 7/31/17 20:42, Peter Eisentraut wrote: > That looks like a bug to me. ALTER USER also does not support the IN > DATABASE clause, so the code deviation might have started there already. > > I propose the attached patch to clean this up. > > For backpatching, I could develop some less invasive

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Aug 3, 2017 at 4:29 AM, Stephen Frost wrote: > > I'll provide another update tomorrow. Hopefully Michael is able to produce > > a 9.6 patch, otherwise I'll do it. > > I have sent an updated version of the patch,

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Wed, Aug 2, 2017 at 7:58 PM, Stephen Frost wrote: > > * Michael Paquier (michael.paqu...@gmail.com) wrote: > >> Do you need a back-patchable version for 9.6? I could get one out of > >> my pocket if necessary.

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-08-03 Thread Stephen Frost
Tom, all, * Stephen Frost (sfr...@snowman.net) wrote: > This needs more cleanup, testing, and comments explaining why we're > doing this (and then perhaps comments, somewhere.. in the backend ACL > code that explains that the ordering needs to be preserved), but the > basic idea seems sound to me

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread Amit Langote
On 2017/08/04 1:08, David G. Johnston wrote: > On Thu, Aug 3, 2017 at 8:53 AM, Tom Lane wrote: > >> Robert Haas writes: >>> So maybe --load-via-partition-root if nobody likes my previous >>> suggestion of --partition-data-via-root ? >> >> WFM. >> > >

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-03 Thread Amit Langote
On 2017/08/04 2:13, Robert Haas wrote: > On Thu, Aug 3, 2017 at 12:35 AM, Tom Lane wrote: >> Robert Haas writes: >>> On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote >>> wrote: Attached is a patch. I think this could be

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-03 Thread Amit Langote
On 2017/08/04 1:06, Robert Haas wrote: > On Thu, Aug 3, 2017 at 4:40 AM, Etsuro Fujita > wrote: >> On 2017/08/03 17:12, Amit Langote wrote: >>> Attached updated patches. >> >> Thanks for the patch! That looks good to me. > > Committed with some comment changes.

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-03 Thread Amit Langote
On 2017/08/04 3:29, Robert Haas wrote: > On Thu, Aug 3, 2017 at 1:04 AM, Amit Langote > wrote: >> Alright, attached updated 0001 does that. > > Committed 0001 and 0002. Thanks. > 0003 needs a rebase. Rebased patch attached. Thanks, Amit From

Re: [HACKERS] analyzeCTE is too strict about typmods?

2017-08-03 Thread Tom Lane
I wrote: > In short, therefore, it's looking to me like analyzeCTE() is wrong here. > It should allow the case where the recursive result has typmod -1 while > the non-recursive output column has some more-specific typmod, so long > as they match on type OID. That would correspond to what we do

[HACKERS] analyzeCTE is too strict about typmods?

2017-08-03 Thread Tom Lane
I'm not sure why bug #7926 didn't get any love when filed, but the issue came up again today: https://www.postgresql.org/message-id/264036359.6712710.1501784552...@mail.yahoo.com and it does seem like this is pretty curious behavior. A minimal reproducer is regression=# create table base (f1

Re: [HACKERS] Hash Functions

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 6:08 PM, Andres Freund wrote: >> That's another way to go, but it requires inventing a way to thread >> the IV through the hash opclass interface. > > Only if we really want to do it really well :P. Using a hash_combine() > like > > /* > * Combine two

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-08-03 Thread Tom Lane
Andrew Dunstan writes: > On 07/31/2017 06:54 PM, Tom Lane wrote: >> but could we do something like >> my $pflags = "PROVE_FLAGS='" . ($ENV{PROVE_FLAGS} || "--timer") . "'"; >> to allow overriding this choice from the buildfarm config? > I have committed this in a slightly

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-08-03 Thread Mark Rofail
To better understand a limitation I ask 5 questions What is the limitation? Why is there a limitation? Why is it a limitation? What can we do? Is it feasible? Through some reading: *What is the limitation?* presupposes that count(distinct y) has exactly the same notion of equality that the PK

Re: [HACKERS] Hash Functions

2017-08-03 Thread Andres Freund
On 2017-08-03 17:57:37 -0400, Robert Haas wrote: > On Thu, Aug 3, 2017 at 5:50 PM, Andres Freund wrote: > > On 2017-08-03 17:43:44 -0400, Robert Haas wrote: > >> For me, the basic point here is that we need a set of hash functions > >> for hash partitioning that are different

Re: [HACKERS] Hash Functions

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 5:50 PM, Andres Freund wrote: > On 2017-08-03 17:43:44 -0400, Robert Haas wrote: >> For me, the basic point here is that we need a set of hash functions >> for hash partitioning that are different than what we use for hash >> indexes and hash joins --

Re: [HACKERS] Hash Functions

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 5:32 PM, Andres Freund wrote: >> Do you have any feeling for which of those endianness-independent hash >> functions might be a reasonable choice for us? > > Not a strong / very informed one, TBH. > > I'm not convinced it's worth trying to achieve this

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 2:54 PM, Oliver Ford wrote: > The formatting.c file specifies it as a TODO, so I thought implementing it > would be worthwhile. As there is a to_roman conversion having it the other > way is good for completeness. Huh, didn't know about that. Well, I'm

Re: [HACKERS] Hash Functions

2017-08-03 Thread Andres Freund
Hi, On 2017-08-03 17:43:44 -0400, Robert Haas wrote: > For me, the basic point here is that we need a set of hash functions > for hash partitioning that are different than what we use for hash > indexes and hash joins -- otherwise when we hash partition a table and > create hash indexes on each

Re: [HACKERS] Change in "policy" on dump ordering?

2017-08-03 Thread Tom Lane
Michael Banck writes: > Am Donnerstag, den 27.07.2017, 15:52 -0400 schrieb Tom Lane: >> So I'm thinking we should consider the multi-pass patch I posted as >> a short-term, backpatchable workaround, which we could hope to >> replace with dependency logic later. > +1,

Re: [HACKERS] Hash Functions

2017-08-03 Thread Andres Freund
Hi, On 2017-08-03 17:09:41 -0400, Robert Haas wrote: > On Thu, Jun 1, 2017 at 2:25 PM, Andres Freund wrote: > > Just to clarify: I don't think it's a problem to do so for integers and > > most other simple scalar types. There's plenty hash algorithms that are > > endianess

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2017-08-03 Thread Daniel Gustafsson
> On 03 Aug 2017, at 19:27, Michael Paquier wrote: > > On Thu, Aug 3, 2017 at 12:02 PM, Daniel Gustafsson wrote: >> In https://postgr.es/m/69db7657-3f9d-4d30-8a4b-e06034251...@yesql.se I >> presented a WIP patch for adding support for the Apple Secure

Re: [HACKERS] Hash Functions

2017-08-03 Thread Robert Haas
On Thu, Jun 1, 2017 at 2:25 PM, Andres Freund wrote: > Just to clarify: I don't think it's a problem to do so for integers and > most other simple scalar types. There's plenty hash algorithms that are > endianess independent, and the rest is just a bit of care. Do you have

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-08-03 Thread Andrew Dunstan
On 07/31/2017 06:54 PM, Tom Lane wrote: > but could we do something like > my $pflags = "PROVE_FLAGS='" . ($ENV{PROVE_FLAGS} || "--timer") . "'"; > > to allow overriding this choice from the buildfarm config? > > I have committed this in a slightly different form. cheers andrew --

Re: [HACKERS] xmltable SQL conformance

2017-08-03 Thread Pavel Stehule
2017-08-03 22:54 GMT+02:00 Pavel Stehule : > > > 2017-08-03 22:14 GMT+02:00 Peter Eisentraut com>: > >> I'm looking to update the SQL conformance list for the release. I'm >> wondering whether the new xmltable feature fully completes the

Re: [HACKERS] elog vs errmsg_internal

2017-08-03 Thread Tom Lane
Peter Eisentraut writes: > Is there a preferred method to select between using elog() and > errmsg_internal()? ereport(... errmsg_internal() ...) can be a win for debug messages that are in hot code paths, because the test for whether the message will get

Re: [HACKERS] xmltable SQL conformance

2017-08-03 Thread Pavel Stehule
2017-08-03 22:14 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > I'm looking to update the SQL conformance list for the release. I'm > wondering whether the new xmltable feature fully completes the following > items: > > X300XMLTable > X301XMLTable: derived column list

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-03 Thread Alvaro Herrera
Tom Lane wrote: > I think Peter's got the error and the detail backwards. It should be > more like > > ERROR: "someview" cannot have constraints > DETAIL: "someview" is a view. > > If we do it like that, we need one ERROR message per error reason, > and one DETAIL per relkind, which should be

Re: [HACKERS] elog vs errmsg_internal

2017-08-03 Thread Alvaro Herrera
Peter Eisentraut wrote: > Is there a preferred method to select between using elog() and > errmsg_internal()? > > Attached is a patch that converts some DEBUG messages to one of those > two to remove them from translation, but I'm not sure which one to pick > other than by random aesthetics. I

[HACKERS] elog vs errmsg_internal

2017-08-03 Thread Peter Eisentraut
Is there a preferred method to select between using elog() and errmsg_internal()? Attached is a patch that converts some DEBUG messages to one of those two to remove them from translation, but I'm not sure which one to pick other than by random aesthetics. -- Peter Eisentraut

[HACKERS] xmltable SQL conformance

2017-08-03 Thread Peter Eisentraut
I'm looking to update the SQL conformance list for the release. I'm wondering whether the new xmltable feature fully completes the following items: X300XMLTable X301XMLTable: derived column list option X302XMLTable: ordinality column option X303XMLTable: column default option

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-08-03 Thread Oliver Ford
On Thursday, 3 August 2017, Robert Haas wrote: > On Thu, Aug 3, 2017 at 9:25 AM, Oliver Ford > wrote: > > Adds to the to_number() function the ability to convert Roman numerals > > to a number. This feature is on the formatting.c TODO

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-08-03 Thread David Fetter
On Thu, Aug 03, 2017 at 01:45:02PM -0400, Robert Haas wrote: > On Thu, Aug 3, 2017 at 9:25 AM, Oliver Ford wrote: > > Adds to the to_number() function the ability to convert Roman numerals > > to a number. This feature is on the formatting.c TODO list. It is not > > currently

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 1:04 AM, Amit Langote wrote: > Alright, attached updated 0001 does that. Committed 0001 and 0002. 0003 needs a rebase. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-03 Thread Fabien COELHO
For the CREATE stuff, the script language is SQL, the command to use it is "psql"... The real and hard part is to fill tables with meaningful pseudo-random test data which do not violate constraints for any non trivial schema involving foreign keys and various unique constraints. The

Re: [HACKERS] Tightly packing expressions

2017-08-03 Thread Andres Freund
Hi Doug, On 2017-08-03 18:01:06 +, Douglas Doole wrote: > Back when you were getting ready to commit your faster expressions, I > volunteered to look at switching from an array of fixed sized steps to > tightly packed structures. ( >

Re: [HACKERS] Unused variable scanned_tuples in LVRelStats

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 1:10 AM, Masahiko Sawada wrote: > So we can remove scanned_tuples from LVRelStats struct and change the > variable name num_tuples to scanned_tuples. Attached updated patch. On second thought, I think we should just leave this alone. scanned_tuples

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 9:25 AM, Oliver Ford wrote: > Adds to the to_number() function the ability to convert Roman numerals > to a number. This feature is on the formatting.c TODO list. It is not > currently implemented in either Oracle, MSSQL or MySQL so gives > PostgreSQL an

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2017-08-03 Thread Michael Paquier
On Thu, Aug 3, 2017 at 12:02 PM, Daniel Gustafsson wrote: > In https://postgr.es/m/69db7657-3f9d-4d30-8a4b-e06034251...@yesql.se I > presented a WIP patch for adding support for the Apple Secure Transport SSL > library on macOS as, an alternative to OpenSSL. That patch got put

Re: [HACKERS] Cache lookup errors with functions manipulation object addresses

2017-08-03 Thread Michael Paquier
On Fri, Jul 21, 2017 at 8:53 AM, Michael Paquier wrote: > I can see your point. The v1 proposed above adds quite a lot of error > code churn to deal with the lack of missing_ok flag in > getObjectDescription, getObjectIdentity and getObjectIdentityParts. > And the cache

Re: [HACKERS] Subscription code improvements

2017-08-03 Thread Peter Eisentraut
On 7/13/17 23:53, Masahiko Sawada wrote: > To summary, I think we now have only one issue; ALTER SUBSCRIPTION is > not transactional, 0004 patch is addressing this issue . We have two competing patches for this issue. This patch moves the killing to the end of the DDL transaction. Your earlier

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 12:35 AM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote >> wrote: >>> Attached is a patch. I think this could be considered a bug-fix, >>> backpatchable to

Re: [HACKERS] Update comments in nodeModifyTable.c

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 5:55 AM, Etsuro Fujita wrote: > I updated the patch that way. Attached is a new version of the patch. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread David G. Johnston
On Thu, Aug 3, 2017 at 8:53 AM, Tom Lane wrote: > Robert Haas writes: > > So maybe --load-via-partition-root if nobody likes my previous > > suggestion of --partition-data-via-root ? > > WFM. > ​+1 David J.​

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-08-03 Thread Ashutosh Bapat
On Thu, Aug 3, 2017 at 2:10 AM, Robert Haas wrote: > On Mon, Jul 31, 2017 at 7:59 AM, Ashutosh Bapat > wrote: >> Adding AppendRelInfos to root->append_rel_list as and when they are >> created would keep parent AppendRelInfos before those of

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 4:40 AM, Etsuro Fujita wrote: > On 2017/08/03 17:12, Amit Langote wrote: >> Attached updated patches. > > Thanks for the patch! That looks good to me. Committed with some comment changes. -- Robert Haas EnterpriseDB:

[HACKERS] Reminder: back-branch releases next week

2017-08-03 Thread Tom Lane
[ Shoulda got this out sooner, but better late than never ] We'll be doing routine quarterly releases of supported Postgres back branches next week (tarballs wrapped Monday 7th, public announcement Thursday 10th). We'll release v10 beta3 at the same time. regards, tom

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread Tom Lane
Robert Haas writes: > So maybe --load-via-partition-root if nobody likes my previous > suggestion of --partition-data-via-root ? WFM. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] On Complex Source Code Reading Strategy

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 1:55 AM, Zeray Kalayu wrote: > Therefore, I feel and think that I am a bit in a hurry to be DB > hacker. But given time, indefatigability and PG community support, I > believe that I will manage to achieve my dream. Indefatigability is key. --

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-03 Thread Alvaro Herrera
Joe Conway wrote: > On 08/02/2017 10:52 PM, Ashutosh Bapat wrote: > > On Wed, Aug 2, 2017 at 11:15 PM, Alvaro Herrera > > wrote: > >> Alvaro Herrera wrote: > >>> I think pg_class is a reasonable place to put more generic relkind lists > >>> alongside a matching error

Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests

2017-08-03 Thread Robert Haas
On Wed, Aug 2, 2017 at 11:47 PM, Noah Misch wrote: > postmaster algorithms rely on the PG_SETMASK() calls preventing that. Without > such protection, duplicate bgworkers are an understandable result. I caught > several other assertions; the PMChildFlags failure is another

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread Robert Haas
On Wed, Aug 2, 2017 at 4:08 PM, Peter Eisentraut wrote: > On 8/2/17 13:58, Tom Lane wrote: >> I notice that the option list already includes some references to >> "insert", so maybe "--insert-via-partition-root"? Although you could >> argue that that's confusing

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 9:01 AM, Rushabh Lathia wrote: > --unpartition-partitioned-table is very confusing. +1. > I liked the previous option which is --use-partitioned-table > [partition-name, ...]. > The Only problem with --use-partitioned-table is, a user needs to

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-03 Thread Tom Lane
Masahiko Sawada writes: > If we want to create other tables and load data to them as we want we > can do that using psql -f. So an alternative ways is having a flexible > style option for example --custom-initialize = { [load, create_pkey, > create_fkey, vacuum], ... }.

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-03 Thread Joe Conway
On 08/02/2017 10:52 PM, Ashutosh Bapat wrote: > On Wed, Aug 2, 2017 at 11:15 PM, Alvaro Herrera > wrote: >> Alvaro Herrera wrote: >>> I think pg_class is a reasonable place to put more generic relkind lists >>> alongside a matching error message for each, rather than

Re: [HACKERS] Macros bundling RELKIND_* conditions

2017-08-03 Thread Joe Conway
On 08/02/2017 10:30 PM, Ashutosh Bapat wrote: > On Wed, Aug 2, 2017 at 8:47 PM, Robert Haas wrote: >> 0001-RELKIND_HAS_VISIBILITY_MAP.patch - one place >> 0002-RELKIND_HAS_STORAGE.patch - one place >> 0003-RELKIND_HAS_XIDS-macro.patch - one place >>

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-03 Thread Tom Lane
Fabien COELHO writes: > As for a more generic solution, the easy part are the "CREATE" stuff and > the transaction script stuff (existing pgbench scripts). > For the CREATE stuff, the script language is SQL, the command to use it is > "psql"... > The real and hard part is

Re: [HACKERS] Row Level Security Documentation

2017-08-03 Thread Rod Taylor
On Thu, Jul 13, 2017 at 5:49 AM, Fabien COELHO wrote: > > Hello Rod, > > This version of the table attempts to stipulate which section of the >> process the rule applies to. >> > > The table should be referenced from the description, something like "Table > xxx summarizes

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread David G. Johnston
On Thursday, August 3, 2017, Rushabh Lathia wrote: > > > --use-partitioned-table [partitioned_name, ...] # if > names are omitted it defaults to all the partitioned tables. > > Here user need to specify the root relation name in the option - and any > partition table

Re: [HACKERS] Unused field of ProjectionPath

2017-08-03 Thread Tom Lane
Antonin Houska writes: > I've noticed that the dummypp field of ProjectionPath is set but never read. I do not think removing that field is a good idea, even if it's not used in the current form of the logic. It's useful for debugging purposes at least. See original commit

Re: [HACKERS] pgsql 10: hash indexes testing

2017-08-03 Thread AP
On Wed, Aug 02, 2017 at 11:34:13AM -0400, Robert Haas wrote: > On Wed, Jul 12, 2017 at 1:10 AM, Amit Kapila wrote: > > It seems so. Basically, in the case of a large number of duplicates, > > we hit the maximum number of overflow pages. There is a theoretical > >

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread Rushabh Lathia
On Thu, Aug 3, 2017 at 3:39 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Wed, Aug 2, 2017 at 11:47 PM, David G. Johnston > wrote: > > On Wed, Aug 2, 2017 at 10:58 AM, Tom Lane wrote: > >> > >> Robert Haas

[HACKERS] Unused field of ProjectionPath

2017-08-03 Thread Antonin Houska
I've noticed that the dummypp field of ProjectionPath is set but never read. If the only possible change between the path and plan creation time is that the projection path and the subpath targetlists become different, then dummypp could be used this way: diff --git

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2017-08-03 Thread Daniel Gustafsson
> On 03 Aug 2017, at 13:06, Heikki Linnakangas wrote: > > On 08/03/2017 01:02 PM, Daniel Gustafsson wrote: >> >> The frontend has support for using PEM files for certificates and keys. It >> can >> also look up the key for the certificate in a Keychain, or both certificate

Re: [HACKERS] Improve the performance of the standby server when dropping tables on the primary server

2017-08-03 Thread Tokuda, Takashi
Hi, > * The previous coding allowed for a fast path to access the last > unowned relation, which this patch removes. It seems a good idea to > cache the last unowned relation, or if not explain why the comment > that says why it worked that way is no longer true. > > * We should only create the

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2017-08-03 Thread Heikki Linnakangas
On 08/03/2017 01:02 PM, Daniel Gustafsson wrote: In https://postgr.es/m/69db7657-3f9d-4d30-8a4b-e06034251...@yesql.se I presented a WIP patch for adding support for the Apple Secure Transport SSL library on macOS as, an alternative to OpenSSL. That patch got put on the backburner for a bit, but

Re: [HACKERS] Change in "policy" on dump ordering?

2017-08-03 Thread Michael Banck
Am Donnerstag, den 27.07.2017, 15:52 -0400 schrieb Tom Lane: > So I'm thinking we should consider the multi-pass patch I posted as > a short-term, backpatchable workaround, which we could hope to > replace with dependency logic later. +1, it would be really nice if this could be fixed in the

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread Ashutosh Bapat
On Wed, Aug 2, 2017 at 11:47 PM, David G. Johnston wrote: > On Wed, Aug 2, 2017 at 10:58 AM, Tom Lane wrote: >> >> Robert Haas writes: >> > On Wed, Aug 2, 2017 at 1:08 PM, Tom Lane wrote: >> >>

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-08-03 Thread Michael Paquier
On Mon, Jul 31, 2017 at 7:27 PM, Alvaro Herrera wrote: > Robert Haas wrote: > >> An alternative approach is to have some kind of other identifier, >> let's call it a distributed transaction ID (DXID) which is mapped by >> each node onto a local XID. > > Postgres-XL seems

[HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2017-08-03 Thread Daniel Gustafsson
In https://postgr.es/m/69db7657-3f9d-4d30-8a4b-e06034251...@yesql.se I presented a WIP patch for adding support for the Apple Secure Transport SSL library on macOS as, an alternative to OpenSSL. That patch got put on the backburner for a bit, but I’ve now found the time to make enough progress to

Re: [HACKERS] Update comments in nodeModifyTable.c

2017-08-03 Thread Etsuro Fujita
On 2017/08/02 4:07, Robert Haas wrote: On Tue, Aug 1, 2017 at 12:31 AM, Etsuro Fujita wrote: Maybe I'm missing something, but I'm not sure that's a good idea because the change says like we might have 'wholerow' only for the FDW case, but that isn't correct because

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-03 Thread Fabien COELHO
Hello, My motivation of this proposal is same as what Robert has. I understand that ad-hoc option can solve only the part of big problem and it could be cause of mess. However It seems me that the script especially for table initialization will not be flexible than we expected. I mean, even if

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-08-03 Thread Michael Paquier
On Mon, Jul 31, 2017 at 6:13 PM, Robert Haas wrote: > On Fri, Jul 28, 2017 at 10:35 AM, Andreas Joseph Krogh > wrote: >> I'm reading https://www.postgresql.org/docs/10/static/pgupgrade.html to try >> to understand how to upgrade standby-servers using

Re: [HACKERS] Confusing error message in pgbench

2017-08-03 Thread Fabien COELHO
Indeed. It doesn't look that hard: AFAICS the problem is just that process_sql_command() is making premature decisions about whether to extract parameters from the SQL commands. Proposed patch attached. Great. Patch looks good to me. Too me as well: code looks ok, patch applies, compiles,

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-08-03 Thread Jeevan Ladhe
Thanks Amit for addressing the comment. The patch looks good to me. I have no more comments. Verified that v2 patch applies cleanly and make check passes. Thanks, Jeevan Ladhe

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-03 Thread Etsuro Fujita
On 2017/08/03 17:12, Amit Langote wrote: Attached updated patches. Thanks for the patch! That looks good to me. Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Red-Black tree traversal tests

2017-08-03 Thread Aleksander Alekseev
Hi Victor, > I forgot to attach the patch. Sorry. > Here it is. I would say that this patch is in a pretty good shape now. And I see a 99% code coverage of rbtree.c. Let's see what committers think. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-03 Thread Amit Langote
Fujita-san, Thanks for the review. On 2017/08/03 16:01, Etsuro Fujita wrote: > On 2017/08/02 15:21, Amit Langote wrote: >> On 2017/08/02 1:33, Amit Khandekar wrote: >>> --- >>> >>> Few more comments : >>> >>> @@ -1240,7 +1247,7 @@ map_variable_attnos_mutator(Node *node, >>>

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Michael Paquier
On Thu, Aug 3, 2017 at 4:29 AM, Stephen Frost wrote: > I'll provide another update tomorrow. Hopefully Michael is able to produce > a 9.6 patch, otherwise I'll do it. I have sent an updated version of the patch, with something that can be used for 9.6 as well. It would be

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-03 Thread Michael Paquier
On Wed, Aug 2, 2017 at 7:58 PM, Stephen Frost wrote: > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> Do you need a back-patchable version for 9.6? I could get one out of >> my pocket if necessary. > > I was just trying to find a bit of time to generate exactly that-

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-03 Thread Etsuro Fujita
On 2017/08/02 15:21, Amit Langote wrote: Thanks Fuita-san and Amit for reviewing. On 2017/08/02 1:33, Amit Khandekar wrote: On 1 August 2017 at 15:11, Etsuro Fujita wrote: On 2017/07/31 18:56, Amit Langote wrote: Yes, that's what's needed here. So we need to

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-03 Thread Masahiko Sawada
On Thu, Aug 3, 2017 at 2:00 AM, Robert Haas wrote: > On Wed, Aug 2, 2017 at 12:34 PM, Tom Lane wrote: >> Of course. It's also a heck of a lot more flexible. Adding on another >> ad-hoc option that does the minimum possible amount of work needed to >>