Re: [HACKERS] Extra cost of "lossy mode" Bitmap Scan plan

2009-04-27 Thread higepon
Hi. > Good point. I saw the bad behavior on DBT-3 (TPC-H) benchmark before. > Loss-less bitmap scan was faster than seq Scan, > but lossy bitmap scan was slower than seq Scan: Thank you. > Sure, we need it! Also, I hope some methods to determine whether the > bitmap scan was lossy or not, and ho

Re: [HACKERS] Extra cost of "lossy mode" Bitmap Scan plan

2009-04-27 Thread Itagaki Takahiro
higepon wrote: > I found the current planner doesn't care about "lossy mode" on Bitmap Scan. Good point. I saw the bad behavior on DBT-3 (TPC-H) benchmark before. Loss-less bitmap scan was faster than seq Scan, but lossy bitmap scan was slower than seq Scan: EXPLAIN ANALYZE SELECT * FROM t

[HACKERS] Extra cost of "lossy mode" Bitmap Scan plan

2009-04-27 Thread higepon
Hi. I found the current planner doesn't care about "lossy mode" on Bitmap Scan. I think costs of following two plans are equal now. (a) Having enough work_mem => normal Bitmap Scan. (b) Having less work_mem than estimated rows => Bitmap Scan with "lossy mode". Slower than (a). So, sometimes

Re: [HACKERS] Clean shutdown and warm standby

2009-04-27 Thread Heikki Linnakangas
Andreas Pflug wrote: Heikki Linnakangas wrote: No, no crash is involved. Just a normal server shutdown and start: 1. Server shutdown is initiated 2. A shutdown checkpoint is recorded at XLOG point 1234, redo ptr is also 1234. 3. A XLOG_SWITCH record is written at 1235, right after the checkpo

Re: [HACKERS] RFE: Transparent encryption on all fields

2009-04-27 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Apr 27, 2009 at 01:28:45AM -0700, Sam Halliday wrote: > > > Tomas Zerolo wrote: > > > >> If there were a way to prompt the user for the password to an encrypted > >> drive on startup for all OS, with an equivalent for headless machines...

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Pavel Stehule
2009/4/28 Kevin Grittner : > "A.M." wrote: >> On Apr 27, 2009, at 5:39 PM, Dimitri Fontaine wrote: >>> Le 27 avr. 09 à 23:32, A.M. a écrit : When will postgresql offer "global" temporary tables with data which are shared among sessions? Such tables are great for transient data such

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Pavel Stehule
2009/4/27 Andrew Dunstan : > > > Kevin Grittner wrote: >> >> Pavel Stehule wrote: >>> >>> I am thinking about global temp tables. >>> >> >>  These would have some value to us. >>  In case anyone doesn't know, this is a feature in the SQL standard. You >> have a permanent definition of the schema,

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread A.M.
On Apr 27, 2009, at 6:01 PM, Kevin Grittner wrote: "A.M." wrote: On Apr 27, 2009, at 5:39 PM, Dimitri Fontaine wrote: Le 27 avr. 09 à 23:32, A.M. a écrit : When will postgresql offer "global" temporary tables with data which are shared among sessions? Such tables are great for transient dat

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Kevin Grittner
"A.M." wrote: > On Apr 27, 2009, at 5:39 PM, Dimitri Fontaine wrote: >> Le 27 avr. 09 à 23:32, A.M. a écrit : >>> When will postgresql offer "global" temporary tables with data >>> which are shared among sessions? Such tables are great for >>> transient data such as web session data where wri

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread A.M.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Apr 27, 2009, at 5:39 PM, Dimitri Fontaine wrote: Hi, Le 27 avr. 09 à 23:32, A.M. a écrit : When will postgresql offer "global" temporary tables with data which are shared among sessions? Such tables are great for transient data such as web

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Kevin Grittner
"A.M." wrote: > When will postgresql offer "global" temporary tables with data > which are shared among sessions? Well, that would certainly be far different from what the standard calls a temporary table of any flavor. In the standard all temporary tables are restricted to a single connecti

Re: [HACKERS] Clean shutdown and warm standby

