Re: [HACKERS] REGEXP_MATCHES() strange behavior with '^' and '$' pattern

2013-07-31 Thread Jeevan Chalke
On Wed, Jul 31, 2013 at 7:47 PM, Tom Lane wrote: > Jeevan Chalke writes: > > Oops forgot patch. > > Attached now. > > Hmm ... I think the logic change is good, but two demerits for not fixing > the adjacent comment. > I had a look over comments and somehow I found that OK. Anyway, updated comm

Re: [HACKERS] FailedAssertion on initdb with 9.4dev

2013-07-31 Thread Amit Langote
Build using: CFLAGS="-g -O0" ./configure --with-pam --enable-cassert --enable-debug --prefix=/home/amit/dev/pginstall/ -- Amit Langote -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] FailedAssertion on initdb with 9.4dev

2013-07-31 Thread Amit Langote
Hello, initdb using the latest HEAD (9.4dev) fails with: [amit@centos64vm postgresql]$ initdb -D ~/dev/pgdata/ The files belonging to this database system will be owned by user "amit". This user must also own the server process. The database cluster will be initialized with locale "en_US.utf8".

[HACKERS] How to configer the pg_hba record which the database name with "\n" ?

2013-07-31 Thread huxm
Hi all, I've come across an issue within pg_hba configuration which it seems cannot not set the record of a database name where there is a newline(\n) in the name. I created the database whihin psql like this: create database "ab cd"; I have tried all the following records, but seems not to work

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2013-07-31 Thread Simon Riggs
On 1 August 2013 01:53, Noah Misch wrote: > I was able to distill the above hypothesis into an actual crash with > reduce_lock_levels.v13.patch. Test recipe: Thank you for the report; thank you again for reporting in sufficient time to allow me to investigate and fix by the next CF. -- Simon

Re: [HACKERS] Backup throttling

2013-07-31 Thread Gibheer
On Wed, 31 Jul 2013 22:50:19 +0200 Antonin Houska wrote: > On 07/31/2013 07:13 AM, Gibheer wrote: > > Hi, > > > > That is a really nice feature. > I don't pretend it's my idea, I just coded it. My boss proposed the > feature as such :-) > > I took a first look at your patch and some empty lines

[HACKERS] Re: [COMMITTERS] pgsql: Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY.

2013-07-31 Thread Noah Misch
On Wed, Jul 31, 2013 at 03:39:14AM +0200, Andres Freund wrote: > On 2013-07-23 09:27:34 -0700, Kevin Grittner wrote: > > Andres Freund wrote: > > > * Shouldn't the GetUserIdAndSecContext(), NewGUCNestLevel() dance > > >   be done a good bit earlier? We're executing queries before > > >   that. > >

Re: [HACKERS] [9.3 bug] disk space in pg_xlog increases during archive recovery

2013-07-31 Thread Fujii Masao
On Thu, Aug 1, 2013 at 7:37 AM, MauMau wrote: > From: "Fujii Masao" > >> - if (source == XLOG_FROM_ARCHIVE) >> + if (source == XLOG_FROM_ARCHIVE && >> + StandbyModeRequested && AllowCascadeReplication()) >> >> I think that the condition of StandbyModeRequested should be removed >> because someone

Re: [HACKERS] backup.sgml-cmd-v003.patch

2013-07-31 Thread Michael Paquier
On Thu, Aug 1, 2013 at 9:39 AM, Alvaro Herrera wrote: > Michael Paquier escribió: > > > On Thu, Aug 1, 2013 at 2:08 AM, Ivan Lezhnjov IV >wrote: > > > > > The patch does pass 'make check' and 'make html' successfully. > > > > > Your patch does not add new code, but just documentation, so there is

Re: [HACKERS] Proposal - Support for National Characters functionality

2013-07-31 Thread Arulappan, Arul Shaji
> From: Tom Lane [mailto:t...@sss.pgh.pa.us] > > Alvaro Herrera writes: > > Also, as far as I understand what we want to control here is the > > encoding that the strings are in (the mapping of bytes to characters), > > not the collation (the way a set of strings are ordered). So it > > doesn't

