Re: [HACKERS] Unnecessary WAL archiving after failover

2012-06-05 Thread Noah Misch
On Fri, Mar 23, 2012 at 11:03:27PM +0900, Fujii Masao wrote: On Wed, Feb 29, 2012 at 5:48 AM, Fujii Masao masao.fu...@gmail.com wrote: In streaming replication, after failover, new master might have lots of un-applied WAL files with old timeline ID. They are the WAL files which were

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

2012-06-05 Thread Alexander Korotkov
On Tue, Jun 5, 2012 at 2:00 AM, Alexander Korotkov aekorot...@gmail.comwrote: 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

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

2012-06-05 Thread Heikki Linnakangas
On 05.06.2012 09:45, Alexander Korotkov wrote: On Tue, Jun 5, 2012 at 2:00 AM, Alexander Korotkovaekorot...@gmail.comwrote: On Mon, May 28, 2012 at 1:46 AM, Alexander Korotkovaekorot...@gmail.comwrote: On Sat, May 26, 2012 at 12:33 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com

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

2012-06-05 Thread Kohei KaiGai
2012/6/5 Tom Lane t...@sss.pgh.pa.us: 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

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-06-05 Thread Magnus Hagander
On Fri, May 25, 2012 at 7:56 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, May 24, 2012 at 4:52 AM, Magnus Hagander mag...@hagander.net wrote: On Wed, May 23, 2012 at 8:11 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, May 22, 2012 at 11:04 PM, Robert Haas robertmh...@gmail.com

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

2012-06-05 Thread Florian Pflug
On Jun5, 2012, at 10:22 , Kohei KaiGai wrote: 2012/6/5 Tom Lane t...@sss.pgh.pa.us: I suspect that KaiGai-san's objection basically comes down to not wanting to have what amounts to a backdoor in RLS policies. However, what Florian is saying is that you have to have a backdoor anyway, unless

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

2012-06-05 Thread Kohei KaiGai
2012/6/5 Florian Pflug f...@phlo.org: On Jun5, 2012, at 10:22 , Kohei KaiGai wrote: 2012/6/5 Tom Lane t...@sss.pgh.pa.us: I suspect that KaiGai-san's objection basically comes down to not wanting to have what amounts to a backdoor in RLS policies.  However, what Florian is saying is that you

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

2012-06-05 Thread Magnus Hagander
On Tue, Jun 5, 2012 at 1:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: 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

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

2012-06-05 Thread Florian Pflug
On Jun5, 2012, at 11:43 , Kohei KaiGai wrote: 2012/6/5 Florian Pflug f...@phlo.org: What's to be gained by that? Once there's *any* way to bypass a RLS policy, you'll have to deal with the plan invalidation issues you mentioned anyway. ISTM that complexity-wide, you don't save much by not

[HACKERS] pg_receivexlog and feedback message

2012-06-05 Thread Magnus Hagander
Right now, pg_receivexlog sets: replymsg-write = InvalidXLogRecPtr; replymsg-flush = InvalidXLogRecPtr; replymsg-apply = InvalidXLogRecPtr; when it sends it's status updates. I'm thinking it sohuld set replymsg-write =

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

2012-06-05 Thread Kohei KaiGai
2012/6/5 Florian Pflug f...@phlo.org: On Jun5, 2012, at 11:43 , Kohei KaiGai wrote: 2012/6/5 Florian Pflug f...@phlo.org: What's to be gained by that? Once there's *any* way to bypass a RLS policy, you'll have to deal with the plan invalidation issues you mentioned anyway. ISTM that

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

2012-06-05 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Jun 5, 2012 at 1:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: Assuming that's how 9.2 ships, we might as well wait to see if there are any real complaints from the field before we decide whether any changing is needed. We could add it to the

[HACKERS] page is not marked all-visible warning in regression tests

