Re: [HACKERS] Visibility Groups

2008-08-08 Thread daveg
On Thu, Aug 07, 2008 at 01:30:27PM +0100, Gregory Stark wrote: > "Simon Riggs" <[EMAIL PROTECTED]> writes: > > > Currently, we calculate a single OldestXmin across all snapshots on the > > assumption that any transaction might access any table. > > > > I propose creating "Visibility Groups" that *

Re: [HACKERS] autovacuum and TOAST tables

2008-08-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Note that this patch allows a toast table to be vacuumed by the user: > I don't have a problem with that, but if anyone thinks this is not a > good idea, please speak up. The permissions on pg_toast will prevent anyone but a superuser from doing that an

Re: [HACKERS] autovacuum and TOAST tables

2008-08-08 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > There's two things I'm not happy about in this patch: > > > 1. it uses a List to keep the mapping of heap<->toast Oids. This is > > needed to be able to fetch the main rel's pg_autovacuum entry to process > > the toast table. This

Re: [HACKERS] IN vs EXISTS equivalence

2008-08-08 Thread Kevin Grittner
>>> Tom Lane <[EMAIL PROTECTED]> wrote: > I believe that the optimizable cases for EXISTS are those where the > EXISTS() is either at the top level of WHERE, or just underneath a NOT, The rest of the plan makes sense to me, but this part seems narrow. There's probably a good reason for that w

Re: [HACKERS] Replay attack of query cancel

2008-08-08 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > The problem was (third IIRC here :-P) in other clients, such as the JDBC > driver (I think that one was checked specifically) which currently only > accept the BackendKeyData message during startup. All drivers not based > on libpq would have to be chec

Re: [HACKERS] Replay attack of query cancel

2008-08-08 Thread Magnus Hagander
Alvaro Herrera wrote: > Heikki Linnakangas wrote: > >> One idea for fixing this is to make cancellation keys disposable, and >> automatically issue a new one through the main connection when one is >> used, but that's not completely trivial, and requires a change in both >> the clients and t

Re: [HACKERS] Replay attack of query cancel

2008-08-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > I wonder if we can do something diffie-hellman'ish, where we have a > parameter exchanged in the initial SSL'ed handshake, which is later used > to generate new cancel keys each time the previous one is used. Seems like the risk of getting out of sync w

Re: [HACKERS] IN vs EXISTS equivalence

2008-08-08 Thread Tom Lane
"Kevin Grittner" <[EMAIL PROTECTED]> writes: >>> I'm adding some NOT EXISTS examples to the thread for completeness >>> of what someone might want to address while working on it. For two >>> queries which can easily be shown (to a human viewer, anyway) to >>> return identical results, I see perfor

Re: [HACKERS] Replay attack of query cancel

2008-08-08 Thread Alvaro Herrera
Heikki Linnakangas wrote: > One idea for fixing this is to make cancellation keys disposable, and > automatically issue a new one through the main connection when one is > used, but that's not completely trivial, and requires a change in both > the clients and the server. Another idea is to

[HACKERS] Replay attack of query cancel

2008-08-08 Thread Heikki Linnakangas
It occurred to me a while ago that our query cancel messages are sent unencrypted, even when SSL is otherwise used. That's not a big issue on its own, because the cancellation message only contains the backend PID and the cancellation key, but it does open us to a replay attack. After the first

Re: [HACKERS] autovacuum and TOAST tables

2008-08-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > There's two things I'm not happy about in this patch: > 1. it uses a List to keep the mapping of heap<->toast Oids. This is > needed to be able to fetch the main rel's pg_autovacuum entry to process > the toast table. This incurs in O(n^2) behavior.

Re: [HACKERS] Avoiding Application Re-test

2008-08-08 Thread chris
[EMAIL PROTECTED] (Simon Riggs) writes: > Every time we introduce a feature that changes output, we just put an if > test in saying sql_compatibility = X, (the release we added feature). > > Straightforward, futureproof. Cool. This is somewhat like the way that some shells try to emulate others; f