2009-04-27 Thread Andreas Pflug
Heikki Linnakangas wrote: No, no crash is involved. Just a normal server shutdown and start: 1. Server shutdown is initiated 2. A shutdown checkpoint is recorded at XLOG point 1234, redo ptr is also 1234. 3. A XLOG_SWITCH record is written at 1235, right after the checkpoint record. 4. The la

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Dimitri Fontaine
Hi, Le 27 avr. 09 à 23:32, A.M. a écrit : When will postgresql offer "global" temporary tables with data which are shared among sessions? Such tables are great for transient data such as web session data where writing to the WAL is a waste. (On DB startup, the tables would simply be empty.)

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread A.M.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Apr 27, 2009, at 4:44 PM, Pavel Stehule wrote: Hello I am thinking about global temp tables. One possible solution is creating global temporary table like normal table and in planner stage check u

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Kevin Grittner
Andrew Dunstan wrote: > Or perhaps Pavel doesn't really mean "global" as the term is used > in Postgres (c.f. the pg_database table)? I'd bet that he doesn't. He's taking terminology from the standard, where it means "not limited to one SQL-client module". It just means it is available as l

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Andrew Dunstan
Kevin Grittner wrote: Pavel Stehule wrote: I am thinking about global temp tables. These would have some value to us. In case anyone doesn't know, this is a feature in the SQL standard. You have a permanent definition of the schema, but the table is materialized as a temporary

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Kevin Grittner
Pavel Stehule wrote: > I am thinking about global temp tables. These would have some value to us. In case anyone doesn't know, this is a feature in the SQL standard. You have a permanent definition of the schema, but the table is materialized as a temporary table on reference by any connec

[HACKERS] idea: global temp tables

2009-04-27 Thread Pavel Stehule
Hello I am thinking about global temp tables. One possible solution is creating global temporary table like normal table and in planner stage check using this table. When some global temporary table is detected, then real temporary table is created and used in execution plan. It's like: CREATE GL

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Alvaro Herrera
David Fetter wrote: > On Mon, Apr 27, 2009 at 01:31:11PM -0400, Alvaro Herrera wrote: > > Tab completion has never been perfect. I don't think beta is the > > best time to be improving it so much. I think a small patch that > > just adds "\dfa", "\dfw" and appropriate pattern completions (i.e. >

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread David Fetter
On Mon, Apr 27, 2009 at 01:31:11PM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > On Mon, Apr 27, 2009 at 01:11:44PM -0400, Tom Lane wrote: > > > > It seems like rather a large change to be making in beta. Can > > > you make a small patch that fixes the immediate problem, and > > > leave

Re: [HACKERS] True Blue

2009-04-27 Thread Joshua D. Drake
On Mon, 2009-04-27 at 16:17 +0100, Simon Riggs wrote: > I notice this has gone unremarked > http://www.theregister.co.uk/2009/04/22/oracle_ibm_enterprisedb_compatibility/ > > Looking at the IBM DB2 press release > http://www-03.ibm.com/press/us/en/pressrelease/27279.wss > shows this quote > Why

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Alvaro Herrera
David Fetter wrote: > On Mon, Apr 27, 2009 at 01:11:44PM -0400, Tom Lane wrote: > > It seems like rather a large change to be making in beta. Can you > > make a small patch that fixes the immediate problem, and leave the > > refactoring for 8.5? > > The hack I've come up with short of the refact

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread David Fetter
On Mon, Apr 27, 2009 at 01:11:44PM -0400, Tom Lane wrote: > David Fetter writes: > > I have a handle on the problem, which is that the tab completion > > code assumes, wrongly, that it only needs to deal with fixed > > strings. It's actually been false for some time in the \div case, > > for exam

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Tom Lane
David Fetter writes: > I have a handle on the problem, which is that the tab completion code > assumes, wrongly, that it only needs to deal with fixed strings. It's > actually been false for some time in the \div case, for example. The > S option has shattered the fixed-string assumption. Check

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread David Fetter
On Mon, Apr 27, 2009 at 10:39:33AM -0400, Alvaro Herrera wrote: > David Fetter wrote: > > On Fri, Apr 17, 2009 at 04:42:31PM -0400, Alvaro Herrera wrote: > > > > It also seems like we're missing tab completion support for this. > > > > Oops. Working on that now. > > Any luck with this? I have

