[HACKERS] Small typo in pageinspect heapfuncs

2016-10-25 Thread Daniel Gustafsson
Spotted a tiny typo in contrib/pageinspect/heapfuncs.c: s/accordindly/accordingly/ cheers ./daniel typo-pageinspect_heapfuncs.diff Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/ma

Re: [HACKERS] [bug fix] Stats collector is not restarted on the standby

2016-10-25 Thread Michael Paquier
On Wed, Oct 26, 2016 at 2:46 PM, Tsunakawa, Takayuki wrote: > If the stats collector is forcibly terminated on the standby in streaming > replication configuration, it won't be restarted until the standby is > promoted to the primary. The attached patch restarts the stats collector on > the st

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-10-25 Thread Andres Freund
On 2016-10-25 13:18:47 -0400, Tom Lane wrote: > (Frankly, I'm pretty skeptical of this entire patch being worth the > trouble...) The gains are quite noticeable in some cases. So if we can make it work without noticeable downsides... What I'm worried about though is that this, afaics, will quite

Re: [HACKERS] Mention column name in error messages

2016-10-25 Thread Kuntal Ghosh
On Mon, Oct 17, 2016 at 12:48 PM, Michael Paquier wrote: > *** /Users/mpaquier/git/postgres/src/test/regress/expected/xml_2.out > Mon Oct 17 11:32:26 2016 > --- /Users/mpaquier/git/postgres/src/test/regress/results/xml.out > Mon Oct 17 15:58:42 2016 > *** > *** 9,14 > --- 9,15

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-25 Thread Michael Paquier
On Wed, Oct 26, 2016 at 1:53 PM, Amit Kapila wrote: > On Mon, Oct 24, 2016 at 12:25 PM, Michael Paquier > wrote: >> On Mon, Oct 24, 2016 at 1:39 PM, Amit Kapila wrote: >>> >>> I think what you are saying is not completely right, because we do >>> update minRecoveryPoint when we don't perform a n

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-25 Thread Michael Paquier
On Wed, Oct 26, 2016 at 1:53 PM, Amit Kapila wrote: > On Mon, Oct 24, 2016 at 12:25 PM, Michael Paquier > wrote: >> On Mon, Oct 24, 2016 at 1:39 PM, Amit Kapila wrote: >>> >>> I think what you are saying is not completely right, because we do >>> update minRecoveryPoint when we don't perform a n

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2016-10-25 Thread Masahiko Sawada
On Fri, Oct 21, 2016 at 2:38 PM, Ashutosh Bapat wrote: > On Wed, Oct 19, 2016 at 9:17 PM, Robert Haas wrote: >> On Thu, Oct 13, 2016 at 7:27 AM, Amit Langote >> wrote: >>> However, when I briefly read the description in "Transaction Management in >>> the R* Distributed Database Management System

Re: [HACKERS]

2016-10-25 Thread Masahiko Sawada
On Wed, Oct 26, 2016 at 2:51 PM, Masahiko Sawada wrote: > On Fri, Oct 21, 2016 at 2:38 PM, Ashutosh Bapat > wrote: >> On Wed, Oct 19, 2016 at 9:17 PM, Robert Haas wrote: >>> On Thu, Oct 13, 2016 at 7:27 AM, Amit Langote >>> wrote: However, when I briefly read the description in "Transactio

[HACKERS]

2016-10-25 Thread Masahiko Sawada
On Fri, Oct 21, 2016 at 2:38 PM, Ashutosh Bapat wrote: > On Wed, Oct 19, 2016 at 9:17 PM, Robert Haas wrote: >> On Thu, Oct 13, 2016 at 7:27 AM, Amit Langote >> wrote: >>> However, when I briefly read the description in "Transaction Management in >>> the R* Distributed Database Management System

[HACKERS] [bug fix] Stats collector is not restarted on the standby

2016-10-25 Thread Tsunakawa, Takayuki
Hello, If the stats collector is forcibly terminated on the standby in streaming replication configuration, it won't be restarted until the standby is promoted to the primary. The attached patch restarts the stats collector on the standby. FYI, when the stats collector is down, SELECTs against

[HACKERS] Minor typo in reorderbuffer.c

2016-10-25 Thread vinayak
Hi, Attached patch fixes a typo in reorderbuffer.c s/messsage/message/g Regards, Vinayak Pokale NTT Open Source Software Center typo-reorderbuffer-c.patch Description: application/download -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscr

Re: [HACKERS] Unused variable in postgres_fdw/deparse.c

2016-10-25 Thread Ashutosh Bapat
On Wed, Oct 26, 2016 at 6:19 AM, Kyotaro HORIGUCHI wrote: > Hello, compiler complains about unused variable during build > postgres_fdw without assertions (!--enable-cassert). > > deparse.c: In function ‘deparseFromExpr’: > deparse.c:1029:14: warning: unused variable ‘foreignrel’ [-Wunused-variabl

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-25 Thread Karl O. Pinc
On Tue, 25 Oct 2016 22:30:48 -0500 "Karl O. Pinc" wrote: > Since pg_log_file may contain only one line, and that > line may be either the filename of the csv log file or > the file name of the stderr file name it's impossible > to tell whether that single file is in csv or stderr > format. I sup

Re: [HACKERS] Declarative partitioning - another take

2016-10-25 Thread Amit Langote
On 2016/10/26 12:09, Amit Kapila wrote: > On Wed, Oct 26, 2016 at 8:27 AM, Amit Langote > wrote: >> On 2016/10/26 11:41, Amit Kapila wrote: >>> On Wed, Oct 26, 2016 at 6:36 AM, Amit Langote >>> wrote: Sure, CopyTo() can be be taught to scan leaf partitions when a partitioned table

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-25 Thread Karl O. Pinc
Another new version of a doc patch to the v6 patch. More better English. *sigh* Regards, Karl Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein patch_pg_current_logfile-v6.diff.patchv4 Description: Binary data -- Sent via pgsql-hackers mailing li

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-25 Thread Amit Kapila
On Mon, Oct 24, 2016 at 12:25 PM, Michael Paquier wrote: > On Mon, Oct 24, 2016 at 1:39 PM, Amit Kapila wrote: >> >> I think what you are saying is not completely right, because we do >> update minRecoveryPoint when we don't perform a new restart point. >> When we perform restart point, then it a

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-25 Thread Amit Kapila
On Tue, Oct 25, 2016 at 10:43 PM, Robert Haas wrote: > On Mon, Oct 24, 2016 at 12:26 AM, Amit Kapila wrote: >> >> You are right that it will include additional WAL than strictly >> necessary, but that can happen today as well because minrecoverypoint >> could be updated after you have established

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-25 Thread Karl O. Pinc
On Tue, 25 Oct 2016 22:53:41 -0500 "Karl O. Pinc" wrote: > On Tue, 25 Oct 2016 22:30:48 -0500 > "Karl O. Pinc" wrote: > > > Hope to provide more feedback soon. Er, attached is yet another doc patch to the v6 patch. Sorry about that. Changes pg_current_logfile() detailed documentation. Ins

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-25 Thread Karl O. Pinc
On Tue, 25 Oct 2016 22:30:48 -0500 "Karl O. Pinc" wrote: > Hope to provide more feedback soon. Before I forget: "make check" fails, due to oid issues with pg_current_logfile(). You're writing Unix eol characters into pg_log_file. (I think.) Does this matter on MS Windows? (I'm not up on MS

Re: [HACKERS] patch proposal

2016-10-25 Thread Venkata B Nagothi
Attached is the patch which introduces the new parameter "recovery_target_incomplete" - Currently this patch addresses two scenarios - *Scenario 1 :* Provide options to DBA when the recovery target is not reached and has stopped mid-way due to unavailability of WALs When performing recovery to

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-10-25 Thread Karl O. Pinc
On Tue, 18 Oct 2016 14:18:36 +0200 Gilles Darold wrote: > Here is the v6 of the patch, here is the description of the > pg_current_logfile() function, I have tried to keep thing as simple as > possible: > > pg_current_logfile( [ destination text ] ) >

Re: [HACKERS] Declarative partitioning - another take

2016-10-25 Thread Amit Kapila
On Wed, Oct 26, 2016 at 8:27 AM, Amit Langote wrote: > On 2016/10/26 11:41, Amit Kapila wrote: >> On Wed, Oct 26, 2016 at 6:36 AM, Amit Langote >> wrote: 1. @@ -1775,6 +1775,12 @@ BeginCopyTo(ParseState *pstate, { .. + else if (rel->rd_rel->relkind == RELKIND_PARTITIONED_

Re: [HACKERS] Declarative partitioning - another take

2016-10-25 Thread Amit Langote
On 2016/10/26 11:41, Amit Kapila wrote: > On Wed, Oct 26, 2016 at 6:36 AM, Amit Langote > wrote: >>> 1. >>> @@ -1775,6 +1775,12 @@ BeginCopyTo(ParseState *pstate, >>> { >>> .. >>> + else if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) >>> + ereport(ERROR, >>> + (errcode(ERRCODE_WRONG_OBJECT

Re: [HACKERS] Declarative partitioning - another take

2016-10-25 Thread Amit Kapila
On Wed, Oct 26, 2016 at 6:36 AM, Amit Langote wrote: >> 1. >> @@ -1775,6 +1775,12 @@ BeginCopyTo(ParseState *pstate, >> { >> .. >> + else if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) >> + ereport(ERROR, >> + (errcode(ERRCODE_WRONG_OBJECT_TYPE), >> + errmsg("cannot copy from partitioned t

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-10-25 Thread Dilip Kumar
On Tue, Oct 25, 2016 at 10:35 PM, Alvaro Herrera wrote: > We don't promise order of execution (which is why we can afford to sort > on cost), but I think it makes sense to keep a rough ordering based on > cost, and not let this push-down affect those ordering decisions too > much. Ok, Thanks for

Re: [HACKERS] 9.6, background worker processes, and PL/Java

2016-10-25 Thread Chapman Flack
On 10/25/16 18:56, Chapman Flack wrote: > If pooled, and tied to the backend that started them, do they need > to do anything special to detect when the leader has executed > SET ROLE or SET SESSION AUTHORIZATION? Let me guess ... such information is *not* synchronized across workers, and that'd

Re: [HACKERS] Declarative partitioning - another take

2016-10-25 Thread Amit Langote
On 2016/10/25 15:58, Amit Kapila wrote: > On Thu, Oct 6, 2016 at 12:44 PM, Amit Langote > wrote: >> On 2016/10/05 2:12, Robert Haas wrote: >>> Hmm, do we ever fire triggers on the parent for operations on a child >>> table? Note this thread, which seems possibly relevant: >>> >>> https://www.post

Re: [HACKERS] Declarative partitioning - another take

2016-10-25 Thread Amit Langote
Thanks for the review! On 2016/10/25 20:32, Amit Kapila wrote: > On Thu, Oct 6, 2016 at 12:44 PM, Amit Langote > wrote: >> On 2016/10/05 2:12, Robert Haas wrote: > >> Attached revised patches. > > Few assorted review comments for 0001-Catalog*: > > > 1. > @@ -1775,6 +1775,12 @@ BeginCopyTo(P

[HACKERS] Unused variable in postgres_fdw/deparse.c

2016-10-25 Thread Kyotaro HORIGUCHI
Hello, compiler complains about unused variable during build postgres_fdw without assertions (!--enable-cassert). deparse.c: In function ‘deparseFromExpr’: deparse.c:1029:14: warning: unused variable ‘foreignrel’ [-Wunused-variable] RelOptInfo *foreignrel = context->foreignrel; ^~~

Re: [HACKERS] Wraparound warning

2016-10-25 Thread Noah Misch
On Tue, Oct 25, 2016 at 01:32:04PM -0400, Bruce Momjian wrote: > On Tue, Oct 25, 2016 at 01:19:26PM -0400, Robert Haas wrote: > > On Tue, Oct 25, 2016 at 11:20 AM, Bruce Momjian wrote: > > > LOG: MultiXact member wraparound protections are now enabled > > > > > > I thought that was going

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

2016-10-25 Thread Jim Nasby
On 10/25/16 4:48 PM, Tomas Vondra wrote: The main issue that bugs me is the name of the Gen allocator, but I don't have a good naming ideas :( The basic characteristics of Gen is that it does not reuse space released by pfree(), relying on the fact that the whole block will become free. That shou

[HACKERS] 9.6, background worker processes, and PL/Java

2016-10-25 Thread Chapman Flack
Hi, I have a report of a PL/Java crash in 9.6 where the stack trace suggests it was trying to initialize in a background worker process (not sure why that even happened, yet), and by my first glance, it seems to have crashed dereferencing MyProcPort, which I am guessing a BGW might not always have

Re: [HACKERS] emergency outage requiring database restart

2016-10-25 Thread Jim Nasby
On 10/22/16 12:38 PM, Tom Lane wrote: Jim Nasby writes: > On 10/21/16 7:43 PM, Tom Lane wrote: >> Alvaro Herrera writes: >>> Agreed. The problem is how to install it without breaking pg_upgrade. > It can't look up relation names? It can't shove 64 bytes into a page that has < 64 bytes fre

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

2016-10-25 Thread Jim Nasby
On 10/1/16 7:34 PM, Tomas Vondra wrote: +/* otherwise add it to the proper freelist bin */ Looks like something went missing... :) Ummm? The patch contains this: +/* otherwise add it to the proper freelist bin */ +if (set->freelist[block->nfree]) +set->freelist[block->nfre

Re: [HACKERS] Improving RLS planning

2016-10-25 Thread David Rowley
On 26 October 2016 at 10:58, Tom Lane wrote: > The alternative I'm now thinking about pursuing is to get rid of the > conversion of RLS quals to subqueries. Instead, we can label individual > qual clauses with security precedence markings. Concretely, suppose we > add an "int security_level" fie

Re: [HACKERS] Does it make sense to add a -q (quiet) flag to initdb?

2016-10-25 Thread Jim Nasby
On 10/25/16 11:26 AM, Joshua D. Drake wrote: Per: https://www.commandprompt.com/blog/can_i_make_initdb_quiet/ This was a question that was asked on #postgresql. Obviously we found a work around but I wonder if it makes sense to add a -q to solve some of these issues? (I could see it being useful

[HACKERS] Improving RLS planning

2016-10-25 Thread Tom Lane
Currently, we don't produce very good plans when row-level security is enabled. An example is that, given create table t1 (pk1 int primary key, label text); create table t2 (pk2 int primary key, fk int references t1); then for select * from t1, t2 where pk1 = fk and pk2

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-25 Thread Michael Paquier
On Wed, Oct 26, 2016 at 2:00 AM, Magnus Hagander wrote: > Thanks, applied and pushed. Thanks. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

2016-10-25 Thread Tomas Vondra
On 10/23/2016 05:26 PM, Petr Jelinek wrote: On 23/10/16 16:26, Tomas Vondra wrote: On 10/22/2016 08:30 PM, Tomas Vondra wrote: ... Moreover, the slab/gen allocators proposed here seem like a better fit for reorderbuffer, e.g. because they release memory. I haven't looked at sb_alloc too closely,

Re: [HACKERS] Wraparound warning

2016-10-25 Thread Robert Haas
On Tue, Oct 25, 2016 at 1:32 PM, Bruce Momjian wrote: > On Tue, Oct 25, 2016 at 01:19:26PM -0400, Robert Haas wrote: >> On Tue, Oct 25, 2016 at 11:20 AM, Bruce Momjian wrote: >> > Do we still need to report the wraparound warning on server startup? >> > >> > LOG: MultiXact member wraparo

Re: [HACKERS] pg_dump: Simplify internal archive version handling

2016-10-25 Thread Peter Eisentraut
On 10/13/16 9:13 AM, Tom Lane wrote: > Peter Eisentraut writes: >> I propose the attached patch to clean up some redundancy and confusion >> in pg_dump. > > Looks sane, though I'd suggest coding the access macros with shifts > not multiplies/divides. Done. > Since these numbers are purely inter

Re: [HACKERS] emergency outage requiring database restart

2016-10-25 Thread Merlin Moncure
On Tue, Oct 25, 2016 at 2:31 PM, Tom Lane wrote: > Merlin Moncure writes: >> What if the subsequent dataloss was in fact a symptom of the first >> outage? Is in theory possible for data to appear visible but then be >> eaten up as the transactions making the data visible get voided out by >> som

Re: [HACKERS] emergency outage requiring database restart

2016-10-25 Thread Tom Lane
Merlin Moncure writes: > What if the subsequent dataloss was in fact a symptom of the first > outage? Is in theory possible for data to appear visible but then be > eaten up as the transactions making the data visible get voided out by > some other mechanic? I had to pull a quick restart the fir

Re: [HACKERS] emergency outage requiring database restart

2016-10-25 Thread Merlin Moncure
On Tue, Oct 25, 2016 at 12:57 PM, Alvaro Herrera wrote: > Merlin Moncure wrote: > >> After last night, I rebuilt the cluster, turning on checksums, turning >> on synchronous commit (it was off) and added a standby replica. This >> should help narrow the problem down should it re-occur; if storage

Re: [HACKERS] emergency outage requiring database restart

2016-10-25 Thread Alvaro Herrera
Merlin Moncure wrote: > After last night, I rebuilt the cluster, turning on checksums, turning > on synchronous commit (it was off) and added a standby replica. This > should help narrow the problem down should it re-occur; if storage is > bad (note, other database on same machine is doing 10x wr

Re: [HACKERS] emergency outage requiring database restart

2016-10-25 Thread Merlin Moncure
On Mon, Oct 24, 2016 at 9:18 PM, Alvaro Herrera wrote: > Merlin Moncure wrote: >> On Mon, Oct 24, 2016 at 6:01 PM, Merlin Moncure wrote: > >> > Corruption struck again. >> > This time got another case of view busted -- attempting to create >> > gives missing 'type' error. >> >> Call it a hunch --

Re: [HACKERS] Wraparound warning

2016-10-25 Thread Bruce Momjian
On Tue, Oct 25, 2016 at 01:19:26PM -0400, Robert Haas wrote: > On Tue, Oct 25, 2016 at 11:20 AM, Bruce Momjian wrote: > > Do we still need to report the wraparound warning on server startup? > > > > LOG: MultiXact member wraparound protections are now enabled > > > > I thought that was go

Re: [HACKERS] spoonbill - rare buildfarm failures in test_shm_mq_pipelined()

2016-10-25 Thread Tom Lane
Stefan Kaltenbrunner writes: > Spoonbill is very rarely (ie once every few months) failing like this: Yeah, I've been wondering about that ... > Any ideas on what is causing this? No, but it would sure be interesting to get a stack trace showing where the SIGFPE is happening. Could you change

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

2016-10-25 Thread Robert Haas
On Mon, Oct 24, 2016 at 4:15 PM, Peter Eisentraut wrote: > On 10/24/16 11:57 AM, Robert Haas wrote: >> Today, since the host part can't include a >> port specifier, it's regarded as part of the IP address, and I think >> it would probably be a bad idea to change that, as I believe Victor's >> patc

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

2016-10-25 Thread Robert Haas
On Mon, Oct 24, 2016 at 4:40 PM, Alvaro Herrera wrote: > Umm, my recollection regarding IPv6 parsing in the URI syntax is that > those must appear inside square brackets -- it's not valid to have the > IPv6 address outside brackets, and the port number is necessarily > outside the brackets. So th

Re: [HACKERS] Wraparound warning

2016-10-25 Thread Robert Haas
On Tue, Oct 25, 2016 at 11:20 AM, Bruce Momjian wrote: > Do we still need to report the wraparound warning on server startup? > > LOG: MultiXact member wraparound protections are now enabled > > I thought that was going to be removed at some point, no? If you start with a 9.3.small clust

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-10-25 Thread Tom Lane
Alvaro Herrera writes: > BTW, should we cost push-down-able quals differently, say discount some > fraction of the cost, to reflect the fact that they are cheaper to run? > However, since the decision of which ones to push down depends on the > cost, and the cost would depend on which ones we push

[HACKERS] spoonbill - rare buildfarm failures in test_shm_mq_pipelined()

2016-10-25 Thread Stefan Kaltenbrunner
Spoonbill is very rarely (ie once every few months) failing like this: [2016-08-29 18:15:35.273 CEST:57c45f88.52d4:8] LOG: statement: SELECT test_shm_mq_pipelined(16384, (select string_agg(chr(32+(random()*95)::int), '') from generate_series(1,27)), 200, 3); [2016-08-29 18:15:35.282 CEST:57c4

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-25 Thread Robert Haas
On Mon, Oct 24, 2016 at 2:55 AM, Michael Paquier wrote: > Yep, minRecoveryPoint still gets updated when the last checkpoint > record is the last restart point to avoid a hot standby to allow > read-only connections at a LSN-point earlier than the last shutdown. > Anyway, we can clearly reject 1. i

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-25 Thread Robert Haas
On Mon, Oct 24, 2016 at 12:26 AM, Amit Kapila wrote: >> The consensus solution on this thread seems to be that we should have >> pg_do_stop_backup() return the last-replayed XLOG location as the >> backup end point. If the control file has been updated with a newer >> redo location, then the asso

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-25 Thread Robert Haas
On Sun, Oct 23, 2016 at 11:48 PM, Kyotaro HORIGUCHI wrote: >> I can think of two solutions that would be "tighter": >> >> 1. When performing a restartpoint, update the minimum recovery point >> to just beyond the checkpoint record. I think this can't hurt anyone >> who is actually restarting reco

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-10-25 Thread Alvaro Herrera
Dilip Kumar wrote: > #2. Currently quals are ordered based on cost (refer > order_qual_clauses), But once we pushdown some of the quals, then > those quals will always be executed first. Can this create problem ? We don't promise order of execution (which is why we can afford to sort on cost), bu

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-25 Thread Magnus Hagander
On Tue, Oct 25, 2016 at 2:52 PM, Michael Paquier wrote: > On Tue, Oct 25, 2016 at 7:12 PM, Magnus Hagander > wrote: > > On Mon, Oct 24, 2016 at 7:46 AM, Michael Paquier < > michael.paqu...@gmail.com> > > wrote: > >> > >> On Sun, Oct 23, 2016 at 10:28 PM, Magnus Hagander > >> wrote: > >> + if

Re: [HACKERS] Proposal: scan key push down to heap [WIP]

2016-10-25 Thread Dilip Kumar
On Fri, Oct 14, 2016 at 11:54 AM, Andres Freund wrote: > I don't think it's a good idea to do this under the content lock in any > case. But luckily I don't think we have to do so at all. > > Due to pagemode - which is used by pretty much everything iterating over > heaps, and definitely seqscans

[HACKERS] Does it make sense to add a -q (quiet) flag to initdb?

2016-10-25 Thread Joshua D. Drake
Hello, Per: https://www.commandprompt.com/blog/can_i_make_initdb_quiet/ This was a question that was asked on #postgresql. Obviously we found a work around but I wonder if it makes sense to add a -q to solve some of these issues? (I could see it being useful with automation). Sincerely, JD

Re: [HACKERS] Reload config instructions

2016-10-25 Thread Bruce Momjian
On Sat, Oct 22, 2016 at 11:39:40AM -0400, Bruce Momjian wrote: > I found our postgresql.conf and pg_hba.conf config files had > inconsistent comment instructions about reloading, and didn't mention > SELECT pg_reload_conf(). > > The attached doc patch fixes this. Patch applied to head. -- Bru

[HACKERS] Wraparound warning

2016-10-25 Thread Bruce Momjian
Do we still need to report the wraparound warning on server startup? LOG: MultiXact member wraparound protections are now enabled I thought that was going to be removed at some point, no? -- Bruce Momjian http://momjian.us EnterpriseDB http://en

Re: [HACKERS] Recommend wrappers of PG_DETOAST_DATUM_PACKED()

2016-10-25 Thread Tom Lane
Noah Misch writes: > When commit 3e23b68dac006e8deb0afa327e855258df8de064 introduced single-byte > varlena headers, its fmgr.h changes presented PG_GETARG_TEXT_PP() and > PG_GETARG_TEXT_P() as equals. Its postgres.h changes presented > PG_DETOAST_DATUM_PACKED() and VARDATA_ANY() as the exceptiona

[HACKERS] Recommend wrappers of PG_DETOAST_DATUM_PACKED()

2016-10-25 Thread Noah Misch
When commit 3e23b68dac006e8deb0afa327e855258df8de064 introduced single-byte varlena headers, its fmgr.h changes presented PG_GETARG_TEXT_PP() and PG_GETARG_TEXT_P() as equals. Its postgres.h changes presented PG_DETOAST_DATUM_PACKED() and VARDATA_ANY() as the exceptional case. Let's firmly recomm

Re: [HACKERS] [PATCH] pgpassfile connection option

2016-10-25 Thread Julian Markwort
On 10/16/2016 12:09 PM, Fabien COELHO wrote: Patch applies cleanly, make check ok... however AFAICS it only means that it compiles but it is not tested in anyway... This is is annoying. Well I'm not sure whether other options are tested either, but they should. Thanks for taking the time to re

Re: [HACKERS] Quorum commit for multiple synchronous replication.

2016-10-25 Thread Michael Paquier
On Mon, Oct 17, 2016 at 4:00 PM, Masahiko Sawada wrote: > Attached latest patch. > Please review it. Okay, so let's move on with this patch... + + The keyword ANY is omissible, but note that there is + not compatibility between PostgreSQL version 10 and + 9.6 or

Re: [HACKERS] Add PGDLLEXPORT to PG_FUNCTION_INFO_V1

2016-10-25 Thread Albe Laurenz
I wrote: > Anyway, I have prepared a patch along the lines you suggest. It occurred to me that the documentation still suggests that you should add a declaration to a C function; I have fixed that too. I'll add the patch to the next commitfest. Yours, Laurenz Albe 0001-Add-PGDLLEXPORT-to-PG_FU

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-25 Thread Michael Paquier
On Tue, Oct 25, 2016 at 7:12 PM, Magnus Hagander wrote: > On Mon, Oct 24, 2016 at 7:46 AM, Michael Paquier > wrote: >> >> On Sun, Oct 23, 2016 at 10:28 PM, Magnus Hagander >> wrote: >> + if (format == 'p') >> + stream.walmethod = CreateWalDirectoryMethod(param->xlog, do_sync); >> + els

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

2016-10-25 Thread Peter Eisentraut
On 10/25/16 1:38 AM, Haribabu Kommi wrote: > Here I attached the first version of patch that supports both EUI-48 and > EUI-64 type > Mac addresses with a single datatype called macaddr. This is an variable > length > datatype similar like inet. It can store both 6 and 8 byte addresses. > Variable

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

2016-10-25 Thread Etsuro Fujita
On 2016/10/25 18:58, Ashutosh Bapat wrote: You wrote: 13. The comment below is missing the main purpose i.e. creating a a unique alias, in case the relation gets converted into a subquery. Lowest or highest relid will create a unique alias at given level of join and that would be more future pro

Re: [HACKERS] Declarative partitioning - another take

2016-10-25 Thread Amit Kapila
On Thu, Oct 6, 2016 at 12:44 PM, Amit Langote wrote: > On 2016/10/05 2:12, Robert Haas wrote: > Attached revised patches. Few assorted review comments for 0001-Catalog*: 1. @@ -1775,6 +1775,12 @@ BeginCopyTo(ParseState *pstate, { .. + else if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)

Re: [HACKERS] asynchronous execution

2016-10-25 Thread Kyotaro HORIGUCHI
Hi, this is the 7th patch to make instrumentation work. Explain analyze shows the following result by the previous patch set . | Aggregate (cost=820.25..820.26 rows=1 width=8) (actual time=4324.676..4324.676 | rows=1 loops=1) | -> Append (cost=0.00..791.00 rows=11701 width=4) (actual time=

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-25 Thread Magnus Hagander
On Mon, Oct 24, 2016 at 7:46 AM, Michael Paquier wrote: > On Sun, Oct 23, 2016 at 10:28 PM, Magnus Hagander > wrote: > > It also broke the tests and invalidated some documentation. But it was > easy > > enough to fix. > > > > I've now applied this, so next time you get to do the merging :P Jokin

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

2016-10-25 Thread Ashutosh Bapat
> >> 13. The comment below is missing the main purpose i.e. creating a a unique >> alias, in case the relation gets converted into a subquery. Lowest or >> highest >> relid will create a unique alias at given level of join and that would be >> more >> future proof. If we decide to consider paths fo

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2016-10-25 Thread Peter Moser
On 27.07.2016 at 16:09 Robert Haas wrote: On Fri, Jul 22, 2016 at 7:15 AM, Anton Dignös wrote: We would like to contribute to PostgreSQL a solution that supports the query processing of "at each time point". The basic idea is to offer two new operators, NORMALIZE and ALIGN, whose purpose is to

Re: [HACKERS] asynchronous execution

2016-10-25 Thread Kyotaro HORIGUCHI
This is the rebased version on the current master(-0004), and added resowner stuff (0005) and unlikely(0006). At Tue, 18 Oct 2016 10:30:51 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20161018.103051.30820907.horiguchi.kyot...@lab.ntt.co.jp> > > > - Errors in the executor can leak t

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

2016-10-25 Thread Amit Kapila
On Tue, Oct 25, 2016 at 2:10 AM, Alvaro Herrera wrote: > Robert Haas wrote: > > >> It is not obvious what it means if there are multiple ports but the >> number doesn't equal the number of hosts. > > I think we should reject the case of differing number of elements and > neither host nor port is a

Re: [HACKERS] [RFC] Transaction management overhaul is necessary?

2016-10-25 Thread Tsunakawa, Takayuki
From: Craig Ringer [mailto:cr...@2ndquadrant.com] > >> This was because psqlODBC starts and ends a subtransaction for each > >> SQL statement by default to implement statement-level rollback. And > >> PostgreSQL creates one CurTransactionContext memory context, which is > >> 8KB, for each subtrans

Re: [HACKERS] pg_hba_file_settings view patch

2016-10-25 Thread Alvaro Herrera
Haribabu Kommi wrote: > On Mon, Oct 3, 2016 at 3:51 PM, Michael Paquier > wrote: > Yes, I agree that adding these JSONB utility functions for this view > is an overkill, but I thought that these are may be useful for some > users if it is a JSONB type instead of array. Peter Eisentraut said he'd