Re: [HACKERS] custom function for converting human readable sizes to bytes

2015-12-29 Thread Pavel Stehule
Hi >>> -1 from me. I don't think we should muck with the way pg_size_pretty >>> works. >>> >> >> new update - I reverted changes in pg_size_pretty >> > > Hi, > > I didn't check out earlier versions of this patch, but the latest one > still changes pg_size_pretty() to emit PB suffix. > > I don't

Re: [HACKERS] proposal: multiple psql option -c

2015-12-29 Thread Bruce Momjian
On Thu, Dec 10, 2015 at 11:10:55AM -0500, Robert Haas wrote: > On Wed, Dec 9, 2015 at 12:15 AM, Pavel Stehule > wrote: > >> On Wed, Dec 9, 2015 at 2:07 PM, Pavel Stehule > >> wrote: > >> > should be noted, recorded somewhere so this introduce

[HACKERS] Better detail logging for password auth failures

2015-12-29 Thread Tom Lane
We often tell people to look in the postmaster log for more information about authentication problems; but an off-list question prompted me to notice that many of the common authentication failure cases don't actually get any useful commentary in the log. The attached proposed patch remedies this

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-12-29 Thread Tom Lane
Michael Paquier writes: >> On Sun, Dec 20, 2015 at 6:24 AM, Tom Lane wrote: >>> 1. I think it would be a good idea to convert the matching rules for >>> backslash commands too. To do that, we'd need to provide a case-sensitive >>> equivalent to

Re: [HACKERS] Patch: fix lock contention for HASHHDR.mutex

2015-12-29 Thread Aleksander Alekseev
Good news, everyone! I discovered that NUM_LOCK_OF_PARTITIONS is a bottleneck for a last patch. Long story short - NUM_LOCK_OF_PARTITIONS = (1 << 7) gives best performance: PN = 16, AN = 8, NUM_LOCK_PARTITIONS = (1 << 7): 4782.9 PN = 16, AN = 4, NUM_LOCK_PARTITIONS = (1 << 7): 4089.9 PN = 16,

Re: [HACKERS] dynloader.h missing in prebuilt package for Windows?

2015-12-29 Thread Bruce Momjian
On Sun, Dec 6, 2015 at 07:16:24PM +, Olson, Ken wrote: > I have downloaded a fresh copy of the Win x64 installer > (postgresql-9.4.5-2-windows-x64.exe) from > http://www.enterprisedb.com/products-services-training/pgdownload. The output > of pg_config and assodicated directory listing of

Re: [HACKERS] pg_controldata/pg_resetxlog "Latest checkpoint's NextXID" format

2015-12-29 Thread Tom Lane
=?UTF-8?B?Sm9zw6kgTHVpcyBUYWxsw7Nu?= writes: > On 12/29/2015 01:18 PM, Heikki Linnakangas wrote: >> On 29/12/15 07:14, Joe Conway wrote: >>> Shouldn't it use "%X/%X", same as e.g. "Prior checkpoint location" and >>> all the other XIDs? >> No. The "locations" in the

Re: [HACKERS] Testing Postgresql 9.5 RC1 with Alfresco 5.0.d

2015-12-29 Thread Boriss Mejias
Simon Riggs wrote on 29/12/15 05:31: [...] Thanks for testing. Do you have any comments on performance testing? Not really, because I didn't have an equivalent environment to compare. These tests took exactly the same time as another one with Postgresql 9.3, with a major different in the