Re: [HACKERS] Proposal - Support for National Characters functionality

2013-07-31 Thread Arulappan, Arul Shaji
> From: Alvaro Herrera [mailto:alvhe...@2ndquadrant.com] > > Boguk, Maksym escribió: > > > I think I give a wrong description there... it will be not GUC but > > GUC-type value which will be initialized during CREATE DATABASE and > > will be read only after, very similar to the lc_collate. > > So

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2013-07-31 Thread Noah Misch
On Mon, Jul 15, 2013 at 05:50:40PM +0100, Simon Riggs wrote: > On 15 July 2013 15:06, Robert Haas wrote: > > Generally, the question on the table is: to what extent do MVCC > > catalog scans make the world safe for concurrent DDL, or put > > negatively, what hazards remain? > > On Tom's test I've

Re: [HACKERS] backup.sgml-cmd-v003.patch

2013-07-31 Thread Alvaro Herrera
Michael Paquier escribió: > On Thu, Aug 1, 2013 at 2:08 AM, Ivan Lezhnjov IV > wrote: > > > The patch does pass 'make check' and 'make html' successfully. > > > Your patch does not add new code, but just documentation, so there is no > risk that make check would fail, except if an error has been

Re: [HACKERS] backup.sgml-cmd-v003.patch

2013-07-31 Thread Michael Paquier
Hi, Could you add this documentation patch to the next commit fest such as it doesn't get lost in the stack? https://commitfest.postgresql.org/action/commitfest_view?id=19 On Thu, Aug 1, 2013 at 2:08 AM, Ivan Lezhnjov IV wrote: > The patch does pass 'make check' and 'make html' successfully. > Y

Re: [HACKERS] Patch for removng unused targets -- PLEASE COMMIT

2013-07-31 Thread Tom Lane
Alvaro Herrera writes: > Josh Berkus escribió: >> Hello? Hello? Is there a committer in the house? > Uhm, I had written a reply but I think it was lost in the shuffle. I > said that "ready for committer" doesn't mean that the patch is ready to > commit, it means that a committer needs to revie

Re: [HACKERS] Patch for removng unused targets -- PLEASE COMMIT

2013-07-31 Thread Alvaro Herrera
Josh Berkus escribió: > On 07/29/2013 03:23 PM, Josh Berkus wrote: > > Everyone, > > > > This patch has been marked "ready for committer" since July 2nd. Can > > someone please commit it, and let us close out this CF? > > Hello? Hello? Is there a committer in the house? Uhm, I had written a r

Re: [HACKERS] Patch for removng unused targets -- PLEASE COMMIT

2013-07-31 Thread Josh Berkus
On 07/29/2013 03:23 PM, Josh Berkus wrote: > Everyone, > > This patch has been marked "ready for committer" since July 2nd. Can > someone please commit it, and let us close out this CF? Hello? Hello? Is there a committer in the house? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.

Re: [HACKERS] pass-through queries to foreign servers

2013-07-31 Thread David Fetter
On Wed, Jul 31, 2013 at 01:22:56AM -0400, Tom Lane wrote: > David Fetter writes: > > On Tue, Jul 30, 2013 at 04:40:38PM -0700, David Gudeman wrote: > >> When you write an application involving foreign tables, you frequently > >> end up with queries that are just too inefficient because they bring

Re: [HACKERS] [9.3 bug] disk space in pg_xlog increases during archive recovery

2013-07-31 Thread MauMau
From: "Fujii Masao" - if (source == XLOG_FROM_ARCHIVE) + if (source == XLOG_FROM_ARCHIVE && + StandbyModeRequested && AllowCascadeReplication()) I think that the condition of StandbyModeRequested should be removed because someone might want to set up the cascade standby from the standby of warm

[HACKERS] PostgreSQL and ASLR on Linux

