Re: [HACKERS] Contains and is contained by operators of inet datatypes

2016-11-11 Thread Andreas Karlsson
Review - Applies and passes the test suite. - I think this is a good change since it increases the consistency of the operators. I also like the choice of <<@ and @>> since they feel intuitive to me. - I tested it and both old and new operators use the brin and gist indexes. - The new

Re: [HACKERS] Fix checkpoint skip logic on idle systems by tracking LSN progress

2016-11-11 Thread Amit Kapila
On Tue, Nov 8, 2016 at 5:18 PM, Kyotaro HORIGUCHI wrote: > Hello, > >> on something else than LW_EXCLUSIVE compared to now. To keep things >> more simple I' would still favor using WALInsertLocks for this patch, >> that looks more consistent, and also because

Re: [HACKERS] pg_dump, pg_dumpall and data durability

2016-11-11 Thread Michael Paquier
On Fri, Nov 11, 2016 at 11:03 PM, Albe Laurenz wrote: > - In pg_dumpall.c, the result of fsync_fname() is cast to "void" to show that > the return code is ignored, but not anywhere else. Is that by design? Right. The patch is lacking consistency in this area. The main

Re: [HACKERS] Why PostgreSQL doesn't implement a semi sync replication?

2016-11-11 Thread Craig Ringer
On 12 November 2016 at 02:12, Petr Jelinek wrote: > On 11/11/16 16:03, Francisco Olarte wrote: >> On Fri, Nov 11, 2016 at 4:40 AM, 余森彬 wrote: >>> As we know, the synchronous commit process is blocked while receives >>> from acknowledgement from

Re: [HACKERS] pg_sequence catalog

2016-11-11 Thread Andreas Karlsson
Review for pg_sequence catalog I like this change since it moves all the parts which should be transactional to the system catalogs while keeping the only non-transactional stuff in the sequence relations. There was some discussion upthread about more compact representations for the

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-11 Thread Amit Kapila
On Fri, Nov 11, 2016 at 3:01 PM, Magnus Hagander wrote: >> > Based on this optimization we might want to keep the text that says >> > large >> > shared buffers on Windows aren't as effective perhaps, Sounds sensible or may add a line to say why it isn't as effective as on

Re: [HACKERS] Something is broken about connection startup

2016-11-11 Thread Tom Lane
I wrote: > So it's happening when RelationCacheInitializePhase3 is trying to replace > a fake pg_class row for pg_proc (made by formrdesc) with the real one. > That's even odder, because that's late enough that this should be a pretty > ordinary catalog lookup. Now I wonder if it's possible that

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

2016-11-11 Thread Andreas Karlsson
On 11/11/2016 07:40 PM, Andreas Karlsson wrote: Hi, Here is a new version of the patch with the only differences; 1) The SSL tests have been changed to use reload rather than restart 2) Rebased on master And here with a fix to a comment. Andreas diff --git a/doc/src/sgml/runtime.sgml

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

2016-11-11 Thread Andreas Karlsson
Hi, Here is a new version of the patch with the only differences; 1) The SSL tests have been changed to use reload rather than restart 2) Rebased on master Please take a look. Andreas diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 787cfce..5e78d81 100644 ---

Re: [HACKERS] Why PostgreSQL doesn't implement a semi sync replication?

2016-11-11 Thread Petr Jelinek
On 11/11/16 16:03, Francisco Olarte wrote: > On Fri, Nov 11, 2016 at 4:40 AM, 余森彬 wrote: >> As we know, the synchronous commit process is blocked while receives >> from acknowledgement from standby in >> PostgreSQL.This is good for data consistence in master and

Re: [HACKERS] pg_sequence catalog

2016-11-11 Thread Andreas Karlsson
On 11/10/2016 06:27 AM, Andreas Karlsson wrote: On 11/10/2016 05:29 AM, Peter Eisentraut wrote: On 11/8/16 6:43 PM, Andreas Karlsson wrote: - Shouldn't last_value be NULL directly after we have created the sequence but nobody has called nextval() yet? - I noticed that last_value includes the

Re: [HACKERS] Do we need use more meaningful variables to replace 0 in catalog head files?

2016-11-11 Thread Tom Lane
Andrew Dunstan writes: > +1. If we come up with an agreed format I will undertake to produce the > requisite perl script. So let's reopen the debate on the data format. I > want something that doesn't consume large numbers of lines per entry. If > we remove defaults in

Re: [HACKERS] Why PostgreSQL doesn't implement a semi sync replication?

2016-11-11 Thread Francisco Olarte
On Fri, Nov 11, 2016 at 4:40 AM, 余森彬 wrote: > As we know, the synchronous commit process is blocked while receives > from acknowledgement from standby in > PostgreSQL.This is good for data consistence in master and standby, and > application can get important data

