Re: [HACKERS] PostgreSQL win32 NT4

2006-01-13 Thread pmagnoli
NT4 is officially dead, IMHO no need for PostgreSQL to officially support it,
let's leave place for companies offering commercial postgresql versions to
work on it if they have enough customer requests.
BTW Win 2000 is more or less 6 years old now ...
Regards

Paolo

Magnus Hagander [EMAIL PROTECTED] ha scritto

 Hi!
 
 I'm looking at a way to fix the issues with admin privileges on Win32
 - specifically by finding a way to give up all admin stuff before the
 server starts, when possible (and otherwise fail just as today).
 
 I think I can do this. However, it is not possible to do this in a way
 that's compatible with NT4. The APIs werent' created then. So from this,
 I see two ways to proceed:
 
 1) Do it in a Windows 2000+ way. This will once and for all break
 compatibility with NT4 - pg simply will not work any more.
 
 2) Code around it by dynamically loading these functions when available.
 With this solution it will still run on NT4 - without this capability.
 It will however be quite a bit more code, since all the functions have
 to be loaded at runtime.
 
 
 
 Now (2) can be done, and it's not hugely much more code for this change.
 But the amount of places with issues will continue to go up, and
 eventually we're going to have to pull the plug, IMHO. The question is -
 is it time to do it now? Or do we wait until we hit a change that leaves
 us no choice at all?
 
 (Oh, and as everybody knows, NT4 isn't supported by Microsoft any more,
 see
 http://www.microsoft.com/ntserver/ProductInfo/Availability/Retiring.asp)
 
 
 Comments?
 
 //Magnus
 
 ---(end of broadcast)---
 TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq
 




---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [HACKERS] Why don't we allow DNS names in pg_hba.conf?

2006-01-02 Thread pmagnoli
Yes, it would be good to implement this. A warning about security and
(possible) slow connections due to name resolution issues should be placed in
the docs.
Regards

paolo

elein [EMAIL PROTECTED] ha scritto

 I also support this change.  My clients have tended to move
 machines and networks around a lot as well as move databases from machine
 to machine.  It would be nice to let the network gurus concentrate
 on getting the dns servers up and correct and leverage that
 work instead of having to change pg_hba.conf when these changes
 occur.
 
 elein
 [EMAIL PROTECTED]
 
 On Sun, Jan 01, 2006 at 01:30:46PM -0500, Tom Lane wrote:
  I was reminded of $subject by
  http://archives.postgresql.org/pgsql-admin/2006-01/msg2.php
  
  While I haven't tried it, I suspect that allowing a DNS host name
  would take little work (basically removing the AI_NUMERICHOST flag
  passed to getaddrinfo in hba.c).  There was once a good reason not
  to allow it: slow DNS lookups would lock up the postmaster.  But
  now that we do this work in an already-forked backend, with an overall
  timeout that would catch any indefinite blockage, I don't see a good
  reason why we shouldn't let people use DNS names.
  
  Thoughts?
  
  regards, tom lane
  
  ---(end of broadcast)---
  TIP 9: In versions below 8.0, the planner will ignore your desire to
 choose an index scan if your joining column's datatypes do not
 match
  
 
 ---(end of broadcast)---
 TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq
 




---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [HACKERS] HOOKS for Synchronous Replication?

2005-12-08 Thread pmagnoli
I can only add that patched code did not build on windows, contacted author
about that and never got an answer back.
Regards

paolo

Tom Lane [EMAIL PROTECTED] ha scritto

 Christopher Kings-Lynne [EMAIL PROTECTED] writes:
  Anyone remember this patch?
  http://gorda.di.uminho.pt/community/pgsqlhooks/
  The discussion seems to be pretty minimal:
  http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php
  Does anyone see a need to investigate it further?
 
 I had hoped to see some comments from the Slony people about it.
 I'd feel better about the validity of a set of hooks if more than
 one project agreed that it was useful/appropriate ...
 
   regards, tom lane
 
 ---(end of broadcast)---
 TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
 




---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[HACKERS] Tablespace on ramdisk

2005-11-21 Thread pmagnoli
Hi,
does anyone have experiences about putting a tablespace on ramdisk? Does it
work (and keep working after a restart of the server)?
Thanks in advance for any insight.

Paolo



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [HACKERS] Tablespace on ramdisk

2005-11-21 Thread pmagnoli
I'd like to mimic MySQL's in-memory tables (engine=memory), which structure
survives a server restart (data lost of course).
I suspected that a server restart would be a problem in this case.
Thank you anyway.

Paolo

Tino Wildenhain [EMAIL PROTECTED] ha scritto

 [EMAIL PROTECTED] schrieb:
  Hi,
  does anyone have experiences about putting a tablespace on ramdisk? Does
it
  work (and keep working after a restart of the server)?
  Thanks in advance for any insight.
  
 Yes it does work as long as you dont restart your server.
 Postgres does not appreciate disappearing cluster data.
 
 What are you trying to solve btw?
 
 ++Tino
 
 ---(end of broadcast)---
 TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
 




---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] MERGE vs REPLACE

