| From: | Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it> | 
|---|---|
| To: | hackers(at)postgreSQL(dot)org (PostgreSQL Hackers), pgsql-patches(at)postgreSQL(dot)org (Pgsql Patches), maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian) | 
| Cc: | vadim(at)krs(dot)ru | 
| Subject: | new patches | 
| Date: | 1999-06-12 18:42:24 | 
| Message-ID: | 199906121842.UAA05475@nikita.wizard.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Two small patches:
1)	make default NBuffers = DEF_MAXBACKENDS*2 as required by check in
	PostmasterMain().
2)	check for QueryCancel in the copy command. Maybe we should do the
	same in vacuum command (Vadim?). 
*** src/include/miscadmin.h.orig	Wed May 26 09:06:39 1999
--- src/include/miscadmin.h	Sat Jun 12 20:01:10 1999
***************
*** 106,112 ****
   *		default number of buffers in buffer pool
   *
   */
! #define NDBUFS 64
  
  /*****************************************************************************
   *	  pdir.h --																 *
--- 106,112 ----
   *		default number of buffers in buffer pool
   *
   */
! #define NDBUFS (2*DEF_MAXBACKENDS)
  
  /*****************************************************************************
   *	  pdir.h --																 *
*** src/backend/commands/copy.c.orig	Sun May 30 09:01:01 1999
--- src/backend/commands/copy.c	Sat Jun 12 20:23:51 1999
***************
*** 18,23 ****
--- 18,24 ----
  
  #include <access/heapam.h>
  #include <tcop/dest.h>
+ #include "tcop/tcopprot.h"
  #include <fmgr.h>
  #include <miscadmin.h>
  #include <utils/builtins.h>
***************
*** 253,259 ****
  	 */
  	if (file_opened)
  	{
! 		FreeFile(fp);
  		file_opened = false;
  	}
  
--- 254,265 ----
  	 */
  	if (file_opened)
  	{
! 		/*
! 		 * This is unnecessary: files are closed automatically by
! 		 * AtEOXact_Files() at transaction abort. -- dz
! 		 */
! 
! 		/* FreeFile(fp); */
  		file_opened = false;
  	}
  
***************
*** 419,424 ****
--- 425,432 ----
  
  	while (HeapTupleIsValid(tuple = heap_getnext(scandesc, 0)))
  	{
+ 		if (QueryCancel)
+ 			CancelQuery();
  
  		if (oids && !binary)
  		{
***************
*** 691,696 ****
--- 699,707 ----
  	lineno = 0;
  	while (!done)
  	{
+ 		if (QueryCancel)
+ 			CancelQuery();
+ 
  		if (!binary)
  		{
  #ifdef COPY_PATCH
-- 
Massimo Dal Zotto
+----------------------------------------------------------------------+
|  Massimo Dal Zotto               email: dz(at)cs(dot)unitn(dot)it               |
|  Via Marconi, 141                phone: ++39-0461534251              |
|  38057 Pergine Valsugana (TN)      www: http://www.cs.unitn.it/~dz/  |
|  Italy                             pgp: finger dz(at)tango(dot)cs(dot)unitn(dot)it  |
+----------------------------------------------------------------------+
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oleg Bartunov | 1999-06-12 18:57:38 | destroydb doesn't close connection with client (httpd <-> pg) | 
| Previous Message | Thomas Good | 1999-06-12 18:32:42 | Re: [HACKERS] "DML"...CREATE ACRONYM statement |