Re: [HACKERS] try to find out the checkpoint record?

2004-03-14 Thread Tatsuo Ishii
Is it worth worrying about? I don't recall that we've ever heard of a loss-of-pg_control failure in the field. Certainly it *could* happen, but I can gin up plenty of implausible scenarios where scanning pg_xlog for a checkpoint would give the wrong answer as well. (Our habit of recycling

Re: [HACKERS] libpq thread safety

2004-03-14 Thread Manfred Spraul
Bruce Momjian wrote: Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. You are too fast: the patch was a proof of concept, not really tested (actually quite buggy).

Re: [HACKERS] Further thoughts about warning for costly FK checks

2004-03-14 Thread Richard Huxton
On Sunday 14 March 2004 00:16, Tom Lane wrote: Call me crazy, but maybe we have to throw a message for primary key lookups on foreign key tables without indexes. I hate to throw a message on update/delete rather than create table, but I don't see another way. I don't think that will

[HACKERS] listening addresses

2004-03-14 Thread Andrew Dunstan
[removing to hackers as it is of general interest] Tom Lane wrote: Andrew Dunstan wrote: That seems to me to get as close as reasonably possible to the Unix behaviour. I don't think that always allowing localhost connections on Windows is a big security risk. Is it a big security

Re: [HACKERS] libpq thread safety

2004-03-14 Thread Manfred Spraul
Bruce Momjian wrote: How can we test if libpq needs to call that? Seems that is an issue whether we are threaded or not, no? I think it's always an issue: in the non-threaded case, it's just not fatal. At least some openssl init functions are protected with if (done) return; done = 1;, and

Re: [HACKERS] Log rotation

2004-03-14 Thread Fernando Nasser
Lamar Owen wrote: On Saturday 13 March 2004 10:36 am, Fernando Nasser wrote: The problem is that sysloging has more overhead than a plain append to a file. There are some very strict response time AppServer applications where we want to keep this things out of the picture. Well, I have a

Re: [HACKERS] Log rotation

2004-03-14 Thread Fernando Nasser
Lamar Owen wrote: On Saturday 13 March 2004 01:00 pm, Fernando Nasser wrote: There are some applicatons which run in servers with very strict response times and any syscall, network packet that can be saved counts. Ok, what about pipe overhead? If we're gong to split hairs, let's split all of

Re: [HACKERS] Log rotation

2004-03-14 Thread Tom Lane
Fernando Nasser [EMAIL PROTECTED] writes: Lamar Owen wrote: Third, it seems that you don't have enough profiling data to support a 'syslog is bad' position. That is true. It is from hearsay, from people who run production environments. It may be a belief based on old experiences though.

Re: [HACKERS] try to find out the checkpoint record?

2004-03-14 Thread Tom Lane
Tatsuo Ishii [EMAIL PROTECTED] writes: What's wrong with improving one of fragile parts of the system? My opinion is that pg_control is the *least* fragile part of the logging datastructures. If we had infinite manpower, I'd say sure, go implement a fallback mechanism for pg_control. But we

Re: [HACKERS] listening addresses

2004-03-14 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: This slipped off my radar. I have just spent a little while thinking about it. How about this: we replace tcpip_socket and virtual_host with a new var called listen_addresses, which can have values of local, all, or a list of addresses? The default

Re: [HACKERS] Log rotation

2004-03-14 Thread Robert Treat
On Sunday 14 March 2004 12:19, Tom Lane wrote: Fernando Nasser [EMAIL PROTECTED] writes: Lamar Owen wrote: Third, it seems that you don't have enough profiling data to support a 'syslog is bad' position. That is true. It is from hearsay, from people who run production environments.

Re: [HACKERS] Log rotation

2004-03-14 Thread Bruce Momjian
Tom Lane wrote: Fernando Nasser [EMAIL PROTECTED] writes: Lamar Owen wrote: Third, it seems that you don't have enough profiling data to support a 'syslog is bad' position. That is true. It is from hearsay, from people who run production environments. It may be a belief based on

Re: [HACKERS] Log rotation

2004-03-14 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: What versions of syslog fsync, and where is the syslog.conf option. I don't see it on FreeBSD or Linux. It's a per-output-file option. My Linux manpage for syslogd quoth The - may only be used to prefix a filename if you want to omit

Re: [HACKERS] Log rotation

2004-03-14 Thread John Hansen
My $0.02 worth: syslog-ng :) Regards, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruce Momjian Sent: Monday, March 15, 2004 5:50 AM To: Tom Lane Cc: Fernando Nasser; Lamar Owen; [EMAIL PROTECTED] Subject: Re: [HACKERS] Log rotation Tom Lane