Re: [HACKERS] RFE: Transparent encryption on all fields

2009-04-27 Thread Sam Halliday
I think Sam Mason's proposal of hacking pg-pool sounds feasible. Is there any way to create a formal RFE for this? Is anybody interested in implementing this? On 27 Apr 2009, at 13:55, Sam Mason wrote: One possible arrangement would be if each user/encryption key had its own database cluster

Re: [HACKERS] To know what a macro does

2009-04-27 Thread Werner Echezuria
2009/4/28 Tom Lane > Well, you've omitted showing us the code where the problem is likely to > be, but I am kinda thinking that you've shot yourself in the foot by > trying to represent your special ordering clause as a simple constant. > The planner is quite smart enough to throw away "order by

Re: [HACKERS] Restore deleted rows

2009-04-27 Thread Tom Lane
Alvaro Herrera writes: > Anton Egorov escribió: >> I need to recover deleted rows from table. After I delete those rows I >> stopped postgres immediately and create tar archive of database. I found >> solution http://archives.postgresql.org/pgsql-hackers/2005-03/msg00965.php, >> but is there anoth

[HACKERS] True Blue

2009-04-27 Thread Simon Riggs
I notice this has gone unremarked http://www.theregister.co.uk/2009/04/22/oracle_ibm_enterprisedb_compatibility/ Looking at the IBM DB2 press release http://www-03.ibm.com/press/us/en/pressrelease/27279.wss shows this quote <> -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training,

[HACKERS] how to attach shared memory?

2009-04-27 Thread abdelhak benmohamed
hi, I want to attach to acced the shared memory  therefore I must attaches oneself it but how do?   thanks

Re: [HACKERS] Restore deleted rows

2009-04-27 Thread Alvaro Herrera
Anton Egorov escribió: > Hi! > > I need to recover deleted rows from table. After I delete those rows I > stopped postgres immediately and create tar archive of database. I found > solution http://archives.postgresql.org/pgsql-hackers/2005-03/msg00965.php, > but is there another (easyer) way to do

Re: [HACKERS] psql with "Function Type" in \df

2009-04-27 Thread Alvaro Herrera
David Fetter wrote: > On Fri, Apr 17, 2009 at 04:42:31PM -0400, Alvaro Herrera wrote: > > It also seems like we're missing tab completion support for this. > > Oops. Working on that now. Any luck with this? -- Alvaro Herrerahttp://www.CommandPrompt.com/ Postgre

Re: [HACKERS] To know what a macro does

2009-04-27 Thread Tom Lane
Werner Echezuria writes: > Later in planner.c on grouping_planner function I do something like this: Well, you've omitted showing us the code where the problem is likely to be, but I am kinda thinking that you've shot yourself in the foot by trying to represent your special ordering clause as a s

Re: [HACKERS] RFE: Transparent encryption on all fields

2009-04-27 Thread Sam Halliday
On 27 Apr 2009, at 13:55, Sam Mason wrote: Allowing multiple users/encryption keys access the same database seems problematic; how would you allow catalogue access and enforce unique or other constraints if the server couldn't look to see what's there. Not sure what you're after here though

Re: [HACKERS] Synchronous replication: psqlODBC driver compilation

2009-04-27 Thread Fujii Masao
Hi, Thanks for the report! On Fri, Apr 24, 2009 at 3:54 PM, K, Niranjan (NSN - IN/Bangalore) wrote: > Upon applying synchronous replication patch and subsequent compilation > of psqlODBC sources will lead to compilation errors. > As a workaround users can compile the psqlODBC sources using the >

Re: [HACKERS] Clean shutdown and warm standby

2009-04-27 Thread Fujii Masao
Hi, On Mon, Apr 27, 2009 at 10:02 PM, Heikki Linnakangas wrote: > Fujii Masao wrote: >> >> Hi, >> >> On Mon, Apr 27, 2009 at 8:43 PM, Heikki Linnakangas >> wrote: >>> >>> Fujii Masao wrote: On Fri, Apr 24, 2009 at 3:20 PM, Heikki Linnakangas wrote: > > It's not safe to wr