2012-06-05 Thread Tom Lane
I got this last night in a perfectly standard build of HEAD: *** /home/tgl/pgsql/src/test/regress/expected/sanity_check.out Thu Jan 12 14:06:14 2012 --- /home/tgl/pgsql/src/test/regress/results/sanity_check.out Mon Jun 4 20:28:39 2012 *** *** 1,4 --- 1,5 VACUUM; +

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-06-05 Thread Fujii Masao
On Tue, Jun 5, 2012 at 5:32 PM, Magnus Hagander mag...@hagander.net wrote: It contains a number of unrelated changes of %m - %s - what's the motivation for those? %m in fprintf() is glibc extension according to man page, so it's not portable and should not be used, I think. We discussed this

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-06-05 Thread Magnus Hagander
On Tue, Jun 5, 2012 at 3:36 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 5, 2012 at 5:32 PM, Magnus Hagander mag...@hagander.net wrote: It contains a number of unrelated changes of %m - %s - what's the motivation for those? %m in fprintf() is glibc extension according to man page,

[HACKERS] Backup docs

2012-06-05 Thread Magnus Hagander
In reference to: http://www.postgresql.org/docs/devel/static/continuous-archiving.html I would like to see that page changed to list pg_basebackup as the default way of doing base backups, and then list the manual way as an option if you need more flexibility. The reason being that for the

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-06-05 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Jun 5, 2012 at 3:36 PM, Fujii Masao masao.fu...@gmail.com wrote: We discussed this before and reached consensus not to use %m :) http://archives.postgresql.org/pgsql-hackers/2011-01/msg01674.php :-) there goes my memory. That said, we're

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

2012-06-05 Thread Fujii Masao
On Tue, Jun 5, 2012 at 8:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: 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

Re: [HACKERS] Backup docs

2012-06-05 Thread Simon Riggs
On 5 June 2012 14:43, Magnus Hagander mag...@hagander.net wrote: In reference to: http://www.postgresql.org/docs/devel/static/continuous-archiving.html I would like to see that page changed to list pg_basebackup as the default way of doing base backups, and then list the manual way as an

Re: [HACKERS] page is not marked all-visible warning in regression tests

2012-06-05 Thread Andres Freund
On Tuesday, June 05, 2012 03:32:08 PM Tom Lane wrote: I got this last night in a perfectly standard build of HEAD: *** /home/tgl/pgsql/src/test/regress/expected/sanity_check.outThu Jan 12 14:06:14 2012 --- /home/tgl/pgsql/src/test/regress/results/sanity_check.out Mon Jun 4

[HACKERS] Time for pgindent run?

2012-06-05 Thread Bruce Momjian
Is everyone ready for me to run pgindent? We are nearing the first commit-fest (June 15) and will have to branch the git tree soon. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for

Re: [HACKERS] page is not marked all-visible warning in regression tests

2012-06-05 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On Tuesday, June 05, 2012 03:32:08 PM Tom Lane wrote: I got this last night in a perfectly standard build of HEAD: + WARNING: page is not marked all-visible but visibility map bit is set in relation pg_db_role_setting page 0 -- I have seen that

Re: [HACKERS] Time for pgindent run?

2012-06-05 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Is everyone ready for me to run pgindent? We are nearing the first commit-fest (June 15) and will have to branch the git tree soon. Also, we should do the pgindent run well before the commitfest, so that authors of pending patches have time to rebase

Re: [HACKERS] Time for pgindent run?

2012-06-05 Thread Bruce Momjian
On Tue, Jun 05, 2012 at 10:21:14AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Is everyone ready for me to run pgindent? We are nearing the first commit-fest (June 15) and will have to branch the git tree soon. Also, we should do the pgindent run well before the

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-06-05 Thread Fujii Masao
On Tue, Jun 5, 2012 at 10:39 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jun 5, 2012 at 3:36 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 5, 2012 at 5:32 PM, Magnus Hagander mag...@hagander.net wrote: You also removed the safeguard of always sleeping at least 1 second -

Re: [HACKERS] pg_receivexlog and feedback message

2012-06-05 Thread Fujii Masao
On Tue, Jun 5, 2012 at 9:53 PM, Magnus Hagander mag...@hagander.net wrote: Right now, pg_receivexlog sets:                        replymsg-write = InvalidXLogRecPtr;                        replymsg-flush = InvalidXLogRecPtr;                        replymsg-apply = InvalidXLogRecPtr; when it

Re: [HACKERS] incorrect handling of the timeout in pg_receivexlog

