Re: [HACKERS] testing HS/SR - invalid magic number

2010-04-13 Thread Heikki Linnakangas
Erik Rijkers wrote: > This replication test that was working well earlier (it ran daily), stopped > working > after reinstall of new instances of cvs HEAD. I think the change must have > been today (or at least > recent). > ... > -- logfile standby: > ... > 2010-04-14 02:21:11 CEST 5601 start=2

Re: [HACKERS] testing HS/SR - invalid magic number

2010-04-13 Thread Heikki Linnakangas
Erik Rijkers wrote: > On Wed, April 14, 2010 02:34, Erik Rijkers wrote: >> This replication test that was working well earlier (it ran daily), stopped >> working >> after reinstall of new instances of cvs HEAD. I think the change must have >> been today (or at least >> recent). >> >> This test co

[HACKERS] Bug in CREATE FUNCTION with character types if RETURNS TABLE used

2010-04-13 Thread Pavel Golub
Hello. Already sent this to psql-bugs, but noticed one more issue. Since the first issue is critical for me as a developer, the second one confuses my clients (and me a little) ;) PostgreSQL version: 8.4.x Operating system: All == 1 ISSUE = If RETURNS TABLE clause of CREATE FUNCTION

Re: [HACKERS] How to generate specific WAL records?

2010-04-13 Thread Koichi Suzuki
Alvaro-san; Thank you for a great advice. I successfully generated all the WAL records listed below. By deleteing and VACUUMing a table with btree_gist based index, I was successful to generate all the GIST WAL records. Still have the following WAL record to create: CLOG_TRUNCATE XLOG_HEAP_I

Re: [HACKERS] testing HS/SR - invalid magic number

2010-04-13 Thread Erik Rijkers
On Wed, April 14, 2010 02:34, Erik Rijkers wrote: > This replication test that was working well earlier (it ran daily), stopped > working > after reinstall of new instances of cvs HEAD. I think the change must have > been today (or at least > recent). > > This test copies a schema from a 8.4.3 in

[HACKERS] testing HS/SR - invalid magic number

2010-04-13 Thread Erik Rijkers
This replication test that was working well earlier (it ran daily), stopped working after reinstall of new instances of cvs HEAD. I think the change must have been today (or at least recent). This test copies a schema from a 8.4.3 instance to the 9.0 primary: pg_dump -c -h /tmp -p 5432 -n publi

Re: [HACKERS] Remaining Streaming Replication Open Items

2010-04-13 Thread Robert Haas
On Tue, Apr 13, 2010 at 11:49 AM, Heikki Linnakangas wrote: > Robert Haas wrote: >> On Tue, Apr 6, 2010 at 10:36 AM, Heikki Linnakangas >> wrote: >>> Robert Haas wrote: >>     * If standby_mode is enabled, and neither primary_conninfo nor >> restore_command are set, the standby would get

Re: [HACKERS] Autonomous transaction

2010-04-13 Thread Robert Haas
On Tue, Apr 13, 2010 at 8:24 PM, Bruce Momjian wrote: >> I think it would be really useful, though, for users and maybe even >> for system internals.  Working out the semantics is a challenge, but >> not an insurmountable one, I think. > > Yea, it is going to feel like a ship with a leaky hull, so

Re: [HACKERS] Autonomous transaction

2010-04-13 Thread Bruce Momjian
Robert Haas wrote: > On Tue, Apr 13, 2010 at 8:01 PM, Bruce Momjian wrote: > > Yea, having some things in our system be non-transactional is odd and > > hard to understand. ?Just thinking about it, it seems it would introduce > > all sorts of odd behaviors. > > I think it would be really useful,

Re: [HACKERS] Autonomous transaction

2010-04-13 Thread Robert Haas
On Tue, Apr 13, 2010 at 8:01 PM, Bruce Momjian wrote: > Yea, having some things in our system be non-transactional is odd and > hard to understand.  Just thinking about it, it seems it would introduce > all sorts of odd behaviors. I think it would be really useful, though, for users and maybe eve

Re: [HACKERS] Nice hint on table aliasing!

2010-04-13 Thread Bruce Momjian
Josh Berkus wrote: > All, > > Not sure when this happened, but someone added a very informative hint > for the case where you ambiguously refer to a base table name when you > needed to refer to the alias. Nice work, we should do more of this > helpful hinting. I agree. I see this hint was adde

Re: [HACKERS] Autonomous transaction

2010-04-13 Thread Bruce Momjian
p...@thetdh.com wrote: > It would be useful to have a relation such that all dirtied > buffers got written out even for failed transactions (barring > a crash) and such that read-any-undeleted were easy to do, > despite the non-ACIDity. The overhead of a side transaction > seems overkill for s

Re: [HACKERS] How to generate specific WAL records?

