Re: [HACKERS] PostgreSQL Service on Windows does not start. ~ "is not a valid Win32 application"

2013-11-09 Thread Amit Kapila
Hi Naoya, On Thu, Oct 31, 2013 at 5:42 PM, Robert Haas wrote: > On Thu, Oct 31, 2013 at 1:44 AM, Asif Naeem wrote: >> On Thu, Oct 31, 2013 at 10:17 AM, Amit Kapila >> wrote: >>> >>> On Tue, Oct 29, 2013 at 12:46 PM, Naoya Anzai >>> wrote: >>> > Hi Sandeep >>> > >>> >> I think, you should chang

Re: [HACKERS] ERROR during end-of-xact/FATAL

2013-11-09 Thread Amit Kapila
On Sat, Nov 9, 2013 at 2:43 AM, Noah Misch wrote: > On Wed, Nov 06, 2013 at 10:14:53AM +0530, Amit Kapila wrote: >> On Thu, Oct 31, 2013 at 8:22 PM, Noah Misch wrote: >> About unclean FATAL-then-ERROR scenario, one way to deal at high level >> could be to treat such a case as backend crash in whi

Re: [HACKERS] patch to fix unused variable warning on windows build

2013-11-09 Thread Amit Kapila
On Sat, Nov 9, 2013 at 1:00 PM, David Rowley wrote: > On Sat, Nov 9, 2013 at 7:29 PM, Amit Kapila wrote: >> > Thanks for the link. > The reason that we don't see more warnings for this is that it seems in all > other places where we have used PG_USED_FOR_ASSERTS_ONLY, the variable is > getting as

Re: [HACKERS] logical changeset generation v6.5

2013-11-09 Thread Steve Singer
On 11/09/2013 05:42 PM, Andres Freund wrote: On 2013-11-09 17:36:49 -0500, Steve Singer wrote: On 11/05/2013 10:21 AM, Andres Freund wrote: Hi, Attached to this mail and in the xlog-decoding-rebasing-remapping branch in my git[1] repository you can find the next version of the patchset that: *

[HACKERS] Re: "Fix pg_isolation_regress to work outside its build directory" compiler warning

2013-11-09 Thread Robert Haas
On Sat, Nov 9, 2013 at 12:45 AM, David Rowley wrote: > Commit 9b4d52f2095be96ca238ce41f6963ec56376491f introduced a new compiler > warning to the windows visual studios build > > "D:\Postgres\b\pgsql.sln" (default target) (1) -> > "D:\Postgres\b\pg_regress_ecpg.vcxproj" (default target) (88) -> >

Re: [HACKERS] Comment - uniqueness of relfilenode

2013-11-09 Thread Robert Haas
On Thu, Nov 7, 2013 at 10:56 AM, Antonin Houska wrote: > catalog/catalog.c:GetNewRelFileNode() and its calls indicate that the > following change makes sense: > > > diff --git a/src/include/storage/relfilenode.h > b/src/include/storage/relfilenode.h > index 75f897f..7190974 100644 > --- a/src/incl

Re: [HACKERS] Race condition in b-tree page deletion

2013-11-09 Thread Robert Haas
On Sat, Nov 9, 2013 at 12:40 PM, Heikki Linnakangas wrote: > On 09.11.2013 19:18, Heikki Linnakangas wrote: >> On 09.11.2013 18:49, Heikki Linnakangas wrote: >>> We could just punt if more than X pages would need to be changed. That >>> would mean that we never delete pages at the top (h - X) leve

Re: [HACKERS] Fw: [COMMITTERS] pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value

2013-11-09 Thread Kevin Grittner
Kevin Grittner wrote: >> I distilled it down to the simplest case I could find which >> failed to produce the warning; attached. Do you agree that it is >> a compiler bug that this generates no warning? >> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith >> -Wdeclaration-after-statement -Wendi

Re: [HACKERS] logical changeset generation v6.5

2013-11-09 Thread Andres Freund
On 2013-11-09 17:36:49 -0500, Steve Singer wrote: > On 11/05/2013 10:21 AM, Andres Freund wrote: > >Hi, > > > >Attached to this mail and in the xlog-decoding-rebasing-remapping branch > >in my git[1] repository you can find the next version of the patchset that: > >* Fixes full table rewrites of ca

Re: [HACKERS] logical changeset generation v6.5