2013-07-31 Thread Robert Lerche (rlerche)
Hi. Has anyone had experience building PostgreSQL to support Address Space Layout Randomization (ASLR)? I recently took a brute-force approach (compiling everything with -fPIC and specifying -pie on all executables). This worked, but a (very superficial) performance test indicated a high cost

Re: [HACKERS] [BUGS] 9.3beta2: Failure to pg_upgrade

2013-07-31 Thread Alvaro Herrera
Jesse Denardo escribió: > $ 9.2_dev/bin/pg_controldata data > Latest checkpoint's NextMultiXactId: 2982 > Latest checkpoint's NextMultiOffset: 6479 So what's happening here is that the MultiXact 2982 lives in a SLRU page that doesn't exist. pg_upgrade didn't copy the pg_multixact files from t

Re: [HACKERS] Backup throttling

2013-07-31 Thread Antonin Houska
On 07/31/2013 07:13 AM, Gibheer wrote: Hi, That is a really nice feature. I don't pretend it's my idea, I just coded it. My boss proposed the feature as such :-) I took a first look at your patch and some empty lines you added (e.g. line 60 your patch). Can you remove them? Sure, will do in

Re: [HACKERS] Proposal - Support for National Characters functionality

2013-07-31 Thread Tom Lane
Alvaro Herrera writes: > Also, as far as I understand what we want to control here is the > encoding that the strings are in (the mapping of bytes to characters), > not the collation (the way a set of strings are ordered). So it doesn't > make sense to set the NATIONAL CHARACTER option using the

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-07-31 Thread Alvaro Herrera
Greg Stark escribió: > There are two followup changes that were discussed in this thread: > > 1) Changing the WITH_* and NULLS_* tokens to not eat the following > token if it's not used by the grammar so that it doesn't interfere > with syntax like "select nulls first from t as a(nulls)". > I h

Re: [HACKERS] Proposal - Support for National Characters functionality

2013-07-31 Thread Alvaro Herrera
Boguk, Maksym escribió: > I think I give a wrong description there... it will be not GUC but > GUC-type value which will be initialized during CREATE DATABASE and will > be read only after, very similar to the lc_collate. > So I think name national_lc_collate will be better. > Function of this va

Re: [HACKERS] Backup throttling

2013-07-31 Thread Alvaro Herrera
Gibheer escribió: > Why did you move localGetCurrentTimestamp() into streamutil.c? Is > sys/time.h still needed in receivelog.c after the move? I think we should have GetCurrentTimestamp() in src/common; there are way too many copies of that functionality now. I looked into this awhile back, but

[HACKERS] Immediate shutdown causes the assertion failure in 9.4dev

2013-07-31 Thread Fujii Masao
Hi, I encountered the following assertion failure when I executed an immediate shutdown. LOG: received immediate shutdown request WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transac

[HACKERS] WITH ORDINALITY planner improvements

2013-07-31 Thread Greg Stark
On Mon, Jul 29, 2013 at 1:02 PM, Greg Stark wrote: > On Mon, Jul 29, 2013 at 8:56 AM, Craig Ringer wrote: >> Unless LATERAL provides a way to do lock-step iteration through a pair >> (or more) of functions I don't think we can get rid of SRFs [in select >> target lists] yet > > You don't even ne

Re: [HACKERS] (trivial patch) remove superfluous semicolons from pg_dump

2013-07-31 Thread Bruce Momjian
Applied. --- On Thu, Jul 4, 2013 at 12:12:11AM +0900, Ian Lawrence Barwick wrote: > I noticed an instance of 'appendPQExpBuffer(query, ";");' in pg_dump.c which > seems pointless and mildly confusing. There's another seemin

Re: [HACKERS] Review: UNNEST (and other functions) WITH ORDINALITY

2013-07-31 Thread Greg Stark
On Mon, Jul 29, 2013 at 8:45 PM, Josh Berkus wrote: > Because this patch is still being discussed and tinkered with, I have > moved it to 9.4CF2. Fwiw I already committed it. In the end I made only trivial changes the most significant of which was changing the column name to "ordinality". I found

