Re: [HACKERS] Database corruption help

2009-02-15 Thread Simon Riggs
On Fri, 2009-02-13 at 11:19 -0500, Tom Lane wrote: Aside from the how did this happen puzzle, the real point of any investigation of course ought to be whether we can make heap_page_prune more robust. At the very least it's undesirable to be leaving the page in a state where VACUUM FULL

[HACKERS] Re: [COMMITTERS] pgsql: Explicitly bind gettext to the correct encoding on Windows.

2009-02-15 Thread Magnus Hagander
Tom Lane wrote: m...@postgresql.org (Magnus Hagander) writes: Explicitly bind gettext to the correct encoding on Windows. I have a couple of objections to this patch. First, what happens if it fails to find a matching table entry? (The existing answer is nothing, but that doesn't seem

Re: [HACKERS] [COMMITTERS] pgsql: Explicitly bind gettext to the correct encoding on Windows.

2009-02-15 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: Tom Lane wrote: What makes more sense to me is to add a table to encnames.c that provides the gettext name of every encoding that we support. Do you mean a separate table there, or should we add a new column to one of the existing tables?

Re: [HACKERS] The science of optimization in practical terms?

2009-02-15 Thread Greg Smith
On Fri, 13 Feb 2009, Robert Haas wrote: Gather statistics on relation access patterns and use that to estimate the fraction of a relation likely to be in cache. At one point I had a hacked background writer that collected statistics about the contents of the buffer cache. Since it's

Re: [HACKERS] The science of optimization in practical terms?

2009-02-15 Thread Kevin Grittner
Greg Smith gsm...@gregsmith.com wrote: have a second count that assumes the last 2*shared_buffers evicted are also still cached. Perhaps it would be better to assume that the external cache is effective_cache_size - shared_buffers? Of course, we would need to have some heuristics to cover

Re: [HACKERS] SE-PostgreSQL and row level security

2009-02-15 Thread BogDan Vatra
On Fri, Feb 13, 2009 at 02:29:39PM +0200, BogDan Vatra wrote: [..] A message for postgresql decision board: Dear postgresql hackers, if I can do something to push row level acl for 8.4 please tell me, I do anything to have this feature, it will help me, and I hope many others, this

[HACKERS] casting in ORDER BY

2009-02-15 Thread Zdenek Kotala
I try to fix foreign_data regression test for Czech locale (HEAD). For example I replaced SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4; with following statement: SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3::name, 4; which should use C

Re: [HACKERS] casting in ORDER BY

2009-02-15 Thread Tom Lane
Zdenek Kotala zdenek.kot...@sun.com writes: I try to fix foreign_data regression test for Czech locale (HEAD). For example I replaced SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4; with following statement: SELECT * FROM information_schema.user_mapping_options

Re: [HACKERS] PQinitSSL broken in some use casesf

2009-02-15 Thread Tom Lane
Andrew Chernow a...@esilo.com writes: 4. int PQinitSecure(int init_mask) This works just like #3 but returns the bits it understood. It allows an app to determine if the loaded libpq supports a bit it has tried to use. Maybe better, have it return a zero/nonzero error code; where one of

Re: [HACKERS] casting in ORDER BY

2009-02-15 Thread Zdenek Kotala
Tom Lane píše v ne 15. 02. 2009 v 15:51 -0500: Zdenek Kotala zdenek.kot...@sun.com writes: I try to fix foreign_data regression test for Czech locale (HEAD). For example I replaced SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4; with following statement:

Re: [HACKERS] PQinitSSL broken in some use casesf

2009-02-15 Thread Andrew Chernow
Maybe better, have it return a zero/nonzero error code; where one of the possibilities for failure is you passed a bit I didn't understand. Why not just return those bit(s) instead of an arbitrary code? How about: -1 = error (if it ever does anything that can fail) 0 = success (all bits

Re: [HACKERS] SE-PostgreSQL and row level security

2009-02-15 Thread KaiGai Kohei
BogDan Vatra wrote: On Fri, Feb 13, 2009 at 02:29:39PM +0200, BogDan Vatra wrote: [..] A message for postgresql decision board: Dear postgresql hackers, if I can do something to push row level acl for 8.4 please tell me, I do anything to have this feature, it will help me, and I hope many

Re: [HACKERS] The science of optimization in practical terms?

2009-02-15 Thread Robert Haas
On Sun, Feb 15, 2009 at 1:16 PM, Greg Smith gsm...@gregsmith.com wrote: On Fri, 13 Feb 2009, Robert Haas wrote: Gather statistics on relation access patterns and use that to estimate the fraction of a relation likely to be in cache. At one point I had a hacked background writer that collected

[HACKERS] Questions about parsing boolean and casting to anyelement

2009-02-15 Thread ITAGAKI Takahiro
The pg_autovacuum system catalog will be deprecated in 8.4, but my customers use them to control autovacuum to emulate maintenance window. So, I'm trying to re-implement the catalog using a VIEW and RULEs in 8.4. The attached is a WIP script, but I have some questions around it: (XXX: I don't

Re: [HACKERS] connection logging dtrace probe

2009-02-15 Thread ITAGAKI Takahiro
Hi, Robert Treat xzi...@users.sourceforge.net wrote: I whipped up a quick dtrace probe for one of our servers to monitor connection attempts. My goal was to monitor for any connection attempts from a specific role within the database. How about adding probes not only for connection

Re: [HACKERS] SE-PostgreSQL and row level security

2009-02-15 Thread Martijn van Oosterhout
On Mon, Feb 16, 2009 at 11:10:19AM +0900, KaiGai Kohei wrote: At the previous discussion, two items were pointed out. The one is called as covert channel. When a tuple with PK is refered by one or more tuples with FK, row-level control prevents to update or delete the PK, even if the FK is