Re: [HACKERS] pg_basebackup --xlog compatibility break

2012-06-04 Thread Peter Eisentraut
On tis, 2012-05-29 at 22:31 +0200, Magnus Hagander wrote: Yeah, good arguments all around, i agree too :-) Next question is - suggestions for naming of said paramter? --xlog-method=something? And/or -Xsomething, which would automatically enable -x? -- Sent via pgsql-hackers mailing list

[HACKERS] How to avoid base backup in automated failover

2012-06-04 Thread chinnaobi
Hi all, Recently I was writing an application to implement automated failover with env: Two 2008 R2 servers, Network area storage, asynchronous replication, WAL archive on primary enabled. Is there any way to avoid starting standby server always from base backup in automated failover. I see the

Re: [HACKERS] 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile

2012-06-04 Thread Robert Haas
On Fri, Jun 1, 2012 at 9:55 PM, Ants Aasma a...@cybertec.at wrote: On Sat, Jun 2, 2012 at 1:48 AM, Merlin Moncure mmonc...@gmail.com wrote: Buffer pins aren't a cache: with a cache you are trying to mask a slow operation (like a disk i/o) with a faster such that the amount of slow operations

Re: [HACKERS] Re: [GENERAL] pg_upgrade from 9.0.7 to 9.1.3: duplicate key pg_authid_oid_index

2012-06-04 Thread Bruce Momjian
On Sat, Jun 02, 2012 at 05:10:03PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Fri, Jun 01, 2012 at 09:52:59AM -0400, Tom Lane wrote: It seems that pg_upgrade needs a check to make sure that the bootstrap superuser is named the same in old and new clusters. The

Re: [HACKERS] 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile

2012-06-04 Thread Ants Aasma
On Mon, Jun 4, 2012 at 5:12 PM, Robert Haas robertmh...@gmail.com wrote: Note sure about the rest of this patch, but this part is definitely bogus: +#if !defined(pg_atomic_fetch_and_set) +#define pg_atomic_fetch_and_set(dst, src, value) \ +       do { S_LOCK(dummy_spinlock); \ +       dst =

Re: [HACKERS] Updated version of pg_receivexlog

2012-06-04 Thread Ants Aasma
On Thu, Sep 29, 2011 at 11:30 PM, Magnus Hagander mag...@hagander.net wrote: it doesn't say that is not possible to use this for a standby server... probably that's why i get the error i put a recovery.conf after pg_basebackup finished... maybe we can say that  more loudly? The idea is, if

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Robert Haas
On Sat, Jun 2, 2012 at 12:58 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: 2012/6/1 Robert Haas robertmh...@gmail.com: On Thu, May 31, 2012 at 3:52 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: It may be an option to separate the case into two; a situation to execute the given query immediately

Re: [HACKERS] 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile

2012-06-04 Thread Merlin Moncure
On Mon, Jun 4, 2012 at 9:20 AM, Ants Aasma a...@cybertec.at wrote: On Mon, Jun 4, 2012 at 5:12 PM, Robert Haas robertmh...@gmail.com wrote: Note sure about the rest of this patch, but this part is definitely bogus: +#if !defined(pg_atomic_fetch_and_set) +#define pg_atomic_fetch_and_set(dst,

Re: [HACKERS] Updated version of pg_receivexlog

2012-06-04 Thread Fujii Masao
On Mon, Jun 4, 2012 at 11:25 PM, Ants Aasma a...@cybertec.at wrote: On Thu, Sep 29, 2011 at 11:30 PM, Magnus Hagander mag...@hagander.net wrote: it doesn't say that is not possible to use this for a standby server... probably that's why i get the error i put a recovery.conf after pg_basebackup

Re: [HACKERS] 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile

2012-06-04 Thread Merlin Moncure
On Mon, Jun 4, 2012 at 10:17 AM, Merlin Moncure mmonc...@gmail.com wrote: What happens (in the very unlikely, but possible case?) if another backend races to the buffer you've pointed at with 'victim'?  It looks like multiple backends share the clock sweep now, but don't you need to need an

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Kohei KaiGai
2012/6/4 Robert Haas robertmh...@gmail.com: On Sat, Jun 2, 2012 at 12:58 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: 2012/6/1 Robert Haas robertmh...@gmail.com: On Thu, May 31, 2012 at 3:52 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: It may be an option to separate the case into two; a

Re: [HACKERS] 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile

2012-06-04 Thread Ants Aasma
On Mon, Jun 4, 2012 at 6:38 PM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Jun 4, 2012 at 10:17 AM, Merlin Moncure mmonc...@gmail.com wrote: What happens (in the very unlikely, but possible case?) if another backend races to the buffer you've pointed at with 'victim'?  It looks like

Re: [HACKERS] Updated version of pg_receivexlog

2012-06-04 Thread Ants Aasma
On Mon, Jun 4, 2012 at 6:20 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Jun 4, 2012 at 11:25 PM, Ants Aasma a...@cybertec.at wrote: On Thu, Sep 29, 2011 at 11:30 PM, Magnus Hagander mag...@hagander.net wrote: it doesn't say that is not possible to use this for a standby server...

Re: [HACKERS] Updated version of pg_receivexlog

2012-06-04 Thread Magnus Hagander
On Mon, Jun 4, 2012 at 5:48 PM, Ants Aasma a...@cybertec.at wrote: On Mon, Jun 4, 2012 at 6:20 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Jun 4, 2012 at 11:25 PM, Ants Aasma a...@cybertec.at wrote: On Thu, Sep 29, 2011 at 11:30 PM, Magnus Hagander mag...@hagander.net wrote: it

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Florian Pflug
On Jun4, 2012, at 17:38 , Kohei KaiGai wrote: I'm worry about future maintenance issues, once we have RLSBYPASS permission or something user visible… I fear that without a generic way to disable RLS regardless which RLS policy function is in effect, we're creating a huge maintenance issue for