Re: [HACKERS] [9.3 bug] disk space in pg_xlog increases during archive recovery

2013-07-31 Thread Fujii Masao
On Wed, Jul 31, 2013 at 10:43 PM, MauMau wrote: > Hello, Fujii san, all, > > From: "Fujii Masao" >> >> On Sun, Jul 28, 2013 at 7:59 AM, MauMau wrote: >> Do you think this should be fixed? >> >> I think so. >> >>> How should it be fixed? >> >> >> What about removing the restored archived file as

Re: [HACKERS] REGEXP_MATCHES() strange behavior with '^' and '$' pattern

2013-07-31 Thread Tom Lane
Jeevan Chalke writes: > Oops forgot patch. > Attached now. Hmm ... I think the logic change is good, but two demerits for not fixing the adjacent comment. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your su

[HACKERS] Multibyte bug in hba.c regular expression processing

2013-07-31 Thread Tom Lane
It appears to me that check_ident_usermap() will substitute incorrectly for \1 if the user name contains any multibyte characters, because it supposes that the "rm_so" and "rm_eo" numbers returned by pg_regexec() are byte offsets, when in reality they are character offsets. Correct code for this w

Re: [HACKERS] Small comment fix in sinvaladt.c

2013-07-31 Thread Fujii Masao
On Wed, Jul 31, 2013 at 3:51 PM, Hitoshi Harada wrote: > diff --git a/src/backend/storage/ipc/sinvaladt.c > b/src/backend/storage/ipc/sinvaladt.c > index 09f41c1..44d02c5 100644 > --- a/src/backend/storage/ipc/sinvaladt.c > +++ b/src/backend/storage/ipc/sinvaladt.c > @@ -214,7 +214,7 @@ SInvalShme

Re: [HACKERS] [9.3 bug] disk space in pg_xlog increases during archive recovery

2013-07-31 Thread MauMau
Hello, Fujii san, all, From: "Fujii Masao" On Sun, Jul 28, 2013 at 7:59 AM, MauMau wrote: Do you think this should be fixed? I think so. How should it be fixed? What about removing the restored archived file as soon as it's replayed if cascading replication is not enabled (i.e., max_wal_s

Re: [HACKERS] REGEXP_MATCHES() strange behavior with '^' and '$' pattern

2013-07-31 Thread Jeevan Chalke
Oops forgot patch. Attached now. On Wed, Jul 31, 2013 at 6:03 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > Hi, > > While playing with regular expression I found some strange behavior of > regexp_matches() function. > > Consider following sql query and its output: > > postgres=#

[HACKERS] REGEXP_MATCHES() strange behavior with '^' and '$' pattern

2013-07-31 Thread Jeevan Chalke
Hi, While playing with regular expression I found some strange behavior of regexp_matches() function. Consider following sql query and its output: postgres=# select regexp_matches('1' || chr(10) || '2' || chr(10) || '3' || chr(10) || '4', '^', 'mg'); regexp_matches {""} {""}

[HACKERS] Error message for CREATE VIEW is confusing

2013-07-31 Thread Pavel Golub
Hello, PostgreSQL. Let's assume we have created MATERIALIZED VIEW, e.g. CREATE MATERIALIZED VIEW customer_v AS SELECT ; Then one wants to redefine this view as a regular view, e.g. CREATE OR REPLACE VIEW customer_v AS ; Error is rising: ERROR: "customer_v" is not a view ** Err

[HACKERS] Typo fix in bufmgr.c

2013-07-31 Thread Etsuro Fujita
Attached is a small typo fix patch. Thanks, Best regards, Etsuro Fujita typofix-20130731.patch Description: Binary data -- 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] Proposal - Support for National Characters functionality

2013-07-31 Thread Boguk, Maksym
Hi everyone, I will try answer on all questions related to proposed National Characters support. >> 2)Provide support for the new GUC nchar_collation to provide the >> database with information about the default collation that needs to be >> used for the new data types. >A GUC seems like compl