Re: [HACKERS] roundoff problem in time datatype

2005-11-04 Thread Gurjeet Singh
On 10/13/05, Josh Berkus josh@agliodbs.com wrote: Tom, I think my preference is to allow '24:00:00' (but not anything larger) as a valid input value of the time datatypes. This for two reasons: * existing dump files may contain such values * it's consistent with allowing,

Re: [HACKERS] Need help in installing postgresql 8.1.2 on Windows

2006-01-23 Thread Gurjeet Singh
Hopefully your problem is solved by now; but if not, here's the link: do read the README expanded at the end of the file-list: http://www.postgresql.org/ftp/binary/v8.1.2/win32/ I could give you a long lecture on how to look for the things on your own a little bit before pestering these mailing

Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio MSVC

2006-05-04 Thread Gurjeet Singh
Hi William(uniware), Chuck and Hackers, I have been interested in doing complete PGSQL development in MSVC for a long time now. With reference to one of Chuck's mails to -hackers-win32 with the same subject, you said that you were able to successfully compile PG 8.1 with some minor tweaks.

[HACKERS] Fwd: [pgsql-hackers-win32] Build with Visual Studio MSVC

2006-05-07 Thread Gurjeet Singh
(missed the mailing list last time) Hi William, Thanks for the steps to succeed with vcproject. I am sure that there will be a few more tweaks involved (like setting VC's include path etc.). I will try to build it and consult/inform you if there is any deviation from the README. This will

Re: [HACKERS] [pgsql-hackers-win32] Build with Visual Studio MSVC

2006-05-07 Thread Gurjeet Singh
On 5/5/06, Jonah H. Harris [EMAIL PROTECTED] wrote: On 5/5/06, Gurjeet Singh [EMAIL PROTECTED] wrote: If it is such a 'simple porting', may I ask why hasn't it been attempted successfuly in so many years of PG's history? Because most of use don't use Windows... I thought I said

Re: [HACKERS] BEGIN inside transaction should be an error

2006-05-10 Thread Gurjeet Singh
I dont think anyone is arguing that such an application is not broken. We should see how we can stop a developer from writing buggy code. IMO, such a GUC variable _should_ be created and turned on by default. In case an application fails, at the least, the developer knows that his

Re: [HACKERS] Fwd: [pgsql-hackers-win32] Build with Visual Studio MSVC

2006-05-14 Thread Gurjeet Singh
can do within Eclipse. Any inputs on the document will be appreciated. Thanks, Gurjeet. On 5/8/06, Thomas Hallgren [EMAIL PROTECTED] wrote: Gurjeet Singh wrote: Thomas, I love the idea of eclipse; any platform, any language, one IDE. I am downloading it right now. Can you please send

Re: [HACKERS] Fwd: [pgsql-hackers-win32] Build with Visual Studio MSVC

2006-05-14 Thread Gurjeet Singh
No I am not... I used Eclipse for the first time just last week. But yes, I wish to contribute to the CDT plugin. I think their Indexer is a bit slow... it takes more than an hour (about two hours) to index postgres' source code!!! Also, I just noticed that the background gdb crashes when

Re: [HACKERS] Why use !=

2006-05-15 Thread Gurjeet Singh
It done so, because InitProcess() is supposed to be called only once per backend, because it allocates a PGPROC from a LIST OF free PGPROCs. So with this test, and calling elog( ERROR, ... ) we are stopping the caller from doing a second initialization for this backend. On 5/16/06, ipig

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-15 Thread Gurjeet Singh
I don't think Cristiano is asking for the schema_name in the EXPLAIN o/p. The request is for the table ALIASes to be shown in the o/p, which makes more sense than schema_name+table_name, since the same table can be used in the same query more than once. Gurjeet. On 5/15/06, Jim C. Nasby

Re: [HACKERS] Creating a Pseudocolumn

2006-05-16 Thread Gurjeet Singh
I think Jonah is referring to the the 'START WITH ... CONNECT BY' clause feature from Oracle. Am I right Jonah? For such queries, Oracle introduces a pseudocolumn LEVEL, that holds the value of the indentation level of the current rusultant row. In Oracle, the LEVEL column returns 0 for

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Gurjeet Singh
On 5/16/06, Martijn van Oosterhout kleptog@svana.org wrote: On Tue, May 16, 2006 at 09:15:13AM +0530, Gurjeet Singh wrote: As has been pointed out, aliases ave always been displayed. The OPs problem was that he was using schema.tablename everywhere and explain didn't distinguish between schema1

Re: [HACKERS] [BUGS] BUG #2429: Explain does not report object's schema

2006-05-16 Thread Gurjeet Singh
I agree... VERBOSE option can be made parameterised to include additional information in the EXPLAIN's output. I also agree that adding the schema name wouldn't add any overhead, and I support Tom's suggestion: 'Possibly a reasonable compromise would be for EXPLAIN to act like rule

Re: [HACKERS] audit table containing Select statements submitted

2006-05-16 Thread Gurjeet Singh
Do we have any plans of introducing 'AUTONOMOUS TRANSACTION' like feature? Again, it might not be a part of the standard but it is very helpful in situations like these!!! You can run a trigger with an autonomous transaction attached to it, which guarantees that the work done by

Re: [HACKERS] audit table containing Select statements submitted

2006-05-17 Thread Gurjeet Singh
Just a small example of the fact that people need such functionality... and will devise other ways, albeit inefficient and dangerous, to implement the missing feature. The success of an RDBMS (or any other product for that matter) depends on how well it strikes the balance between the

[HACKERS] COMMIT leads to ROLLBACK

2006-05-21 Thread Gurjeet Singh
Hi All, While trying to implement a recent TODO item, I noticed this behaviour: test=# drop table t2; drop table t1; DROP TABLE DROP TABLE test=# create table t1(a int primary key ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index t1_pkey for table t1 CREATE TABLE test=#

Re: [HACKERS] COMMIT leads to ROLLBACK

2006-05-21 Thread Gurjeet Singh
, Gurjeet. On 5/21/06, Jaime Casanova [EMAIL PROTECTED] wrote: On 5/21/06, Gurjeet Singh [EMAIL PROTECTED] wrote: Hi All, While trying to implement a recent TODO item, I noticed this behaviour: test=# select * from t2; ERROR: current transaction is aborted, commands ignored until end

Re: [HACKERS] COMMIT leads to ROLLBACK

2006-05-21 Thread Gurjeet Singh
One more question comes to mind. IIRC, Oracle doesn't need you to rollback the whole transaction if one statement fails (like constarint violation in this case)!!! Does the standard dictate that an error in a transaction should force a rollback? I could be wrong about Oracle; I do not have

Re: [HACKERS] compiling source code!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2006-05-24 Thread Gurjeet Singh
Hi Sibel, Here's the mail that I posted about 10 days ago about compiling and debugging postgres on windows. I have used msys/mingw toolkit and it is the recommended (by pg community) toolkit to compile postgres on windows. http://archives.postgresql.org/pgsql-hackers/2006-05/msg00396.php

Re: [HACKERS] compiling source code!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2006-05-24 Thread Gurjeet Singh
the folder to someting else (cygwin.before.mingw) so that you don't accidentally use cygwin's binaries. Regards, Gurjeet. On 5/25/06, Gurjeet Singh [EMAIL PROTECTED] wrote: Hi Sibel, Here's the mail that I posted about 10 days ago about compiling and debugging postgres on windows. I have used

Re: [HACKERS] compiling source code!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2006-05-25 Thread Gurjeet Singh
. Sorry for uiintentionally misleading someone, if I did! Regards, Gurjeet On 5/25/06, Andrew Dunstan [EMAIL PROTECTED] wrote: Gurjeet Singh said: Also, I would recommend uninstalling cygwin before you install mingw, If you don't wish to uninstall cygwin, at least rename the folder

Re: [HACKERS] max(*)

2006-05-26 Thread Gurjeet Singh
On 5/26/06, Simon Riggs [EMAIL PROTECTED] wrote: On Fri, 2006-05-26 at 10:22 +0200, Dennis Bjorklund wrote: Shouldn't SELECT max(*) FROM foo; give an error?IMO, yes. SQL:2003 would not allow this; SQL:2003 permits only COUNT(*) and no other aggregate function. All other aggregates require a

[HACKERS] error in compilation!

2006-05-27 Thread Gurjeet Singh
Hi All, I am constantly getting this error: make -C pl all make[2]: Entering directory `/d/Dev/postgres/pgsql_tip/src/pl' make[3]: Entering directory `/d/Dev/postgres/pgsql_tip/src/pl/plpgsql' make -C src all make[4]: Entering directory `/d/Dev/postgres/pgsql_tip/src/pl/plpgsql/src' dlltool

Re: [HACKERS] error in compilation!

2006-05-27 Thread Gurjeet Singh
Any ideas how I can revert back to compilable code? On 5/28/06, Tom Lane [EMAIL PROTECTED] wrote: Bruce Momjian pgman@candle.pha.pa.us writes: I am thinking it is best to always use E'' in that case. OK? I'm planning to revert it to the previous logic: E if there's any backslash. I think we

Re: [HACKERS] error in compilation!

2006-05-27 Thread Gurjeet Singh
Confirmation: The patch rollback in src/pl/plpgsql/src/gram.y resolved the issue. On 5/28/06, Tom Lane [EMAIL PROTECTED] wrote: I wrote: Currently looking through the rest of the patch. I'm wondering about appendStringLiteral: maybe we should kill that entirely in favor of using

Re: [HACKERS] union all bug?

2006-06-18 Thread Gurjeet Singh
Probably this explains the ERROR for the last query... The ORDER BY and LIMIT clauses are expected to end a query (except for subqueries, of course), and hence the keyword UNION is not expected after the LIMIT clause... On 6/18/06, Tom Lane [EMAIL PROTECTED] wrote: Joe Conway [EMAIL PROTECTED]

Re: [HACKERS] shall we have a TRACE_MEMORY mode

2006-06-20 Thread Gurjeet Singh
On 6/20/06, Tom Lane [EMAIL PROTECTED] wrote: One idea that comes to mind is to have a compile time option to record the palloc __FILE__ and _LINE__ in every AllocChunk header. Then it would not be so hard to identify the culprit while trawling through memory. The overhead costs would be so

Re: [HACKERS] Fwd: [pgsql-hackers-win32] Build with Visual Studio MSVC

2006-07-13 Thread Gurjeet Singh
(www.eclipse.org/buckminster). I'd be happy to help the guys from data tools with PostgreSQL if there's anything I can do. Not sure what that would be though. Which Mike is it you're referring to? Regards, Thomas Hallgren Gurjeet Singh wrote: No I am not... I used Eclipse for the first time just last

[HACKERS] Broken link in PG docs

2006-09-25 Thread Gurjeet Singh
At the end of the following page:http://www.postgresql.org/docs/8.0/static/indexes-partial.htmlthere is a link [ Generalized Partial Indexes] which is pointing to a missing link. Can someone update the link with a live doc? Probably this one Regards,-- [EMAIL PROTECTED][EMAIL PROTECTED] gmail |

[HACKERS] Index size increases after VACUUM FULL

2008-09-30 Thread Gurjeet Singh
Hi All, I noticed something strange today, and thought I should report it. I vacuumed a database, and as expected, one of the table's size decreased (other table were VACUUMed individually earlier); but o my astonishment, the size of the UNIQUE KEY index on one of the columns increased.

Re: [HACKERS] Index size increases after VACUUM FULL

2008-09-30 Thread Gurjeet Singh
On Tue, Sep 30, 2008 at 3:09 PM, Heikki Linnakangas [EMAIL PROTECTED] wrote: Gurjeet Singh wrote: I noticed something strange today, and thought I should report it. I vacuumed a database, and as expected, one of the table's size decreased (other table were VACUUMed individually earlier

Re: [HACKERS] Index size increases after VACUUM FULL

2008-09-30 Thread Gurjeet Singh
On Tue, Sep 30, 2008 at 4:49 PM, Heikki Linnakangas [EMAIL PROTECTED] wrote: Gurjeet Singh wrote: On Tue, Sep 30, 2008 at 3:09 PM, Heikki Linnakangas [EMAIL PROTECTED] wrote: That's normal. VACUUM FULL creates new index pointers for the tuples it moves, which can lead to a bigger index

Re: [HACKERS] FSM rewrite committed, loose ends

2008-09-30 Thread Gurjeet Singh
On Tue, Sep 30, 2008 at 4:32 PM, Heikki Linnakangas [EMAIL PROTECTED] wrote: pg_relation_size() doesn't include the size of the FSM. Should it? I'm thinking no, No but pg_total_relation_size() should. +1 The FSM is not updated during WAL replay. That means that after crash

Re: [HACKERS] FSM rewrite committed, loose ends

2008-09-30 Thread Gurjeet Singh
On Tue, Sep 30, 2008 at 6:09 PM, Dimitri Fontaine [EMAIL PROTECTED]wrote: Hi, Le mardi 30 septembre 2008, Heikki Linnakangas a écrit : pg_relation_size() doesn't include the size of the FSM. Should it? I'm thinking no, but pg_total_relation_size() should. What's practical about

Re: [HACKERS] FSM rewrite committed, loose ends

2008-09-30 Thread Gurjeet Singh
On Tue, Sep 30, 2008 at 5:51 PM, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: I vote for contrib/pg_freespacemap functions to be included in the core since FSM is in core. The old FSM was in core, too. That's not a helpful argument. In the absence

Re: [HACKERS] Bad error message

2008-09-30 Thread Gurjeet Singh
On Wed, Oct 1, 2008 at 3:07 AM, Decibel! [EMAIL PROTECTED] wrote: From -HEAD: ERROR: aggregates not allowed in WHERE clause STATEMENT: SELECT * FROM loans l WHERE id IN ( SELECT max(l.id) FROM loans

Re: [HACKERS] Bad error message

2008-09-30 Thread Gurjeet Singh
On Wed, Oct 1, 2008 at 9:39 AM, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: On Wed, Oct 1, 2008 at 3:07 AM, Decibel! [EMAIL PROTECTED] wrote: ERROR: aggregates not allowed in WHERE clause No, the real issue is that you are referencing the outer table's

Re: [HACKERS] Fwd: Has anyone built pgbash-7.3 against postgreSQL-8.3?

2008-10-01 Thread Gurjeet Singh
I think the -hackers subscribers list is a subset of -general subscribers; so this wasn't necessary. Any hackers out there who is not on general list? On Thu, Oct 2, 2008 at 4:24 AM, Darren Weber [EMAIL PROTECTED]wrote: I put the email below on the general list, without response. I hope it

Re: [HACKERS] [GENERAL] Transactions within a function body

2008-10-02 Thread Gurjeet Singh
On Thu, Oct 2, 2008 at 8:40 PM, Alvaro Herrera [EMAIL PROTECTED]wrote: Reg Me Please escribió: Il Thursday 02 October 2008 16:15:10 Alvaro Herrera ha scritto: You can nest blocks arbitrarily, giving you the chance to selectively rollback pieces of the function. It's only a bit more

Re: [HACKERS] DEFAULT of domain ignored in plpgsql (8.4.1)

2009-11-21 Thread Gurjeet Singh
On Sat, Nov 21, 2009 at 7:26 AM, Josh Berkus j...@agliodbs.com wrote: Would a patch that changes that have any chance of being accepted? Or is the gain (not having to repeat the DEFAULT clause, and being able to maintain it at one place instead of many) considered too small compared to

Re: [HACKERS] Need a mentor, and a project.

2009-12-16 Thread Gurjeet Singh
2009/12/16 decibel deci...@decibel.org On Dec 11, 2009, at 8:44 PM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Ashish wrote: I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts

Re: [HACKERS] XLogInsert

2009-12-16 Thread Gurjeet Singh
2009/12/15 Greg Smith g...@2ndquadrant.com Jaime Casanova wrote: So in this extreme case avg tps is just 6 transactions better Great job trying to find the spot where the code worked better. I'm not so sure I trust pgbench results where the TPS was so low though. Which leads us right

[HACKERS] Re-enabling SET ROLE in security definer functions

2009-12-31 Thread Gurjeet Singh
, 2009 at 9:00 PM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh gurjeet.si...@enterprisedb.com writes: SET ROLE is safe in any context since it can be used to switch to only to those roles that the Session User is a member of, whereas SET SESSION AUTHORIZATION is unsafe since it can

[HACKERS] Security vulnerability regarding SET ROLE and REINDEX

2009-12-31 Thread Gurjeet Singh
...@sss.pgh.pa.us wrote: Gurjeet Singh gurjeet.si...@enterprisedb.com writes: SET ROLE is safe in any context since it can be used to switch to only to those roles that the Session User is a member of, whereas SET SESSION AUTHORIZATION is unsafe since it can be used to switch to any role

Re: [HACKERS] Re-enabling SET ROLE in security definer functions

2009-12-31 Thread Gurjeet Singh
On Thu, Dec 31, 2009 at 10:36 PM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh singh.gurj...@gmail.com writes: We are seeking to enable SET ROLE in security-definer functions, since @ D.E Shaw there are scripts from the past that used this feature, and I think you'd also agree

Re: [HACKERS] Cancelling idle in transaction state

2010-01-01 Thread Gurjeet Singh
On Fri, Jan 1, 2010 at 8:38 PM, Robert Haas robertmh...@gmail.com wrote: On Jan 1, 2010, at 6:48 AM, Simon Riggs si...@2ndquadrant.com w We could either endlessly repeat this ERROR: current transaction is aborted because of conflict with recovery, commands ignored until end of transaction

Re: [HACKERS] [BUGS] log : bad file dscriptor????

2010-03-11 Thread Gurjeet Singh
On Wed, Mar 18, 2009 at 3:47 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Gurjeet Singh wrote: On Windows, the write to log file is done by a thread (whose main function is pipeThread() ), and since it works completely independent of the SysLoggerMain() ( which

[HACKERS] Repeating Append operation

2010-03-19 Thread Gurjeet Singh
Hi all, explain select v from ( select array( select 1 union all select 2) as v from (select 1) ) as s where v is not null; The plan looks like: QUERY PLAN Result (cost=0.08..0.10 rows=1

Re: [HACKERS] Repeating Append operation

2010-03-23 Thread Gurjeet Singh
On Sun, Mar 21, 2010 at 4:29 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 19, 2010 at 2:09 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: Is there a way to avoid this double evaluation? Maybe with a CTE? WITH x AS (...) SELECT ... It does look like surprising behavior

[HACKERS] GUCs that need restart

2010-05-04 Thread Gurjeet Singh
There are quite a few GUC parameters that need restart. Is there a way we can avoid some of them needing restart? I am specifically looking at archive_mode and the new wal_level. From my limited understanding, these parameters need restart because in a running cluster we cannot safely change

Re: [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-04-10 Thread Gurjeet Singh
PROTECTED] gmail | hotmail | yahoo }.com 17°29'34.37N 78°30'59.76E - Hyderabad 18°32'57.25N 73°56'25.42E - Pune * On 4/6/07, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: Please find attached the latest version of the patch. It applies cleanly on REL8_2_STABLE

Re: [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-04-12 Thread Gurjeet Singh
On 4/12/07, Bruce Momjian [EMAIL PROTECTED] wrote: Gurjeet Singh wrote: The interface etc. may not be beautiful, but it isn't ugly either! It is a lot better than manually creating pg_index records and inserting them into cache; we use index_create() API to create the index (build

Re: [HACKERS] [COMMITTERS] pgsql: Create hooks to let a loadable plugin monitor (or even replace)

2007-05-29 Thread Gurjeet Singh
On 5/30/07, Tom Lane [EMAIL PROTECTED] wrote: Bruce Momjian [EMAIL PROTECTED] writes: Gurjeet Singh wrote: But I did not understand the haste to commit the patch within almost half an hour of proposing the second version of the patch!!! It happens some times when a patch applier has gotten

[HACKERS] Index adviser or just [pg_]adviser

2007-06-08 Thread Gurjeet Singh
I am done with refactoring the Index adviser code to make use of the current planner hooks, and as part of this drive I was thinking of changing the name of the feature/plugin too. Since there's a possibility that the same architecture can be used by other types of adviser plugins

Re: [HACKERS] TODO item: Allow more complex user/database default GUC settings

2009-09-21 Thread Gurjeet Singh
On Tue, Sep 22, 2009 at 4:16 AM, Bernd Helmle maili...@oopsware.de wrote: --On 21. September 2009 13:42:21 +0200 Bernd Helmle maili...@oopsware.de wrote: --On 20. September 2009 22:56:53 -0400 Robert Haas robertmh...@gmail.com wrote: So is this ready to commit, or what? Not yet,

Re: [HACKERS] Rejecting weak passwords

2009-09-29 Thread Gurjeet Singh
On Tue, Sep 29, 2009 at 4:49 AM, Tom Lane t...@sss.pgh.pa.us wrote: Josh Berkus j...@agliodbs.com writes: Hmmm, that would be a useful, easy (I think) security feature: add a GUC for failed_logins_allowed. And the counts would be tracked and enforced where? Combining this with other

Re: [HACKERS] Third thoughts about the DISTINCT MAX() problem

2008-03-28 Thread Gurjeet Singh
On Sat, Mar 29, 2008 at 3:21 AM, Tom Lane [EMAIL PROTECTED] wrote: I just realized that the patch I applied here http://archives.postgresql.org/pgsql-committers/2008-03/msg00531.php for Taiki Yamaguchi's bug report here http://archives.postgresql.org/pgsql-bugs/2008-03/msg00275.php really

Re: [HACKERS] [GENERAL] Can Postgres 8.x start if some disks containing tablespaces are not mounted?

2008-03-31 Thread Gurjeet Singh
On Mon, Mar 31, 2008 at 11:40 PM, Tom Lane [EMAIL PROTECTED] wrote: Morris Goldstein [EMAIL PROTECTED] writes: Suppose I have a database with $PGDATA on /dev/sda, and a tablespace directory on /dev/sdb. Will Postgres start successfully if /dev/sda is mounted and /dev/sdb is not? If not,

Re: [HACKERS] [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)

2008-04-06 Thread Gurjeet Singh
On Sun, Sep 9, 2007 at 4:16 AM, apoc9009 [EMAIL PROTECTED] wrote: No! Actually I'm wearing my tin hat right now and I Never say Anything about My Suspicions about 9/11 on Internet in fear of Echelon catching and filing me. --- Hannu hmm, a little bit Para?

Re: [HACKERS] Regression test fails when BLCKSZ is 1kB

2008-04-22 Thread Gurjeet Singh
On Tue, Apr 22, 2008 at 4:25 PM, Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Tue, Apr 22, 2008 at 10:31:53AM +0200, Zdenek Kotala wrote: When you are able detect ordering difference you are able also check if it is important for the test or not without any extra effort. Only what we

Re: [HACKERS] Per-table random_page_cost for tables that we know are always cached

2008-04-22 Thread Gurjeet Singh
On Wed, Apr 23, 2008 at 12:11 AM, Decibel! [EMAIL PROTECTED] wrote: On Apr 22, 2008, at 5:13 AM, PFC wrote: In order to have it use the fast plan I must set random_page_cost to 1 which I absolutely don't want to do. Setting effective_cache_size to huge values has no effect. If I select

[HACKERS] RECORD.* doesn't work in Pl/PGSQL

2008-04-22 Thread Gurjeet Singh
RECORD.* doesn't work in plpgsql, but NEW.* and OLD.* do in trigger functions created in plpgsql. The example function process_emp_audit() on page http://www.postgresql.org/docs/8.3/interactive/plpgsql-trigger.html , shows that we can use OLD.* and NEW.* as: INSERT INTO emp_audit SELECT 'D',

Re: [HACKERS] RECORD.* doesn't work in Pl/PGSQL

2008-04-23 Thread Gurjeet Singh
On Wed, Apr 23, 2008 at 4:20 AM, Merlin Moncure [EMAIL PROTECTED] wrote: On Tue, Apr 22, 2008 at 4:10 PM, Gurjeet Singh [EMAIL PROTECTED] wrote: RECORD.* doesn't work in plpgsql, but NEW.* and OLD.* do in trigger functions created in plpgsql. The example function process_emp_audit

Re: [HACKERS] Protection from SQL injection

2008-04-29 Thread Gurjeet Singh
On Wed, Apr 30, 2008 at 1:48 AM, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, For PostgreSQL the 'disable literals' feature would be great publicity: 'publicity' is something this community does not crave for, at least not feature wise. If that were the case we would have had a million

[HACKERS] Optimizer sorting an already sorted result

2008-04-29 Thread Gurjeet Singh
In the plan below, we can see that the optimizer is sorting an already sorted result. It seems to forget the sort order across the UNIQUE node. My question is, do we make any attempts in the optimizer to remember the sort order of a result, to avoid any further sorting on same sort-key? If not,

[HACKERS] pg_standby issue

2008-04-30 Thread Gurjeet Singh
I just saw this issue... so though of reporting it before I have to get rid of the environment. I `touch`d the trigger file and I saw the following message: Trigger file: /tmp/pg_standby.trigger.5444 Waiting for WAL file: 0001000B00F2 WAL file path :

Re: [HACKERS] Protection from SQL injection

2008-04-30 Thread Gurjeet Singh
On Wed, Apr 30, 2008 at 8:52 PM, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, Constants are just convenience: instead of constants, user defined functions can be used. This already works, however it's a bit verbose: CREATE FUNCTION STATE_ACTIVE() RETURNS VARCHAR AS $$ BEGIN RETURN

Re: [HACKERS] Protection from SQL injection

2008-04-30 Thread Gurjeet Singh
On Wed, Apr 30, 2008 at 10:58 PM, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: Maybe we can extend the SQL's WITH clause do declare the constant along with the query, and not separate from the query. WITH CONSTANT c_jobrole = 'clerk', CONSTANT c_dept = 10

[HACKERS] TidScan needs handling of a corner cases

2008-04-30 Thread Gurjeet Singh
Hi All, I noticed that the TidScan fails to identify when the requested block is not in the relation. Consider this (pg_class has 6 blocks): postgres=# explain analyze select ctid, * from pg_class where ctid in ( '(6,1)' ); ERROR: could not read block 6 of relation 1663/11511/1259: read

[HACKERS] Confusing message in log file

2008-05-14 Thread Gurjeet Singh
Hi All, I changed the postgresql.conf file (of an 8.2.4 server), and issued relaod using pg_reload_config(). Following are the messages I see in the log files: May 14 21:38:40 sfphotodb001 postgres[29658]: [19-1] 2008-05-14 21:38:40 PDTLOG: received SIGHUP, reloading configuration files May

Re: [HACKERS] pg_standby for 8.2 (with last restart point)

2008-05-15 Thread Gurjeet Singh
On Fri, Mar 28, 2008 at 10:30 AM, Gurjeet Singh [EMAIL PROTECTED] wrote: I am still looking for comments on the correctness of this script and above mentioned procedure for running it on an 8.2.x release. Well, I came across a serious bug in the script. Here's the corrected version

[HACKERS] Random order of archiving files

2008-05-23 Thread Gurjeet Singh
Hi All, Can this random order in archival of files be explained? grep archived /var/log/localmessages 2008-05-23 08:43:43 PDTLOG: archived transaction log file 000109BD009D 2008-05-23 08:44:41 PDTLOG: archived transaction log file 000109BD00A0 - 9D and 9F

[HACKERS] Does 'ALTER INDEX' take exclusive lock?

2008-05-24 Thread Gurjeet Singh
Hi All, Does the command ALTER INDEX take exclusive lock on the objects involved? Specifically I am looking at ALTER INDEX ... SET TABLESPACE. The docs do not mention anything about this. I assume it would, and can do a few tests (or look at code :) ), but asking here wouldn't hurt! Best

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-05-30 Thread Gurjeet Singh
On Fri, May 30, 2008 at 10:40 AM, Tom Lane [EMAIL PROTECTED] wrote: But since you mention it: one of the plausible answers for fixing the vacuum problem for read-only slaves is to have the slaves push an xmin back upstream to the master to prevent premature vacuuming. The current design of

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-05-30 Thread Gurjeet Singh
On Thu, May 29, 2008 at 7:42 PM, Tom Lane [EMAIL PROTECTED] wrote: The big problem is that long-running slave-side queries might still need tuples that are vacuumable on the master, and so replication of vacuuming actions would cause the slave's queries to deliver wrong answers. Another

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-05-30 Thread Gurjeet Singh
On Sat, May 31, 2008 at 1:52 AM, Greg Smith [EMAIL PROTECTED] wrote: On Fri, 30 May 2008, Andreas 'ads' Scherbaum wrote: Then you ship 16 MB binary stuff every 30 second or every minute but you only have some kbyte real data in the logfile. Not if you use pg_clearxlogtail (

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-05-30 Thread Gurjeet Singh
On Sat, May 31, 2008 at 3:41 AM, Greg Smith [EMAIL PROTECTED] wrote: On Sat, 31 May 2008, Gurjeet Singh wrote: Not if you use pg_clearxlogtail This means we need to modify pg_standby to not check for filesize when reading XLogs. No, the idea is that you run the segments through

Re: [HACKERS] Confusing message in log file

2008-07-01 Thread Gurjeet Singh
On Mon, Jun 30, 2008 at 7:33 PM, Tom Lane [EMAIL PROTECTED] wrote: Alvaro Herrera [EMAIL PROTECTED] writes: In any case, this seems a case of stuffing too much in the primary message. Yeah, good point. I think it should be something like errmsg(parameter \shared_buffer\ change in

[HACKERS] Postgres 8.1 doesn't like pg_standby's -l option

2008-07-10 Thread Gurjeet Singh
I was trying to set up warm standby for an 8.1.11 instance, and was using pg_standby's -l option so that it creates links and does not actually copies files. After struggling for a few hours, I found two problems; one big, one small. The smaller issue is that even if we do not end the

[HACKERS] Load spikes on 8.1.11

2008-07-17 Thread Gurjeet Singh
Hi All, I have been perplexed by random load spikes on an 8.1.11 instance. many a times they are random, in the sense we cannot tie a particular scenario as the cause for it! But a few times we can see that when we are executing huge scripts, which include DDL as well as DML, the load on the

Re: [HACKERS] Load spikes on 8.1.11

2008-07-17 Thread Gurjeet Singh
Just an addition... the strace o/p with selects timing out just runs almost continuously, it doesn't seem to pause anywhere! On Fri, Jul 18, 2008 at 9:16 AM, Gurjeet Singh [EMAIL PROTECTED] wrote: Hi All, I have been perplexed by random load spikes on an 8.1.11 instance. many a times

Re: [HACKERS] Load spikes on 8.1.11

2008-07-17 Thread Gurjeet Singh
On Fri, Jul 18, 2008 at 9:58 AM, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: During these spikes, in the 'top' sessions we see the 'idle' PG processes consuming between 2 and 5 % CPU, and since the box has 8 CPUS (2 sockets and each CPU is a quad core

Re: [HACKERS] Load spikes on 8.1.11

2008-07-17 Thread Gurjeet Singh
On Fri, Jul 18, 2008 at 10:05 AM, Gurjeet Singh [EMAIL PROTECTED] wrote: On Fri, Jul 18, 2008 at 9:58 AM, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: During these spikes, in the 'top' sessions we see the 'idle' PG processes consuming between 2 and 5 % CPU

Re: [HACKERS] Load spikes on 8.1.11

2008-07-17 Thread Gurjeet Singh
On Fri, Jul 18, 2008 at 10:21 AM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Fri, Jul 18, 2008 at 10:05:33AM +0530, Gurjeet Singh wrote: I just ran DROP SCHEMA _slony schema CASCADE; and it spiked again, on a very low loaded box!! Ah, well, if slony is involved, then you have possible

Re: [HACKERS] Load spikes on 8.1.11

2008-07-18 Thread Gurjeet Singh
On Fri, Jul 18, 2008 at 7:15 PM, David Fetter [EMAIL PROTECTED] wrote: On Fri, Jul 18, 2008 at 10:15:42AM +0530, Gurjeet Singh wrote: On Fri, Jul 18, 2008 at 10:05 AM, Gurjeet Singh [EMAIL PROTECTED] wrote: On Fri, Jul 18, 2008 at 9:58 AM, Tom Lane [EMAIL PROTECTED] wrote

Re: [HACKERS] Load spikes on 8.1.11

2008-07-21 Thread Gurjeet Singh
On Tue, Jul 22, 2008 at 1:29 AM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Sat, Jul 19, 2008 at 07:09:46AM +0530, Gurjeet Singh wrote: Will try this option, at least in the next schema upgrade or when setting up Slony. As I've already suggested, however, if you try to set up slony

Re: [HACKERS] Spoofing as the postmaster

2007-12-22 Thread Gurjeet Singh
On Dec 22, 2007 6:25 AM, Bruce Momjian [EMAIL PROTECTED] wrote: It is possible for the attacker to use one of the interfaces (tcp or unix domain) and wait for the postmaster to start. The postmaster will fail to start on the interface in use but will start on the other interface and the

[HACKERS] ERROR during WAL replay

2008-01-12 Thread Gurjeet Singh
Hi All, We were trying to move a big database from one machine to the other using PITR mechanism. We hit the following LOG message in during the recovery (WAL replay) process LOG: incorrect resource manager data checksum in record at 111/A7738C8 I had used this procedure to do such

[HACKERS] IDLE and waiting

2008-01-31 Thread Gurjeet Singh
Hi guys, I saw a strange behaviour on one of the production boxes. The pg_stat_activity shows a process as IDLE and yet 'waiting' !!! On top of it (understandably, since its IDLE), there are no entries for this pid in pg_locks! Following are the snapshots of the two system views.

Re: [HACKERS] IDLE and waiting

2008-02-01 Thread Gurjeet Singh
| 2008-02-01 13:36:15.31027-08 11975 | select * from pg_stat_activity ; | f | -00:01: 52.554697 | 2008-02-01 13:30:40.396392-08 (2 rows) Clearly, there's something wrong On Feb 1, 2008 8:16 AM, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: I saw

Re: [HACKERS] IDLE and waiting

2008-02-01 Thread Gurjeet Singh
On Feb 1, 2008 3:56 PM, Tom Lane [EMAIL PROTECTED] wrote: Gurjeet Singh [EMAIL PROTECTED] writes: The situation seems pretty bad!! I think at least part of your problem is not understanding that a single transaction sees a frozen snapshot of pg_stat_activity. It does! I assumed

[HACKERS] Problem with site doc search

2008-02-02 Thread Gurjeet Singh
Hi All, I just noticed a minor bug in our search results. Searching for is_insteadbool in 8.3 docs returns the following page: http://www.postgresql.org/docs/8.3/static/catalog-pg-rewrite.html is_instead is a column, and bool is the datatype, both mentioned in different columns. I know

Re: [HACKERS] IDLE and waiting

2008-02-02 Thread Gurjeet Singh
On Feb 2, 2008 2:28 PM, Tom Lane [EMAIL PROTECTED] wrote: I wrote: Gurjeet Singh [EMAIL PROTECTED] writes: I saw a strange behaviour on one of the production boxes. The pg_stat_activity shows a process as IDLE and yet 'waiting' !!! On top of it (understandably, since its IDLE

Re: [HACKERS] IDLE and waiting

2008-02-02 Thread Gurjeet Singh
On Feb 2, 2008 3:27 PM, Alvaro Herrera [EMAIL PROTECTED] wrote: Gurjeet Singh escribió: I just looked at the patch... Isn't PG_TRY() an expensive call to make in the lock.c code? I was thinking of registering a Xact callback using RegisterXactCallback() and performing 'waiting' reset

[HACKERS] Wrong query examples in docs

2008-02-02 Thread Gurjeet Singh
http://www.postgresql.org/docs/8.2/interactive/indexes-opclass.html The examples given at the end of this page do not work in 8.2.4. I referred the 8.3 docs, and the examples there work fine for 8.2.4 db. Best regards, -- [EMAIL PROTECTED] [EMAIL PROTECTED] gmail | hotmail | indiatimes | yahoo

Re: [HACKERS] Wrong query examples in docs

2008-02-02 Thread Gurjeet Singh
Sorry for the noise I am using SCREEN sessoins, and confused the session I was in. Sorry again... On Feb 2, 2008 9:05 PM, Gurjeet Singh [EMAIL PROTECTED] wrote: http://www.postgresql.org/docs/8.2/interactive/indexes-opclass.html The examples given at the end of this page do not work

[HACKERS] Reverse key index

2008-02-03 Thread Gurjeet Singh
Hi All, I have wanted to create a reverse key index for some time now, and it seems that an evening of reading and half a day of efforts finally paid off. This is just a proof of concept, and sure, the bit-reversing technique can use a native language's power for better results. I

Re: [HACKERS] Problem with site doc search

2008-02-04 Thread Gurjeet Singh
Hi guys any updates on this? Pinging you just so that we do not forget it in the heap of mails in our inboxes. Best regards, On Feb 3, 2008 8:40 AM, Magnus Hagander [EMAIL PROTECTED] wrote: Oleg Bartunov wrote: On Sat, 2 Feb 2008, Gurjeet Singh wrote: Hi All, I just noticed

[HACKERS] Patch to update libpqxx's homepage in README

2008-02-10 Thread Gurjeet Singh
libpqxx seems to have moved around quite a bit. The attached patch corrects libpqxx's homepage. Best regards, -- [EMAIL PROTECTED] [EMAIL PROTECTED] gmail | hotmail | indiatimes | yahoo }.com EnterpriseDB http://www.enterprisedb.com 17° 29' 34.37N, 78° 30' 59.76E - Hyderabad 18° 32'

Re: [HACKERS] could not open relation 1663/16384/16584: No such file or directory in a specific combination of transactions with temp tables

2008-02-29 Thread Gurjeet Singh
Plausible theory, and nice explanation Try the following link (I had to wait for 50 sec for the link to appear, but I guess the trade-off of getting knowledge in return is worth it :) ) http://www5.upload2.net/download/77fa86e16a02e52fd5439c76e148d231/47c7fdce/rfsLfnuVlYjEcCJ/basetables.tgz

  1   2   3   4   5   >