Re: [HACKERS] Updated version of pg_receivexlog

2012-06-04 Thread Ants Aasma
On Mon, Jun 4, 2012 at 6:53 PM, Magnus Hagander mag...@hagander.net wrote: No, it's more a there's no reason to do that. I don't think it should necessarily be an actual problem. Ok, good to know. In your case the missing piece of information is why was there a timeline switch? pg_basebackup

[HACKERS] Btree or not btree? That is the question

2012-06-04 Thread Greg Sabino Mullane
We have a 8.3.18 system (yes, the same one from the previous thread, finally upgraded!) that gave us this error yesterday: ERROR: index pg_class_oid_index is not a btree It seems like this happened from just a normal SELECT query, and did not occur again (and this is a very busy system) The

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Kohei KaiGai
2012/6/4 Florian Pflug f...@phlo.org: On Jun4, 2012, at 17:38 , Kohei KaiGai wrote: I'm worry about future maintenance issues, once we have RLSBYPASS permission or something user visible… I fear that without a generic way to disable RLS regardless which RLS policy function is in effect,

Re: [HACKERS] 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile

2012-06-04 Thread Merlin Moncure
On Mon, Jun 4, 2012 at 10:42 AM, Ants Aasma a...@cybertec.at wrote: On Mon, Jun 4, 2012 at 6:38 PM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Jun 4, 2012 at 10:17 AM, Merlin Moncure mmonc...@gmail.com wrote: What happens (in the very unlikely, but possible case?) if another backend

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Tom Lane
Kohei KaiGai kai...@kaigai.gr.jp writes: Here is two problems around RLSBYPASS. The first is we have no idea to handle invalidation of prepared-statement when current user is switched, right now. How is that specifically the fault of RLSBYPASS? *Any* of the schemes you're proposing for

Re: [HACKERS] Btree or not btree? That is the question

2012-06-04 Thread Tom Lane
Greg Sabino Mullane g...@endpoint.com writes: We have a 8.3.18 system (yes, the same one from the previous thread, finally upgraded!) that gave us this error yesterday: ERROR: index pg_class_oid_index is not a btree That means you got bogus data while reading the metapage. I'm beginning to

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Kohei KaiGai
2012/6/4 Tom Lane t...@sss.pgh.pa.us: Kohei KaiGai kai...@kaigai.gr.jp writes: Here is two problems around RLSBYPASS. The first is we have no idea to handle invalidation of prepared-statement when current user is switched, right now. How is that specifically the fault of RLSBYPASS?  *Any* of

Re: [HACKERS] Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers.

2012-06-04 Thread Christopher Browne
On Sat, Jun 2, 2012 at 12:01 PM, Michael Nolan htf...@gmail.com wrote: On 6/2/12, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On the other hand, if we simply say PostgreSQL computes the replication delay by subtracting the time at which the WAL was generated,

Re: [HACKERS] VIP: new format for psql - shell - simple using psql in shell

2012-06-04 Thread Jim Nasby
On 5/26/12 10:16 PM, Pavel Stehule wrote: My idea is secure to separator - because separator is just space and new line and these symbols are escaped. ISTM it'd be a really good idea to support something other than space, since presumably that'd be trivial. I'm not a fan of supporting the

Re: [HACKERS] No, pg_size_pretty(numeric) was not such a hot idea

2012-06-04 Thread Jim Nasby
On 5/27/12 2:54 PM, Euler Taveira wrote: On 27-05-2012 10:45, Fujii Masao wrote: OK, let me propose another approach: add pg_size_pretty(int). If we do this, all usability and performance problems will be solved. I wouldn't like to add another function but if it solves both problems... +1.

Re: [HACKERS] Bug in new buffering GiST build code

2012-06-04 Thread Alexander Korotkov
On Mon, May 28, 2012 at 1:46 AM, Alexander Korotkov aekorot...@gmail.comwrote: On Sat, May 26, 2012 at 12:33 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Alexander, do you still have the test environments and data lying around that you used for GiST buffering testing

Re: [HACKERS] No, pg_size_pretty(numeric) was not such a hot idea

2012-06-04 Thread Tom Lane
Jim Nasby j...@nasby.net writes: On 5/27/12 2:54 PM, Euler Taveira wrote: On 27-05-2012 10:45, Fujii Masao wrote: OK, let me propose another approach: add pg_size_pretty(int). I wouldn't like to add another function but if it solves both problems... +1. FWIW, I would argue that the case of

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Florian Pflug
On Jun4, 2012, at 18:38 , Kohei KaiGai wrote: 2012/6/4 Florian Pflug f...@phlo.org: Without something like RLSBYPASS, the DBA needs to have intimate knowledge about the different RLS policies to e.g. guarantee that his backups aren't missing crucial information, or that the replication system

Re: [HACKERS] [RFC] Interface of Row Level Security

2012-06-04 Thread Tom Lane
Florian Pflug f...@phlo.org writes: On Jun4, 2012, at 18:38 , Kohei KaiGai wrote: 2012/6/4 Florian Pflug f...@phlo.org: Without something like RLSBYPASS, the DBA needs to have intimate knowledge about the different RLS policies to e.g. guarantee that his backups aren't missing crucial

[HACKERS] 9.3: load path to mitigate load penalty for checksums

2012-06-04 Thread Jeff Davis
Introduction: = A lot of progress has been made on the checksums issue, with Simon's excellent work beginning to gain consensus: http://archives.postgresql.org/message-id/CA +u5nmkw_gbs6qq_y8-rjgl1v7mvw2hwbhartb8lojhnpfx...@mail.gmail.com For the purposes of this