[HACKERS] COPY (... tab completion

2015-12-29 Thread Andreas Karlsson
Hi, Here is a patch which adds tab completion for COPY with a query. Currently there is only completion for COPY with a relation. Andreas diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 98884eb..98023ca 100644 --- a/src/bin/psql/tab-complete.c +++

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-12-29 Thread Pavel Stehule
Hi 2015-12-08 7:06 GMT+01:00 Catalin Iacob : > On Thu, Dec 3, 2015 at 6:54 PM, Pavel Stehule > wrote: > > Don't understand - if Fatal has same behave as Error, then why it cannot > be > > inherited from Error? > > > > What can be broken? > >

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-12-29 Thread Michael Paquier
On Wed, Dec 30, 2015 at 1:21 AM, Tom Lane wrote: > This is because of the use of strncmp instead of plain strcmp > in most of the backslash matching rules, eg the above case is > covered by > > else if (strncmp(prev_wd, "\\df", strlen("\\df")) == 0) Ah, OK. The length

Re: [HACKERS] pg_controldata/pg_resetxlog "Latest checkpoint's NextXID" format

2015-12-29 Thread Joe Conway
On 12/29/2015 07:15 AM, Tom Lane wrote: > Yeah. Use of the same x/y notation with two different bases seems like > a recipe for confusion. It's probably too late to do anything about > this for 9.5, but I'd be +1 for adopting Jose's suggestion or some > other formatting tweak in HEAD. I made

Re: [HACKERS] On columnar storage (2)

2015-12-29 Thread Jim Nasby
On 12/28/15 1:15 PM, Alvaro Herrera wrote: Currently within the executor a tuple is a TupleTableSlot which contains one Datum array, which has all the values coming out of the HeapTuple; but for split storage tuples, we will need to have a TupleTableSlot that has multiple "Datum arrays" (in a

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-12-29 Thread Michael Paquier
On Wed, Dec 30, 2015 at 6:26 AM, Thomas Munro wrote: > On Wed, Dec 30, 2015 at 3:14 AM, Michael Paquier > wrote: >> On Sun, Dec 20, 2015 at 8:08 AM, Michael Paquier >> wrote: >>> On Sun, Dec 20, 2015 at 6:24

Re: [HACKERS] Additional role attributes && superuser review

2015-12-29 Thread Michael Paquier
On Tue, Dec 29, 2015 at 11:55 PM, Stephen Frost wrote: > I could go either way on that, really. I don't find namespace to be > confusing when used in that way, but I'll change it since others do. It seems to me that the way patch does it is fine.. -- Michael -- Sent via

Re: [HACKERS] Multi-tenancy with RLS

2015-12-29 Thread Haribabu Kommi
On Thu, Dec 17, 2015 at 12:46 PM, Haribabu Kommi wrote: > Rebased patch is attached as it is having an OID conflict with the > latest set of changes > in the master branch. Here I attached new series of patches with a slightly different approach. Instead of creating the

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2015-12-29 Thread Joe Conway
On 12/23/2015 04:37 PM, Michael Paquier wrote: > On Thu, Dec 24, 2015 at 2:08 AM, Joe Conway wrote: >> 2) Change the pg_controldata to be a bunch of separate functions as >>suggested by Josh Berkus rather than one SRF. > > This looks like a plan, thanks! As discussed, a

Re: [HACKERS] Combining Aggregates

2015-12-29 Thread David Rowley
On 25 December 2015 at 14:10, Robert Haas wrote: > On Mon, Dec 21, 2015 at 4:53 PM, David Rowley > wrote: > > On 22 December 2015 at 01:30, Robert Haas wrote: > >> Can we use Tom's expanded-object stuff instead of

Re: [HACKERS] [COMMITTERS] pgsql: Document brin_summarize_new_pages

2015-12-29 Thread Tatsuo Ishii
Great. It would be nice if brin.sgml has a reference to func.sgml. I mean something like: brin_summarize_new_pages(regclass) function, or automatically when VACUUM processes the table. + See also . Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English:

Re: [HACKERS] dynloader.h missing in prebuilt package for Windows?

2015-12-29 Thread Bruce Momjian
On Tue, Dec 29, 2015 at 03:01:55PM -0500, Chapman Flack wrote: > On 12/29/15 14:08, Bruce Momjian wrote: > > > This should fix the PL/Java Windows build problem. I don't think I will > > get this patch into 9.5.0 but will put it in after 9.5.0 is released and > > it will appear in all the next

Re: [HACKERS] Avoid endless futile table locks in vacuuming.

2015-12-29 Thread Jeff Janes
On Mon, Dec 28, 2015 at 2:12 PM, Tom Lane wrote: > I wrote: >> Jeff Janes writes: >>> If a partially-active table develops a slug of stable all-visible, >>> non-empty pages at the end of it, then every autovacuum of that table >>> will skip the end pages

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-12-29 Thread Thomas Munro
On Wed, Dec 30, 2015 at 3:14 AM, Michael Paquier wrote: > On Sun, Dec 20, 2015 at 8:08 AM, Michael Paquier > wrote: >> On Sun, Dec 20, 2015 at 6:24 AM, Tom Lane wrote: >>> 2. I believe that a very large fraction of the

Re: [HACKERS] Avoid endless futile table locks in vacuuming.

2015-12-29 Thread Tom Lane
Jeff Janes writes: > If we are not doing a scan_all and we fail to acquire a clean-up lock on > the last block, and the last block reports that it needs freezing, then we > continue on to wait for the clean-up lock. But there is no need, we don't > really need to freeze the

Re: [HACKERS] dynloader.h missing in prebuilt package for Windows?

2015-12-29 Thread Chapman Flack
On 12/29/15 14:08, Bruce Momjian wrote: > This should fix the PL/Java Windows build problem. I don't think I will > get this patch into 9.5.0 but will put it in after 9.5.0 is released and > it will appear in all the next minor version releases, including 9.5.1, > which should happen in the next

Re: [HACKERS] Some 9.5beta2 backend processes not terminating properly?

2015-12-29 Thread Amit Kapila
On Tue, Dec 29, 2015 at 7:04 PM, Shay Rojansky wrote: > Could you describe the worklad a bit more? Is this rather concurrent? Do >> you use optimized or debug builds? How long did you wait for the >> backends to die? Is this all over localhost, external ip but local, >> remotely?

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-29 Thread Haribabu Kommi
On Wed, Dec 30, 2015 at 1:07 AM, Shulgin, Oleksandr wrote: > > This is close enough, but what I actually mean by "a callback" is more or > less like the attached version. Thanks for the changes. > While at it, I've also added some trivial code to preserve keyword

Re: [HACKERS] pg_controldata/pg_resetxlog "Latest checkpoint's NextXID" format

2015-12-29 Thread Simon Riggs
On 30 December 2015 at 00:17, Joe Conway wrote: > On 12/29/2015 07:15 AM, Tom Lane wrote: > > Yeah. Use of the same x/y notation with two different bases seems like > > a recipe for confusion. It's probably too late to do anything about > > this for 9.5, but I'd be +1 for

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2015-12-29 Thread Thomas Munro
On Wed, Nov 18, 2015 at 11:50 PM, Thomas Munro wrote: > Here is a new version of the patch with a few small improvements: > ... > [causal-reads-v3.patch] That didn't apply after 6e7b3359 (which fix a typo in a comment that I moved). Here is a new version that

[HACKERS] More thorough planning for OLAP queries (was: [PATCH] Equivalence Class Filters)

2015-12-29 Thread David Rowley
Hi, On [1] I suggested an idea to make improvements to the planner around the Equivalence Class code. Later in [2] Tom raised concerns with this adding too many planning cycles for a perhaps not common enough situation. I don't want to discuss that particular patch here, I want to discuss more

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2015-12-29 Thread Robert Haas
On Mon, Dec 28, 2015 at 3:17 AM, Amit Kapila wrote: > 2. > @@ -213,6 +213,7 @@ typedef enum BuiltinTrancheIds > LWTRANCHE_WAL_INSERT, > LWTRANCHE_BUFFER_CONTENT, > LWTRANCHE_BUFFER_IO_IN_PROGRESS, > + LWTRANCHE_PROC, > LWTRANCHE_FIRST_USER_DEFINED > }

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2015-12-29 Thread Amit Kapila
On Wed, Dec 16, 2015 at 12:26 AM, Robert Haas wrote: > > > In terms of this project overall, NumLWLocks() now knows about only > four categories of stuff: fixed lwlocks, backend locks (proc.c), > replication slot locks, and locks needed by extensions. I think it'd >

