Re: [HACKERS] To know what a macro does

2009-04-27 Thread Martijn van Oosterhout
On Sun, Apr 26, 2009 at 08:33:42PM -0430, Werner Echezuria wrote: Well, I do a query like this: SELECT * FROM historial WHERE id_grupo=grupo_hist ORDER BY grmemb LIMIT 10;, then in transformSortClause I know it this way: Ok, this is way over my head. But really, it would be helpful to know

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

2009-04-27 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Apr 26, 2009 at 11:54:55AM +0100, Sam Halliday wrote: On 26 Apr 2009, at 07:05, to...@tuxteam.de wrote: - a single psql server can autonomously start up and serve connection requests (this cannot be done with encrypted disc) Sure it can

[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.

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

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 partition

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 and there is.

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 heikki.linnakan...@enterprisedb.com 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

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 heikki.linnakan...@enterprisedb.com 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

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 heikki.linnakan...@enterprisedb.com wrote: Fujii Masao wrote: On Fri, Apr 24, 2009 at 3:20 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: It's not safe to write WAL after the checkpoint, as RequestXLogSwitch() does.

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

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 drives

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 heikki.linnakan...@enterprisedb.com wrote: Fujii Masao wrote: On Fri, Apr 24, 2009 at 3:20 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: It's not safe to write WAL after the checkpoint, as

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 heikki.linnakan...@enterprisedb.com wrote: Fujii Masao wrote: Hi, On Mon, Apr 27, 2009 at 8:43 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Fujii Masao wrote: On Fri, Apr 24, 2009 at 3:20 PM, Heikki

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) niranja...@nsn.com 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

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

Re: [HACKERS] To know what a macro does

2009-04-27 Thread Tom Lane
Werner Echezuria werc...@gmail.com 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

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/ PostgreSQL

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 it?

[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

[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 EnterpriseDB, another IBM business partner, was a contributor to

Re: [HACKERS] Restore deleted rows

2009-04-27 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com 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,

Re: [HACKERS] To know what a macro does

2009-04-27 Thread Werner Echezuria
2009/4/28 Tom Lane t...@sss.pgh.pa.us 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

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

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 a handle on

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

2009-04-27 Thread Tom Lane
David Fetter da...@fetter.org 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

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 da...@fetter.org 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,

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 refactor is to

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 would

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 the

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. it lists

[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

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Kevin Grittner
Pavel Stehule pavel.steh...@gmail.com 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

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Andrew Dunstan
Kevin Grittner wrote: Pavel Stehule pavel.steh...@gmail.com 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

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Kevin Grittner
Andrew Dunstan and...@dunslane.net 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

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

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] 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

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Kevin Grittner
A.M. age...@themactionfaction.com 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

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. age...@themactionfaction.com 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

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. age...@themactionfaction.com 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

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Pavel Stehule
2009/4/27 Andrew Dunstan and...@dunslane.net: Kevin Grittner wrote: Pavel Stehule pavel.steh...@gmail.com 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

Re: [HACKERS] idea: global temp tables

2009-04-27 Thread Pavel Stehule
2009/4/28 Kevin Grittner kevin.gritt...@wicourts.gov: A.M. age...@themactionfaction.com 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

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] 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

[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 the

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

2009-04-27 Thread Itagaki Takahiro
higepon hige...@gmail.com 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