2013-11-09 Thread Steve Singer
On 11/05/2013 10:21 AM, Andres Freund wrote: Hi, Attached to this mail and in the xlog-decoding-rebasing-remapping branch in my git[1] repository you can find the next version of the patchset that: * Fixes full table rewrites of catalog tables using the method Robert prefers (which is to log

Re: [HACKERS] Fw: [COMMITTERS] pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value

2013-11-09 Thread Kevin Grittner
Kevin Grittner wrote: >>  int warning_test(int a); >>  int warning_test(int a) >>  { >>  int result; >> >>  if (a == 1) >>  result = 1; >> >>  return result; >>  } I had to file separate bug reports for gcc and clang.  I have already gotten a response on the clang bug report

[HACKERS] Fw: [COMMITTERS] pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value

2013-11-09 Thread Kevin Grittner
Forwarded to -hackers - Forwarded Message - > From: Kevin Grittner > To: Kevin Grittner ; Tom Lane > Cc: "pgsql-committ...@postgresql.org" > Sent: Friday, November 8, 2013 4:33 PM > Subject: Re: [COMMITTERS] pgsql: Fix blatantly broken record_image_cmp() > logic for pass-by-value >

[HACKERS] Fw: [COMMITTERS] pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value

2013-11-09 Thread Kevin Grittner
Forwarding to -hackers. - Forwarded Message - > From: Kevin Grittner > To: Tom Lane > Cc: "pgsql-committ...@postgresql.org" > Sent: Friday, November 8, 2013 3:19 PM > Subject: Re: [COMMITTERS] pgsql: Fix blatantly broken record_image_cmp() > logic for pass-by-value > > Tom Lane wro

Re: [HACKERS] UTF8 national character data type support WIP patch and list of open issues.

2013-11-09 Thread Albe Laurenz
MauMau wrote: > Let me repeat myself: I think the biggest and immediate issue is that > PostgreSQL does not support national character types at least officially. > "Officially" means the description in the manual. So I don't have strong > objection against the current (hidden) implementation of nc

Re: [HACKERS] Suggestion: Issue warning when calling SET TRANSACTION outside transaction block

2013-11-09 Thread Robert Haas
On Fri, Nov 8, 2013 at 5:36 PM, Tom Lane wrote: > [ I'm so far behind ... ] > > Bruce Momjian writes: >> Applied. Thank you for all your suggestions. > > I thought the suggestion had been to issue a *warning*. How did that > become an error? This patch seems likely to break applications that >

Re: [HACKERS] Race condition in b-tree page deletion

2013-11-09 Thread Heikki Linnakangas
On 09.11.2013 19:18, Heikki Linnakangas wrote: On 09.11.2013 18:49, Heikki Linnakangas wrote: We could just punt if more than X pages would need to be changed. That would mean that we never delete pages at the top (h - X) levels of the tree. In practice that should be fine if X is high enough. A

Re: [HACKERS] Race condition in b-tree page deletion

2013-11-09 Thread Heikki Linnakangas
On 09.11.2013 18:49, Heikki Linnakangas wrote: We could just punt if more than X pages would need to be changed. That would mean that we never delete pages at the top (h - X) levels of the tree. In practice that should be fine if X is high enough. As a data point, GIN list page deletion holds 16

Re: [HACKERS] Race condition in b-tree page deletion

2013-11-09 Thread Heikki Linnakangas
On 09.11.2013 18:24, Tom Lane wrote: Heikki Linnakangas writes: 2. The second-simplest solution I see is to keep locked the whole chain of pages that will be deleted, and delete all of them as one atomic WAL-logged operation. Ie. the leaf page, and all the parent pages above it that will become

Re: [HACKERS] Race condition in b-tree page deletion

2013-11-09 Thread Tom Lane
Heikki Linnakangas writes: > 2. The second-simplest solution I see is to keep locked the whole chain > of pages that will be deleted, and delete all of them as one atomic > WAL-logged operation. Ie. the leaf page, and all the parent pages above > it that will become half-dead, and the parent of

[HACKERS] Race condition in b-tree page deletion

2013-11-09 Thread Heikki Linnakangas
The B-tree page deletion algorithm has a race condition. We don't allow a page to be deleted if it's the rightmost child of its parent, but that situation can change after we check for it. Problem --- We check that the page to be deleted is not the rightmost child of its parent, and then

Re: [HACKERS] Row-security writer-side checks proposal

2013-11-09 Thread Craig Ringer
On 11/08/2013 11:03 PM, Robert Haas wrote: >> > Separate "READ DELETE" etc would only be interesting if we wanted to let >> > someone DELETE rows they cannot SELECT. Since we have DELETE ... >> > RETURNING, and since users can write a predicate function for DELETE >> > that leaks the information ev

Re: [HACKERS] logical changeset generation v6.5

2013-11-09 Thread Andres Freund
On 2013-11-08 17:11:58 -0500, Peter Eisentraut wrote: > On 11/8/13, 3:03 PM, Robert Haas wrote: > > On Fri, Nov 8, 2013 at 12:38 PM, Robert Haas wrote: > >> On Tue, Nov 5, 2013 at 10:21 AM, Andres Freund > >> wrote: > >>> Attached to this mail and in the xlog-decoding-rebasing-remapping branch >

[HACKERS] Postgresql c function returning one row with 2 fileds

2013-11-09 Thread lucamarletta
I'm new in postgresql c function and I start following examples. I want to write a simple function that have inside an SQL and passing parameter evaluete anbd return 2 fields as sum (for now to be simpler). The function below has problem passing the check (get_call_result_type(fcinfo, &resultTyp