[HACKERS] commit 5c45d2f need to be back-patch on branch 9.2 & before

2015-12-29 Thread amul sul
Hi, Uninitialized variable 'dtype' warning in date_in() is fix[1] on branch 9.3 & above, but not for 9.2 & older branches. I guess this should be back-patch. [1] commit link=> http://git.postgresql.org/pg/commitdiff/5c45d2f87835ccd3ffac338845ec79cab1b31a11 Regards, Amul Sul -- Sent via

Re: [HACKERS] pg_controldata/pg_resetxlog "Latest checkpoint's NextXID" format

2015-12-29 Thread José Luis Tallón
On 12/29/2015 01:18 PM, Heikki Linnakangas wrote: On 29/12/15 07:14, Joe Conway wrote: I wonder why "Latest checkpoint's NextXID" is formated like this: 8<- printf(_("Latest checkpoint's NextXID: %u/%u\n"),

Re: [HACKERS] pg_controldata/pg_resetxlog "Latest checkpoint's NextXID" format

2015-12-29 Thread Heikki Linnakangas
On 29/12/15 07:14, Joe Conway wrote: I wonder why "Latest checkpoint's NextXID" is formated like this: 8<- printf(_("Latest checkpoint's NextXID: %u/%u\n"), ControlFile.checkPointCopy.nextXidEpoch,

Re: [HACKERS] Additional role attributes && superuser review

2015-12-29 Thread Stephen Frost
Amit, * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: > On 2015/12/23 7:23, Stephen Frost wrote: > > Updated patch attached. I'll give it another good look and then commit > > it, barring objections. > > Just a minor nitpick about a code comment - > > /* > + * Check that the

Re: [HACKERS] Some 9.5beta2 backend processes not terminating properly?

2015-12-29 Thread Andres Freund
On 2015-12-29 12:41:40 +0200, Shay Rojansky wrote: > > > > > The tests run for a couple minutes, open and close some connection. With > > my > > > pre-9.5 backends, the moment the test runner exits I can see that all > > > backend processes exit immediately, and pg_activity_stat has no rows > > >

Re: [HACKERS] Additional role attributes && superuser review

2015-12-29 Thread Stephen Frost
Noah, * Noah Misch (n...@leadboat.com) wrote: > > Updated patch attached. I'll give it another good look and then commit > > it, barring objections. > > This thread and its satellite[1] have worked their way through a few designs. > At first, it was adding role attributes, alongside existing

Re: [HACKERS] Some 9.5beta2 backend processes not terminating properly?

2015-12-29 Thread Shay Rojansky
> > > The tests run for a couple minutes, open and close some connection. With > my > > pre-9.5 backends, the moment the test runner exits I can see that all > > backend processes exit immediately, and pg_activity_stat has no rows > > (except the querying one). With 9.5beta2, however, some backend

Re: [HACKERS] Some 9.5beta2 backend processes not terminating properly?

2015-12-29 Thread Shay Rojansky
> > Could you describe the worklad a bit more? Is this rather concurrent? Do > you use optimized or debug builds? How long did you wait for the > backends to die? Is this all over localhost, external ip but local, > remotely? > The workload is a a rather diverse set of integration tests executed

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-29 Thread Shulgin, Oleksandr
On Tue, Dec 29, 2015 at 4:15 AM, Haribabu Kommi wrote: > On Mon, Dec 28, 2015 at 9:09 PM, Shulgin, Oleksandr > wrote: > > > > Still this requires a revert of the memory context handling commit for > > load_hba() and load_ident(). I think

Re: [HACKERS] commit 5c45d2f need to be back-patch on branch 9.2 & before

2015-12-29 Thread Andres Freund
Hi, On 2015-12-29 11:22:52 +, amul sul wrote: > Uninitialized variable 'dtype' warning in date_in() is fix[1] on branch 9.3 & > above, but not for 9.2 & older branches. I guess this should be back-patch. > [1] commit link=> >

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-12-29 Thread Michael Paquier
On Sun, Dec 20, 2015 at 8:08 AM, Michael Paquier wrote: > On Sun, Dec 20, 2015 at 6:24 AM, Tom Lane wrote: >> 1. I think it would be a good idea to convert the matching rules for >> backslash commands too. To do that, we'd need to provide a