Re: [HACKERS] Clean shutdown and warm standby

2009-04-27 Thread Heikki Linnakangas
Fujii Masao wrote: Hi, On Mon, Apr 27, 2009 at 8:43 PM, Heikki Linnakangas wrote: Fujii Masao wrote: On Fri, Apr 24, 2009 at 3:20 PM, Heikki Linnakangas wrote: It's not safe to write WAL after the checkpoint, as RequestXLogSwitch() does. After restart, the system will start inserting WAL fr

Re: [HACKERS] RFE: Transparent encryption on all fields

2009-04-27 Thread Sam Mason
On Mon, Apr 27, 2009 at 09:24:55AM +0100, Sam Halliday wrote: > Not looking for a Windows solution. Must be cross platform and work > for headless machines, laptops and desktops. Encrypted drive solutions > fall short of these requirements. Other considerations which rule out > encrypted driv

Re: [HACKERS] To know what a macro does

2009-04-27 Thread Werner Echezuria
Well, I'm in a project called PostgreSQLf and we're trying to include fuzzy logic inside PostgreSQL. Now I've been thinking this is getting too hard, do you know if I can just sort the results with something like this : Sort(ResultSlot,column)?, I mean without the Order By clause? 2009/4/28 Martij

Re: [HACKERS] Clean shutdown and warm standby

2009-04-27 Thread Fujii Masao
Hi, On Mon, Apr 27, 2009 at 8:43 PM, Heikki Linnakangas wrote: > Fujii Masao wrote: >> >> On Fri, Apr 24, 2009 at 3:20 PM, Heikki Linnakangas >> wrote: >>> >>> It's not safe to write WAL after the checkpoint, as RequestXLogSwitch() >>> does. After restart, the system will start inserting WAL fro

Re: [HACKERS] Clean shutdown and warm standby

2009-04-27 Thread Heikki Linnakangas
Fujii Masao wrote: On Fri, Apr 24, 2009 at 3:20 PM, Heikki Linnakangas wrote: It's not safe to write WAL after the checkpoint, as RequestXLogSwitch() does. After restart, the system will start inserting WAL from the checkpoint redo point, which is just before the XLOG_SWITCH record, and will ov

Re: [HACKERS] Clean shutdown and warm standby

2009-04-27 Thread Fujii Masao
Hi, On Fri, Apr 24, 2009 at 3:20 PM, Heikki Linnakangas wrote: > It's not safe to write WAL after the checkpoint, as RequestXLogSwitch() > does. After restart, the system will start inserting WAL from the checkpoint > redo point, which is just before the XLOG_SWITCH record, and will overwrite > i

Re: [HACKERS] RFE: Transparent encryption on all fields

2009-04-27 Thread Martijn van Oosterhout
On Mon, Apr 27, 2009 at 01:28:45AM -0700, Sam Halliday wrote: > Tomas Zerolo wrote: > > > >> If there were a way to prompt the user for the password to an encrypted > >> drive on startup for all OS, with an equivalent for headless machines... > > There is a difference between "it's possible" an

Re: [HACKERS] RFE: Transparent encryption on all fields

2009-04-27 Thread Sam Halliday
Tomas Zerolo wrote: > >> If there were a way to prompt the user for the password to an encrypted >> drive on startup for all OS, with an equivalent for headless machines... > > There definitely is. We even need more flexibility: prompt for > credentials at the time of *mounting* a secured par

Re: [HACKERS] RFE: Transparent encryption on all fields

2009-04-27 Thread Sam Halliday
Not looking for a Windows solution. Must be cross platform and work for headless machines, laptops and desktops. Encrypted drive solutions fall short of these requirements. Other considerations which rule out encrypted drives have been discussed earlier in the thread. For the record, I have

[HACKERS] bug #4662 (mingw) in 8.4 beta1

2009-04-27 Thread hernan gonzalez
Postgresql 8.4 beta1 does not compile in win-XP3 because of the already reported bug (#4662) http://archives.postgresql.org/pgsql-bugs/2009-04/msg00142.php http://archives.postgresql.org/pgsql-hackers/2008-11/msg00367.php The patch mentioned in those posts fixed the problem for me Hernán J. Gonzá