Re: [HACKERS] Proposal of SE-PostgreSQL patches [try#2]

2008-08-08 Thread Josh Berkus
KaiGai Kohei wrote: On the WiKi of CommitFest:Sep, http://wiki.postgresql.org/wiki/CommitFest:2008-09 The entry of SE-PostgreSQL points a message when I submitted older version of our patch set. But the latest ones are listed on another message. Please add a link to the following message for

[HACKERS] autovacuum and TOAST tables

2008-08-08 Thread Alvaro Herrera
Hi, Here's a patch to make autovacuum process TOAST tables separately from main tables. The most important change is that when called from autovac, vacuum does not process the TOAST table at all. It will only do so when the stats for the TOAST table say that it needs vacuuming. (A user-invoked

Re: [HACKERS] CommitFest July Over

2008-08-08 Thread Josh Berkus
Markus, Maybe it's just me, but I don't quite understand the concept of RRR. If I get some spare cycles to review patches, I certainly want to choose mysqlf which patch I'm going to review. Why is the CF Manager doing any assignment of patches? This was actually by request of several reviewe

Re: [HACKERS] Verbosity of Function Return Type Checks

2008-08-08 Thread Alvaro Herrera
Volkan YAZICI wrote: > Yesterday I needed to fiddle with PostgreSQL internals to be able to > debug a PL/pgSQL procedure returning a set of records. I attached the > patch I used to increase the verbosity of error messages related with > function return type checks. I'll be appreciated if any deve

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-08 Thread Stephen Frost
Magnus, * Magnus Hagander ([EMAIL PROTECTED]) wrote: > Yeah. I think the question there is just - how likely is it that the > same installation actually uses >1 authentication method. Personally, I > think it's not very uncommon at all, but fact remains that as long as > you only use one of them a

Re: [HACKERS] Oprofile with postgresql

2008-08-08 Thread Tom Lane
"=?GB2312?B?tN7R0mNjdWl5eWFuQHNpbmEuY29t?=" <[EMAIL PROTECTED]> writes: > Hi all: > Recently i do a test of postgresql. To get more information of the > functions in PostgreSQL, i use > opgprof and opannotate, which are two tools in Oprofile. But i can't work > with the tools correctly. I t

Re: [HACKERS] For what should pg_stop_backup wait?

2008-08-08 Thread Simon Riggs
On Fri, 2008-08-08 at 12:57 +0100, Simon Riggs wrote: > > Yes, statement_timeout may help. But, I don't want to use it, because the > > *successful* backup is canceled. > > > > How about checking whether the stoppoint was archived by comparing with > > the last WAL archived. The archiver process

Re: [HACKERS] patch: Add columns via CREATE OR REPLACE VIEW

2008-08-08 Thread Tom Lane
Zeugswetter Andreas OSB sIT <[EMAIL PROTECTED]> writes: >> If you accept the idea that column identity should be based on column >> name, then the only two operations that are really necessary are >> "CREATE OR REPLACE VIEW" and "ALTER VIEW RENAME COLUMN", and it is >> 100% clear what the semantics

[HACKERS] Verbosity of Function Return Type Checks

2008-08-08 Thread Volkan YAZICI
Hi, Yesterday I needed to fiddle with PostgreSQL internals to be able to debug a PL/pgSQL procedure returning a set of records. I attached the patch I used to increase the verbosity of error messages related with function return type checks. I'll be appreciated if any developer could commit this p

Re: [HACKERS] For what should pg_stop_backup wait?

2008-08-08 Thread Simon Riggs
On Fri, 2008-08-08 at 11:47 +0900, Fujii Masao wrote: > On Thu, Aug 7, 2008 at 11:34 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > > In this situation, the history file (00010004.0020.backup) > is behind the stoppoint (00010004) in the alphabetic order. > So,

[HACKERS] Oprofile with postgresql

2008-08-08 Thread [EMAIL PROTECTED]
Hi all: Recently i do a test of postgresql. To get more information of the functions in PostgreSQL, i use opgprof and opannotate, which are two tools in Oprofile. But i can't work with the tools correctly. PostgreSQL is compiled with -g option and the errors are like this: opgprof error:

Re: [HACKERS] patch: Add columns via CREATE OR REPLACE VIEW

2008-08-08 Thread Zeugswetter Andreas OSB sIT
> If you accept the idea that column identity should be based on column > name, then the only two operations that are really necessary are > "CREATE OR REPLACE VIEW" and "ALTER VIEW RENAME COLUMN", and it is > 100% clear what the semantics of those operations should be. +1 I think this would be

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-08 Thread Magnus Hagander
Stephen Frost wrote: > Magnus, > > * Magnus Hagander ([EMAIL PROTECTED]) wrote: >> I thought of another issue with this. My "grand plan" includes being >> able to do username mapping (per pg_ident.conf) for other authentication >> methods than ident. Specifically this would be interesting for all