2010-04-13 Thread Alvaro Herrera
Koichi Suzuki escribió: > Hi, > > Does anyone know how to generate the following WAL records from psql? > > I'm now fixing pg_lesslog, which I reported a bug. Now code is > almost okay and I'd like to add test tools to show pg_lesslog can > handle all the WAL record correctly. > > XLOG_MULTIXA

Re: [HACKERS] GSoC - proposal - Materialized Views in PostgreSQL

2010-04-13 Thread Tom Lane
Josh Berkus writes: > There are basically 2 major parts for materialized views: > A) Planner: Getting the query planner to swap in the MatView for part of > a query automatically for query plan portions which the MatView supports; > B) Maintenance: maintaining the MatView data according to the p

Re: [HACKERS] a faster compression algorithm for pg_dump

2010-04-13 Thread Tom Lane
Joachim Wieland writes: > If we still cannot do this, then what I am asking is: What does the > project need to be able to at least link against such a compression > algorithm? Well, what we *really* need is a convincing argument that it's worth taking some risk for. I find that not obvious. Yo

Re: [HACKERS] Timezone matching script (win32)

2010-04-13 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Magnus Hagander wrote: > >> This script should probably live in CVS, and be run when Microsoft > >> releases new timezone data. Where should I put it - src/timezone or > >> somewhere in src/tools? (it does read pgtz.c in the current directory, > >> but

Re: [HACKERS] testing HS/SR - 1 vs 2 performance

2010-04-13 Thread Heikki Linnakangas
Heikki Linnakangas wrote: > I could reproduce this on my laptop, standby is about 20% slower. I ran > oprofile, and what stands out as the difference between the master and > standby is that on standby about 20% of the CPU time is spent in > hash_seq_search(). The callpath is GetSnapshotDat() -> >

Re: [HACKERS] Timezone matching script (win32)

2010-04-13 Thread Tom Lane
Alvaro Herrera writes: > Magnus Hagander wrote: >> This script should probably live in CVS, and be run when Microsoft >> releases new timezone data. Where should I put it - src/timezone or >> somewhere in src/tools? (it does read pgtz.c in the current directory, >> but it doesn't actually edit the

Re: [HACKERS] Timezone matching script (win32)

2010-04-13 Thread Alvaro Herrera
Magnus Hagander wrote: > Before I did that I wrote a small perlscript that reads pgtz.c and > compares what's there to what's in the registry of the current > machine. Turns out I had missed one, which is Argentina Standard Time. > > This script should probably live in CVS, and be run when Micros

Re: [HACKERS] Naming of new EXCLUDE constraints

2010-04-13 Thread Alvaro Herrera
Tom Lane escribió: > Robert Haas writes: > > On Mon, Apr 12, 2010 at 11:03 PM, Bruce Momjian wrote: > >> Fine, then we will just have to live with "exclusion constraints" and > >> "contraint exclusion". > > > I am not necessarily 100% averse to changing it... just saying that it > > shouldn't be

Re: [HACKERS] testing hot standby

2010-04-13 Thread Jaime Casanova
On Tue, Apr 13, 2010 at 11:06 AM, Heikki Linnakangas wrote: > Jaime Casanova wrote: >> >> i will read it on the morning and the thread where it is, something >> that seems strange to me is that the patch touch twophase.c and >> twophase.h, why? > > When you start hot standby from an online checkpo

Re: [HACKERS] testing hot standby

2010-04-13 Thread Heikki Linnakangas
Jaime Casanova wrote: > On Mon, Apr 12, 2010 at 8:32 PM, Fujii Masao wrote: >> But when I did one more restart of the primary and standby, I was >> able to observe the problem. If this is the same as you encountered, >> it would be the "can't start hot standby from a shutdown checkpoint" >> issue

Re: [HACKERS] Streaming replication and a disk full in primary

2010-04-13 Thread Heikki Linnakangas
Robert Haas wrote: > On Mon, Apr 12, 2010 at 6:41 AM, Heikki Linnakangas > wrote: >>> Why is standby_keep_segments used even if max_wal_senders is zero? >>> In that case, ISTM we don't need to keep any WAL files in pg_xlog >>> for the standby. >> True. I don't think we should second guess the admi

Re: [HACKERS] Remaining Streaming Replication Open Items

2010-04-13 Thread Heikki Linnakangas
Robert Haas wrote: > On Tue, Apr 6, 2010 at 10:36 AM, Heikki Linnakangas > wrote: >> Robert Haas wrote: > * If standby_mode is enabled, and neither primary_conninfo nor > restore_command are set, the standby would get stuck. It's not really stuck, it will replay any WAL files you

[HACKERS] hash indexes and HS was:(Re: [HACKERS] testing hot standby)

2010-04-13 Thread Jaime Casanova
On Mon, Apr 12, 2010 at 1:23 AM, Jaime Casanova wrote: > > another point, what happened with this: > http://archives.postgresql.org/message-id/1229549172.4793.105.ca...@ebony.2ndquadrant? > Obviously we still have the problem with hash indexes, and in that > thread Tom advice was just to document

Re: [HACKERS] Hot Standby: Startup at shutdown checkpoint

2010-04-13 Thread Heikki Linnakangas
Simon Riggs wrote: > On Thu, 2010-04-08 at 19:02 +0300, Heikki Linnakangas wrote: >> Simon Riggs wrote: >>> OK, that seems better. I'm happy with that instead. >>> >>> Have you tested this? Is it ready to commit? >> Only very briefly. I think the code is ready, but please review and test >> to see

Re: pending patch: Re: [HACKERS] HS/SR and smart shutdown

2010-04-13 Thread Fujii Masao
On Tue, Apr 13, 2010 at 10:27 PM, Robert Haas wrote: > Can you explain how to recreate the problem that this patch fixes? 1. Configure and start the primary server. 2. Configure the standby server. 3. Remove all of the WAL files in pg_xlog of the standby. 4. Start the standby. 5. Request smart sh

Re: pending patch: Re: [HACKERS] HS/SR and smart shutdown

2010-04-13 Thread Robert Haas
On Tue, Apr 13, 2010 at 9:18 AM, Fujii Masao wrote: > On Thu, Apr 1, 2010 at 8:24 PM, Robert Haas wrote: >> On Thu, Apr 1, 2010 at 7:18 AM, Simon Riggs wrote: >>> I'm not willing to investigate this further myself at this stage. This >>> looks like risk for little benefit. >> >> That's kind of w

Re: pending patch: Re: [HACKERS] HS/SR and smart shutdown

2010-04-13 Thread Fujii Masao
On Thu, Apr 1, 2010 at 8:24 PM, Robert Haas wrote: > On Thu, Apr 1, 2010 at 7:18 AM, Simon Riggs wrote: >> I'm not willing to investigate this further myself at this stage. This >> looks like risk for little benefit. > > That's kind of what I figured.  I'll see about fixing up Fujii-san's > patch

Re: [HACKERS] initdb failing for chinese locale on windows machine

2010-04-13 Thread Dave Page
On Tue, Apr 13, 2010 at 1:50 PM, Chetan Suttraway wrote: > > > On Tue, Apr 13, 2010 at 6:08 PM, Magnus Hagander > wrote: >> >> On Tue, Apr 13, 2010 at 14:25, Chetan Suttraway >> wrote: >> > Hi, >> > >> > I am trying to install postgres 8.4.3.1 on windows  machine which has >> > chinese locale. >

Re: [HACKERS] initdb failing for chinese locale on windows machine

2010-04-13 Thread Chetan Suttraway
On Tue, Apr 13, 2010 at 6:08 PM, Magnus Hagander wrote: > On Tue, Apr 13, 2010 at 14:25, Chetan Suttraway > wrote: > > Hi, > > > > I am trying to install postgres 8.4.3.1 on windows machine which has > > chinese locale. > > The install wizard throws warning message and continues. > > However the

Re: [HACKERS] initdb failing for chinese locale on windows machine

2010-04-13 Thread Magnus Hagander
On Tue, Apr 13, 2010 at 14:25, Chetan Suttraway wrote: > Hi, > > I am trying to install postgres 8.4.3.1 on windows  machine which has > chinese locale. > The install wizard throws warning message and continues. > However the logs show that initdb failed and so the service was not started. > > Hav

[HACKERS] Timezone matching script (win32)

2010-04-13 Thread Magnus Hagander
I'm breaking this out to a separate email thread, since i think the original question may hvae been lost in the "I've applied this patch" part that made people ignore it at the end of a long thread ;) There are usually people who have thoughts about this kind of thing :-) So, thoughts/suggestions o

[HACKERS] How to generate specific WAL records?

2010-04-13 Thread Koichi Suzuki
Hi, Does anyone know how to generate the following WAL records from psql? I'm now fixing pg_lesslog, which I reported a bug. Now code is almost okay and I'd like to add test tools to show pg_lesslog can handle all the WAL record correctly. XLOG_MULTIXACT_ZERO_OFF_PAGE XLOG_MULTIXACT_ZERO_MEM_P

Re: [HACKERS] debugger question

2010-04-13 Thread Tom Lane
"Murali M. Krishna" writes: > I would like to start using gdb. > ... > , but this is what I get. > gdb) attach 1731 > Attaching to program: /usr/local/pgsql/bin/postgres, process 1731 > ptrace: Operation not permitted. Try running gdb as the postgres user, ie, su to postgres first. If that doesn