Re: [HACKERS] question regarding pg_database.h and DatabaseRelationId

2006-04-18 Thread Martijn van Oosterhout
On Tue, Apr 18, 2006 at 12:45:27AM +0200, Peter Eisentraut wrote: Gevik Babakhani wrote: Could someone explain the numbering logic in naming the relations? There is none. The numbers are presumably assigned in some lowest-available manner, but over the years it has become pretty random.

Re: [HACKERS] Is full_page_writes=off safe in conjunction with

2006-04-18 Thread Hannu Krosing
Ühel kenal päeval, E, 2006-04-17 kell 17:14, kirjutas Bruce Momjian: Jim C. Nasby wrote: Are you going to back-patch this? If I understand correctly current behavior could mean people using PITR may have invalid backups. In the meantime, perhaps we should send an email to -annouce

Re: [HACKERS] Question on win32 semaphore simulation

2006-04-18 Thread Magnus Hagander
As I reviewed the win32/sema.c, there is some code that I am not clear, can anybody explain please? There is another problem related to concurrent operations on win32 sema. Say two processes are doing semop(+1) concurrently. Look at this code: /* Don't want the lock anymore

Re: [HACKERS] Is full_page_writes=off safe in conjunction with

2006-04-18 Thread Bruce Momjian
Hannu Krosing wrote: ?hel kenal p?eval, E, 2006-04-17 kell 17:14, kirjutas Bruce Momjian: Jim C. Nasby wrote: Are you going to back-patch this? If I understand correctly current behavior could mean people using PITR may have invalid backups. In the meantime, perhaps we should send an

Re: [HACKERS] how can i get the binary format of timestamp?

2006-04-18 Thread Tom Lane
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: timestamp is defined as int64 or float8, when it is defined as int64, it looks like timeval, first 32 bits for seconds,second 32 bits for usec. No, it's seconds times 100, not times 2^32. regards, tom lane

Re: [HACKERS] Question on win32 semaphore simulation

2006-04-18 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Looking at the code, it looks fairly complex to me. I don't really know how sysv semaphores are supposed to work, or how we use them, but perhaps the whole piece of code can be simplified? I'm not sure why the win32 port chose to emulate the SysV

Re: [HACKERS] Question on win32 semaphore simulation

2006-04-18 Thread Magnus Hagander
Looking at the code, it looks fairly complex to me. I don't really know how sysv semaphores are supposed to work, or how we use them, but perhaps the whole piece of code can be simplified? I'm not sure why the win32 port chose to emulate the SysV semaphore interface anyway. You

Re: [HACKERS] CVS tags

2006-04-18 Thread Jim C. Nasby
On Mon, Apr 17, 2006 at 03:43:11PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: I finally got around to looking at adding $PostgreSQL$ tags to all files in the repository. Um, surely most of the ones that should have such tags already do. (contrib might be a glaring weak

Re: [HACKERS] CVS tags

2006-04-18 Thread Marc G. Fournier
On Tue, 18 Apr 2006, Jim C. Nasby wrote: On Mon, Apr 17, 2006 at 03:43:11PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: I finally got around to looking at adding $PostgreSQL$ tags to all files in the repository. Um, surely most of the ones that should have such tags

Re: [HACKERS] Corrupt data pages...

2006-04-18 Thread Tom Lane
Kevin Brown [EMAIL PROTECTED] writes: I'll put the files on a web server and post links to them here. You can find them here: https://gazebo.sysexperts.com/~kevin/postgresql AFAICT, the first half of page 73 is OK, but the second half clearly is trashed. In the raw-format dump it does

Re: [HACKERS] Is full_page_writes=off safe in conjunction with

2006-04-18 Thread Joshua D. Drake
On Tue, 2006-04-18 at 08:44 -0400, Bruce Momjian wrote: Hannu Krosing wrote: ?hel kenal p?eval, E, 2006-04-17 kell 17:14, kirjutas Bruce Momjian: Jim C. Nasby wrote: Are you going to back-patch this? If I understand correctly current behavior could mean people using PITR may have

Re: [HACKERS] Summer of Code

2006-04-18 Thread Mark Wong
Josh Berkus wrote: Jonah, Where do we stand on this? Google sent me the docs on this year's SoC literally 2 hours ago. I need to read through them and start trying to connect mentors and students and projects. Do you think a proposal to work on a TPC-App (Java) and TPC-E (next

Re: [HACKERS] Google SoC--Idea Request

2006-04-18 Thread Mark Wong
Jim C. Nasby wrote: On Sat, Apr 15, 2006 at 03:05:20PM -0400, Jonah H. Harris wrote: All ideas welcome! I know it's not directly PostgreSQL related, but I'd love to see the dbt* code improved. Items on my wish-list: - make it easy to run the test framework and clients on a seperate machine

Re: [HACKERS] Google SoC--Idea Request

2006-04-18 Thread Jim C. Nasby
On Tue, Apr 18, 2006 at 11:27:40AM -0700, Mark Wong wrote: Jim C. Nasby wrote: On Sat, Apr 15, 2006 at 03:05:20PM -0400, Jonah H. Harris wrote: All ideas welcome! I know it's not directly PostgreSQL related, but I'd love to see the dbt* code improved. Items on my wish-list: - make it

Re: [HACKERS] Google SoC--Idea Request

2006-04-18 Thread Jonah H. Harris
On 4/18/06, Jim C. Nasby [EMAIL PROTECTED] wrote: On Tue, Apr 18, 2006 at 11:27:40AM -0700, Mark Wong wrote: Jim C. Nasby wrote: On Sat, Apr 15, 2006 at 03:05:20PM -0400, Jonah H. Harris wrote: All ideas welcome! I know it's not directly PostgreSQL related, but I'd love to see the

Re: [HACKERS] Google SoC--Idea Request

2006-04-18 Thread Mark Wong
Jonah H. Harris wrote: On 4/18/06, Jim C. Nasby [EMAIL PROTECTED] wrote: On Tue, Apr 18, 2006 at 11:27:40AM -0700, Mark Wong wrote: Jim C. Nasby wrote: On Sat, Apr 15, 2006 at 03:05:20PM -0400, Jonah H. Harris wrote: All ideas welcome! I know it's not directly PostgreSQL related, but I'd

Re: [HACKERS] Corrupt data pages...

2006-04-18 Thread Kevin Brown
Tom Lane wrote: It's fairly hard to see how that could happen inside Postgres. One can readily imagine bugs that might replace one whole page with another, but there aren't any operations that manipulate half-a-page. On the other hand, if your kernel uses 4K blocksize, this could be

Re: [HACKERS] Strange results from to_timestamp

2006-04-18 Thread Bruce Momjian
Mario Weilguni wrote: to_timestamp is only for Oracle compatibility? I always thought it's some sort of sql standard. What's the sql compliant way to do this? There isn't a standard method, which is why we added Oracle functions.

Re: [HACKERS] Question on win32 semaphore simulation

2006-04-18 Thread Qingqing Zhou
Magnus Hagander [EMAIL PROTECTED] wrote I'm not sure why the win32 port chose to emulate the SysV semaphore interface anyway. You could equally well have used the Posix interface (src/backend/port/posix_sema.c). Or, given Microsoft's NIH tendencies, you might have needed to write a

Re: [HACKERS] Question on win32 semaphore simulation

2006-04-18 Thread Qingqing Zhou
Qingqing Zhou [EMAIL PROTECTED] wrote So we might want to fix current win32/sema.c for two problems: (1) semctl(SETVAL, val=0) - there is no other val than zero is used; (2) concurrent access to sem_counts[]; Attached is a patch for the above proposed change -- but still, I hope we don't

Re: [HACKERS] Question on win32 semaphore simulation

2006-04-18 Thread Tom Lane
Qingqing Zhou [EMAIL PROTECTED] writes: (2) the killer function is PGSemaphoreReset(). There is no direct function for this in Win32 either. If you can do PGSemaphoreTryLock, then Reset need only be a loop around it (cf. posix_sema.c). In current usage Reset doesn't have to be very efficient