2012-06-05 Thread Magnus Hagander
On Tue, Jun 5, 2012 at 4:28 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 5, 2012 at 10:39 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jun 5, 2012 at 3:36 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 5, 2012 at 5:32 PM, Magnus Hagander mag...@hagander.net

Re: [HACKERS] pg_receivexlog and feedback message

2012-06-05 Thread Magnus Hagander
On Tue, Jun 5, 2012 at 4:42 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 5, 2012 at 9:53 PM, Magnus Hagander mag...@hagander.net wrote: Right now, pg_receivexlog sets:                        replymsg-write = InvalidXLogRecPtr;                        replymsg-flush =

Re: [HACKERS] Backup docs

2012-06-05 Thread Kevin Grittner
Magnus Hagander mag...@hagander.net wrote: In reference to: http://www.postgresql.org/docs/devel/static/continuous-archiving.html I would like to see that page changed to list pg_basebackup as the default way of doing base backups, and then list the manual way as an option if you need more

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

2012-06-05 Thread Florian Pflug
On Jun5, 2012, at 15:07 , Kohei KaiGai wrote: 2012/6/5 Florian Pflug f...@phlo.org: On Jun5, 2012, at 11:43 , Kohei KaiGai wrote: I think it does not require to add a mechanism to invalidate prepared-statement, because all the checks are applied on executor stage. And these functions can be

Re: [HACKERS] Remembering bug #6123

2012-06-05 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: http://archives.postgresql.org/pgsql-hackers/2012-01/msg01241.php OK, here's an updated version of the patch. I was on vacation after PGCon and just got back to the office yesterday, so I have just now been able to check on the status of our testing of this

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

2012-06-05 Thread Kohei KaiGai
2012/6/5 Florian Pflug f...@phlo.org: On Jun5, 2012, at 15:07 , Kohei KaiGai wrote: 2012/6/5 Florian Pflug f...@phlo.org: On Jun5, 2012, at 11:43 , Kohei KaiGai wrote: I think it does not require to add a mechanism to invalidate prepared-statement, because all the checks are applied on

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

2012-06-05 Thread Simon Riggs
On 24 May 2012 19:45, Robert Haas robertmh...@gmail.com wrote: On Wed, May 23, 2012 at 2:28 PM, Fujii Masao masao.fu...@gmail.com wrote: On Sat, Dec 31, 2011 at 10:34 PM, Simon Riggs si...@2ndquadrant.com wrote: Send new protocol keepalive messages to standby servers. Allows streaming

Re: [HACKERS] Unnecessary WAL archiving after failover

2012-06-05 Thread Simon Riggs
On 23 March 2012 14:03, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Mar 22, 2012 at 12:56 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 29, 2012 at 5:48 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, In streaming replication, after failover, new master might have lots of

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

2012-06-05 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: 1. Functions - it's fairly easy to add some functions. Initially, we can add them as a contrib module, then if an initdb is forced elsewhere we can include them in the main server. While I dislike the idea of a forced initdb at this point, adding a

Re: [HACKERS] slow dropping of tables, DropRelFileNodeBuffers, tas