Re: [HACKERS] Log rotation

2004-03-14 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: What versions of syslog fsync, and where is the syslog.conf option. I don't see it on FreeBSD or Linux. It's a per-output-file option. My Linux manpage for syslogd quoth The - may only be used to prefix a filename if you

Re: [HACKERS] Log rotation

2004-03-14 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: I wonder if this fsync for PostgreSQL messages is some change made to Linux syslog. You're missing the point: by default syslog fsyncs *all* messages. You can turn this off on a per-output-file basis by putting - on the desired lines of the syslog config

[HACKERS] Patch for: 7.4.2 build broken on Solaris 7 and 8 with --enable-thread-safety

2004-03-14 Thread Jim Seymour
Hi All, The following patch fixes building PostgreSQL 7.4.2 under Sun (Sparc) Solaris 7 and 8 (possibly earlier and later versions, as well) with --enable-thread-safety. The first addresses what would appear to be a coding error in thread.c. The second ensures the proper pthread function call

Re: [HACKERS] Log rotation

2004-03-14 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: I wonder if this fsync for PostgreSQL messages is some change made to Linux syslog. You're missing the point: by default syslog fsyncs *all* messages. You can turn this off on a per-output-file basis by putting - on the desired

Re: [HACKERS] Log rotation

2004-03-14 Thread Tom Lane
I wrote: strace'ing syslogd on my HPUX box shows that it doesn't issue explicit fsync calls either, but I don't know of any way to tell whether it's got the log files opened O_SYNC. It occurred to me to SIGHUP syslogd and watch it reopen its log files with strace. No O_SYNC. So it seems

Re: [HACKERS] Log rotation

2004-03-14 Thread Andrew Dunstan
Fernando Nasser wrote: Lamar Owen wrote: I am not opposed to including a small logrotator for stderr logging. I just think it is redundant when a good highly configurable logging facility already exists. But, if Red Hat wants to pay Tom to do it... :-) Maybe it is a question of

Re: [HACKERS] Log rotation

2004-03-14 Thread Manfred Spraul
Bruce Momjian wrote: Which basically shows one fsync, no O_SYNC's, and setting of the flag only for klog reads. Which sysklogd do you look at? The version from RedHat 9 contains this block: /* * Crack a configuration file line */ void cfline(line, f) char *line; register

[HACKERS] Remaining platform dependencies in float stuff

2004-03-14 Thread Tom Lane
Even after Neil's recent round of fixes, I'm still seeing regression failures in the float tests on HPUX. Some investigation reveals the cause: the current float.c code assumes that HUGE_VAL is an IEEE Infinity. On HPUX it is just the largest normal double value: # define HUGE_VAL

Re: [HACKERS] Log rotation

2004-03-14 Thread Bruce Momjian
Manfred Spraul wrote: Bruce Momjian wrote: Which basically shows one fsync, no O_SYNC's, and setting of the flag only for klog reads. Which sysklogd do you look at? The version from RedHat 9 contains this block: I looked on NetBSD, FreeBSD, and BSD/OS. -- Bruce Momjian

Re: [HACKERS] Patch for: 7.4.2 build broken on Solaris 7 and 8 with

2004-03-14 Thread Bruce Momjian
I have updated the solaris template file in CVS HEAD and 7.4.X to reflect your changes. I had already fixed the thread.c typo. Thanks. --- Jim Seymour wrote: Hi All, The following patch fixes building PostgreSQL 7.4.2

[HACKERS] Custom format for pg_dumpall

2004-03-14 Thread Christopher Kings-Lynne
Hi, Why is there no custom format dump option for pg_dumpall? What if I want to use pg_dumpall to dump all db's and blobs? Or if I want to have a huge sql dump from which I can easily exract the sql to recreate just one table? Chris ---(end of