Re: [HACKERS] Improving RLS planning

2016-11-11 Thread Stephen Frost
* Dean Rasheed (dean.a.rash...@gmail.com) wrote: > On 10 November 2016 at 17:12, Tom Lane wrote: > > Yeah, I think we'd be best off to avoid the bare term "security". > > It's probably too late to change the RTE field name "securityQuals", > > but maybe we could uniformly call

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-11 Thread Peter Eisentraut
On 11/9/16 10:05 AM, Mithun Cy wrote: > As in Victor's patch we have a new connection parameter > "target_server_type", It can take 2 values 1. "any" 2. "master" with > DEFAULT as "any". If it's has the value "any" we can connect to any of > the host server (both master(primary) and

Re: [HACKERS] pg_dump, pg_dumpall and data durability

2016-11-11 Thread Albe Laurenz
Michael Paquier wrote: > A typo s/pre_fsync_fname/pre_sync_fname, and a mistake from me because > I did not compile with -DPG_FLUSH_DATA_WORKS to check this code. > > v2 is attached, fixing those issues. The patch applies and compiles fine. I have tested it on Linux and MinGW and could see the

Re: [HACKERS] Do we need use more meaningful variables to replace 0 in catalog head files?

2016-11-11 Thread Andrew Dunstan
On 11/11/2016 03:03 AM, Magnus Hagander wrote: On Nov 11, 2016 00:53, "Jan de Visser" > wrote: > > On 2016-11-09 10:47 AM, Tom Lane wrote: > >> Amit Langote > writes: >>> >>> On Wed,

[HACKERS] Why PostgreSQL doesn't implement a semi sync replication?

2016-11-11 Thread 余森彬
Hi all: As we know, the synchronous commit process is blocked while receives from acknowledgement from standby in PostgreSQL.This is good for data consistence in master and standby, and application can get important data from standby.But when the standby crash or network goes wrong,

Re: [HACKERS] Adding in docs the meaning of pg_stat_replication.sync_state

2016-11-11 Thread Michael Paquier
On Thu, Nov 10, 2016 at 10:35 PM, Fujii Masao wrote: > On Wed, Nov 9, 2016 at 2:33 PM, Michael Paquier > wrote: >> Hi all, >> >> The documentation does not explain at all what means "sync" or "async" >> on pg_stat_replication. > > "potential"

Re: [HACKERS] Gather Merge

2016-11-11 Thread Rushabh Lathia
Oops forgot to attach latest patch in the earlier mail. On Fri, Nov 11, 2016 at 6:26 PM, Rushabh Lathia wrote: > > > On Fri, Nov 4, 2016 at 8:30 AM, Thomas Munro < > thomas.mu...@enterprisedb.com> wrote: > >> On Thu, Oct 27, 2016 at 10:50 PM, Rushabh Lathia >>

Re: [HACKERS] Gather Merge

2016-11-11 Thread Rushabh Lathia
On Fri, Nov 4, 2016 at 8:30 AM, Thomas Munro wrote: > On Thu, Oct 27, 2016 at 10:50 PM, Rushabh Lathia > wrote: > > Please find attached latest patch which fix the review point as well as > > additional clean-up. > > I've signed up to

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

2016-11-11 Thread Ashutosh Bapat
> > So, I am thinking about your approach of creating PartitionJoinPaths > without actually creating child paths and then at a later stage > actually plan the child joins. Here's rough sketch of how that may be > done. > > At the time of creating regular paths, we identify the join orders > which

Re: [HACKERS] [RFC] Should we fix postmaster to avoid slow shutdown?

2016-11-11 Thread Ashutosh Bapat
On Mon, Nov 7, 2016 at 10:14 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Ashutosh Bapat >> I am not sure if following condition is a good idea in ServerLoop() >> 1650

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

2016-11-11 Thread Etsuro Fujita
On 2016/11/11 19:22, Ashutosh Bapat wrote: The patch looks in good shape now. Thanks for the review! The patch looks in good shape now. Here are some comments. I have also made several changes to comments correcting grammar, typos, style and at few places logic. Let me know if the patch

Re: [HACKERS] Declarative partitioning - another take

2016-11-11 Thread Ashutosh Bapat
I have not looked at the latest set of patches, but in the version that I have we create one composite type for every partition. This means that if there are thousand partitions, there will be thousand identical entries in pg_type. Since all the partitions share the same definition (by syntax), it

Re: [HACKERS] Shared memory estimation for postgres

2016-11-11 Thread Craig Ringer
On 11 Nov. 2016 13:00, "leoaaryan" wrote: > > Hi Michael, > > Thanks for all the help and time. I have already developed a code where I > can exactly calculate the to be allocated shared memory value based on the > Postgres 9.5.4 code (i went through the code, found out the

Re: [HACKERS] Push down more UPDATEs/DELETEs in postgres_fdw

2016-11-11 Thread Etsuro Fujita
On 2016/09/08 19:55, Etsuro Fujita wrote: On 2016/09/07 13:21, Ashutosh Bapat wrote: * with the patch: postgres=# explain verbose delete from ft1 using ft2 where ft1.a = ft2.a; QUERY PLAN

Re: [HACKERS] Logical Replication WIP

2016-11-11 Thread Petr Jelinek
On 08/11/16 19:51, Peter Eisentraut wrote: > Review of v7 0003-Add-PUBLICATION-catalogs-and-DDL.patch: > > This appears to address previous reviews and is looking pretty solid. I > have some comments that are easily addressed: > > [still from previous review] The code for OCLASS_PUBLICATION_REL

Re: [HACKERS] Logical Replication WIP

2016-11-11 Thread Petr Jelinek
On 04/11/16 14:24, Andres Freund wrote: > Hi, > > (btw, I vote against tarballing patches) > Well, I vote against CF app not handling correctly emails with multiple attachments :) > + > + > + > + Name > + Type > + References > + Description > + > + > +

Re: [HACKERS] Logical Replication WIP

2016-11-11 Thread Petr Jelinek
On 04/11/16 14:00, Andres Freund wrote: > Hi, > > + > + pg_publication_rel > + > + > + pg_publication_rel > + > + > + > + The pg_publication_rel catalog contains > + mapping between tables and publications in the database. This is many to > + many mapping. > + > > I wonder if

Re: [HACKERS] Logical Replication WIP

2016-11-11 Thread Petr Jelinek
On 04/11/16 13:07, Andres Freund wrote: > > Hm. I think I have to agree a bit with Peter here. Overloading > MyReplicationSlot this way seems ugly, and I think there's a bunch of > bugs around it too. > > > Sounds what we really want is a) two different lifetimes for ephemeral > slots, session

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

2016-11-11 Thread Ashutosh Bapat
On Mon, Nov 7, 2016 at 5:50 PM, Etsuro Fujita wrote: > On 2016/11/07 11:24, Etsuro Fujita wrote: >> >> On 2016/11/04 19:55, Etsuro Fujita wrote: >>> >>> Attached is an updated version of the patch. > > >> I noticed that I have included an unrelated regression test in

Re: [HACKERS] [PATCH] Allow TAP tests to be run individually

2016-11-11 Thread Michael Paquier
On Fri, Nov 11, 2016 at 6:10 PM, Craig Ringer wrote: > Please backpatch to at least 9.6 since it's trivial and we seem to be > doing that for TAP. 9.5 and 9.4 would be nice too :) Yes please! -- Michael -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-11 Thread Magnus Hagander
On Fri, Nov 11, 2016 at 1:54 AM, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > From: pgsql-hackers-ow...@postgresql.org > > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Magnus Hagander > Okay and I think partially it might be because we don't have > >

Re: [HACKERS] [PATCH] pgpassfile connection option

2016-11-11 Thread Julian Markwort
I've updated my patch to work with the changes introduced to libpq by allowing multiple hosts. On Fabien's recommendations, I've kept the variable dot_pgpassfile_used, however I renamed that to pgpassfile_used, to keep a consistent naming scheme. I'm still not sure about the amount of error

[HACKERS] [PATCH] Allow TAP tests to be run individually

2016-11-11 Thread Craig Ringer
Per prior discussion, this small Makefile change allows anything that uses $(prove_check) or $(prove_installcheck) to have the list of tests overridden by passing a PROVE_TESTS as a list of space-separated test file paths. Particularly handy for src/test/recovery when you want to run

Re: [HACKERS] WAL consistency check facility

2016-11-11 Thread Kuntal Ghosh
On Fri, Nov 11, 2016 at 3:36 AM, Michael Paquier wrote: > On Fri, Nov 11, 2016 at 1:36 AM, Robert Haas wrote: >> So, who are all of the people involved in the effort to produce this >> patch, and what's the right way to attribute credit? > > The

Re: [HACKERS] Do we need use more meaningful variables to replace 0 in catalog head files?

2016-11-11 Thread Magnus Hagander
On Nov 11, 2016 00:53, "Jan de Visser" wrote: > > On 2016-11-09 10:47 AM, Tom Lane wrote: > >> Amit Langote writes: >>> >>> On Wed, Nov 9, 2016 at 11:47 PM, Tom Lane wrote: Hmm, that's from 2009. I thought I remembered