2012-06-05 Thread Simon Riggs
On 3 June 2012 19:07, Jeff Janes jeff.ja...@gmail.com wrote: On Thu, May 31, 2012 at 5:04 AM, Simon Riggs si...@2ndquadrant.com wrote: On 30 May 2012 12:10, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Hmm, we do this in smgrDoPendingDeletes: for (i = 0; i = MAX_FORKNUM;

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

2012-06-05 Thread Simon Riggs
On 5 June 2012 22:18, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: 1. Functions - it's fairly easy to add some functions. Initially, we ... How badly do we really need these functions right now? We need a better way of taking these decisions than just

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

2012-06-05 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: Can't we have a trial branch where quarantined patches can be placed on trial for inclusion in main release? [ shrug... ] You're welcome to publish a personal repo somewhere with such things. But even if we did that in the master repo, it would have

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

2012-06-05 Thread Florian Pflug
On Jun5, 2012, at 22:33 , Kohei KaiGai wrote: 2012/6/5 Florian Pflug f...@phlo.org: I can live with any behaviour, as long as it doesn't depends on details of the query plan. My vote would be for always using the role which was active at statement creation time (i.e. at PREPARE/DECLARE time)

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

2012-06-05 Thread Peter Geoghegan
On 5 June 2012 23:55, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: Can't we have a trial branch where quarantined patches can be placed on trial for inclusion in main release? [ shrug... ]  You're welcome to publish a personal repo somewhere with such things.  

[HACKERS] Inconsistency in libpq connection parameters, and extension thereof

2012-06-05 Thread Daniel Farina
Hello list, I have been playing with the URI connection strings in the bleeding edge 9.2 and noticed an inconsistency with the old connection string behavior: $ psql 'host=/var/run/postgresql dbname=postgres arbitrary=property' psql: invalid connection option arbitrary (psql exits with an error

Re: [HACKERS] Inconsistency in libpq connection parameters, and extension thereof

2012-06-05 Thread Tom Lane
Daniel Farina dan...@heroku.com writes: I have been playing with the URI connection strings in the bleeding edge 9.2 and noticed an inconsistency with the old connection string behavior: $ psql 'host=/var/run/postgresql dbname=postgres arbitrary=property' psql: invalid connection option

Re: [HACKERS] Inconsistency in libpq connection parameters, and extension thereof

2012-06-05 Thread Daniel Farina
On Tue, Jun 5, 2012 at 6:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: Daniel Farina dan...@heroku.com writes: I have been playing with the URI connection strings in the bleeding edge 9.2 and noticed an inconsistency with the old connection string behavior: $ psql 'host=/var/run/postgresql

[HACKERS] issue with smlar exension and gist index creation (9.2Beta1)

2012-06-05 Thread mark
Hi All, I am playing around with 9.2Beta1 and the smlar extension that was presented at pgcon. Looks like a lot of great work has gone into both - so thanks to everyone for all the great work. I did run into an issue while creating a GIST index using the _text_sml_ops. I am getting ERROR:

Re: [HACKERS] Inconsistency in libpq connection parameters, and extension thereof

2012-06-05 Thread Tom Lane
Daniel Farina dan...@heroku.com writes: On Tue, Jun 5, 2012 at 6:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: We already have a mechanism (PGOPTIONS, aka options=foo) for passing through settings that will not be interpreted by libpq.  I think that stuff that is meant to be handled at the server

Re: [HACKERS] issue with smlar exension and gist index creation (9.2Beta1)

2012-06-05 Thread Tom Lane
mark dvlh...@gmail.com writes: I am playing around with 9.2Beta1 and the smlar extension that was presented at pgcon. Looks like a lot of great work has gone into both - so thanks to everyone for all the great work. I did run into an issue while creating a GIST index using the _text_sml_ops.

Re: [HACKERS] Inconsistency in libpq connection parameters, and extension thereof

2012-06-05 Thread Daniel Farina
On Tue, Jun 5, 2012 at 8:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: The main point here IMO is that libpq should have some way of telling parameters-for-the- server from things that are meant to be its own parameters. I agree with this. If that is the case, is there a convention we can use to

Re: [HACKERS] Inconsistency in libpq connection parameters, and extension thereof

2012-06-05 Thread Tom Lane
Daniel Farina dan...@heroku.com writes: Would these hypothetical extension-pairs be using the options device at startup time, or something else (possibly brand new)? I'd argue for just translating them into options, at least in the near term. If they use some new mechanism then they would only

Re: [HACKERS] Inconsistency in libpq connection parameters, and extension thereof

2012-06-05 Thread Daniel Farina
On Tue, Jun 5, 2012 at 9:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: Daniel Farina dan...@heroku.com writes: Would these hypothetical extension-pairs be using the options device at startup time, or something else (possibly brand new)? I'd argue for just translating them into options, at least

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

2012-06-05 Thread Simon Riggs
On 5 June 2012 23:55, Tom Lane t...@sss.pgh.pa.us wrote: Plus. if we have extensions, why does adding a function need to force an initdb?? Why don't we use our own infrastructure? I thought I already pointed that out, but: we have *extensions*.  What we don't have is a convenient method of