2005-11-14 Thread pmagnoli
I think you translated it correctly, MySQL has another way of specifying this
which is INSERT ... ON DUPLICATE KEY UPDATE ...
(http://dev.mysql.com/doc/refman/5.0/en/insert.html)
Regards

Paolo

Jochem van Dieten [EMAIL PROTECTED] ha scritto

 On 11/13/05, Petr Jelinek wrote:
 
  I am really not db expert and I don't have copy of sql standard but you
  don't need to use 2 tables I think - USING part can also be subquery
  (some SELECT) and if I am right then you could simulate what REPLACE
  does because in PostgreSQL you are not forced to specify FROM clause in
  SELECT. So you could in theory do
  MERGE INTO tablename USING (SELECT 1 AS myid) ON (tablename.id = myid)
...

 I think the MySQL statement:
 REPLACE INTO table (pk, col1, col2, col3) VALUES (2, '-00-00', NULL,
3)

 would translate into the following MERGE statement:
 MERGE INTO table target
 USING (2 as pknew , NULL as col1new, NULL as col2new, 3 as col3new) source
 ON target.pknew = source.pk
 WHEN MATCHED THEN UPDATE SET col1 = col1new, col2 = col2new, col3 =
col3new
 WHEN NOT MATCHED THEN INSERT (pk, col1, col2, col3) VALUES (pknew,
 col1new, col2new, col3new)

 It might not be the most elegant solution, but I don't see why it won't
work.

 Jochem

 ---(end of broadcast)---
 TIP 4: Have you searched our list archives?

http://archives.postgresql.org
 




---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[HACKERS] Postgresql 8.1 XML2

2005-11-11 Thread pmagnoli
Hi all, I just installed PostgreSQL 8.1 win32 and didn't find option to
install contrib/xml2, is it available on win32? Shall I build it on my own?
Thanks in advance

Paolo



---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[HACKERS] Constraint exclusion, some questions

2005-09-29 Thread pmagnoli
Hi, I'm testing constraint exclusion on PostgreSQL 8.1 beta 1 on windows with
the GEOIP countries database and I have a few questions:

1. Can I say that an index created on the parent table is a global index,
an index that spans over data in all derived tables?
2. Can I say that an index created on any of the child or inheriting
table is a partition index, that spans data belonging that single table
only?
(explain plan seems to confirm that, just to be shure)
3. Constraint exclusion works (prunes child tables) only if your query
contains a condition based on the check constraint (say constraint A) and
it doesn't get the fact that the data requested lies just in one child table
if the condition is on another column (say constraint B), even if global
and partition indexes are present for constraint B

Based on that quick look it would be great to add the ability for the
optimizer to find the good child table from a global index, which would
make table partitioning or constraint exclusion even more effective.
Hope what I wrote makes sense.
Best regards

paolo



---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[HACKERS] Rendezvous/Bonjour broken in 8.1 beta

2005-09-08 Thread pmagnoli
Hi, I'm trying to compile Postgresql 8.1 beta on my own in mingw/windows.
I tried to compile it with --with-bonjour but it is looking for the wrong
file, it looks for DNSServiceDiscovery.h but Apple provides a file named
dns_sd.h (Bonjour SDK for windows as of May 5 2005), after renaming it
./configure went ok but make ended with errors:

...
In file included from postmaster.c:92:
d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:52:
error: syntax error before uint8_t
d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:53:
error: syntax error before int8_t
d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:54:
error: syntax error before uint16_t
d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:55:
error: syntax error before int16_t
postmaster.c:249: error: syntax error before errorCode
postmaster.c: In function `PostmasterMain':
postmaster.c:769: warning: implicit declaration of function
`DNSServiceRegistrationCreate'
postmaster.c:774: error: `DNSServiceRegistrationReply' undeclared (first use
in this function)
postmaster.c:774: error: (Each undeclared identifier is reported only once
postmaster.c:774: error: for each function it appears in.)
postmaster.c:774: error: syntax error before reg_reply
postmaster.c: At top level:
postmaster.c:1042: error: syntax error before errorCode
postmaster.c: In function `reg_reply':
postmaster.c:1043: warning: old-style parameter declaration
postmaster.c: At top level:
postmaster.c:1043: warning: 'reg_reply' defined but not used

is this supported on windows? Do you have any plans to restore this
function?
Thanks in advance. 



---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] Rendezvous/Bonjour broken in 8.1 beta

2005-09-08 Thread pmagnoli
Hi Andrew, you wrote:

 I don't recall ever hearing that this has been done.

bonjour is the new name of Apple's rendezvous technology, an old email
(http://archives.postgresql.org/pgsql-hackers/2005-05/msg00739.php) stated
that rendezvous support was working at least on macosx and windows, so I
tried.

We should not be renaming other people's files - if necessary we should 
adjust our configure tests and #include directives. But I guess you did 
that just to make some progress.

Yes, also keep in mind that I'm a programming illiterate and I was doing some
do it yourself tests 

What's on lines 52 .. 55 of that file?

Lines 51 and 52 are:
#ifndef _MSL_STDINT_H
typedef UINT8   uint8_t;

Thanks and best regards

paolo




---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings